Re: Gauntlet Set NOW!

From: Matan Ziv-Av (matan@svgalib.org)
Date: Sat Jan 04 2003 - 14:31:38 EST


On Sat, 4 Jan 2003, Andrew McGregor wrote:

> Or else find that the NV3x has some stonking quick CPU embedded, and apps
> talk GLX to it...
>
> Strange how noone objects to APM BIOS calls or ACPI.

Actually, I object to this.
On my via 686a, the advice on this list for getting the power saving was
to use ACPI (after setting some bits in PCI config space). But lvcool
program showed how to do this without proprietary programs, and I
adapted it to bit of kernel code:

static void via686_idle(void) {
        if (!current->need_resched)
                inb(Reg_PL2);
}
static int __init init_lvcool(void)
{
        nb = pci_find_device(PCI_VENDOR_ID_VIA,
             PCI_DEVICE_ID_VIA_8363_0, nb);
        smb = pci_find_device(PCI_VENDOR_ID_VIA,
             PCI_DEVICE_ID_VIA_82C686_4, smb);
        if(nb==NULL)pci_find_device(PCI_VENDOR_ID_VIA,
             PCI_DEVICE_ID_VIA_8371_0, nb);
        if(!Reg_PL2) {
                u32 t;
                pci_read_config_dword(smb, 0x48, &t);
                Reg_PL2 = (t&0xff80) + 0x14;
                printk(KERN_DEBUG "Reg_PL2 = %08x\n", Reg_PL2);
        }

        old_idle = pm_idle;
        pm_idle = via686_idle;

    return 0;
}

And I don't need to run any proprietary code during normal system run. I
still need to use BIOS to boot and to poweroff the system, but
that will be solved as well.

-- 
Matan Ziv-Av.                         matan@svgalib.org

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jan 07 2003 - 22:00:26 EST