PATCH [2/2] - KFB power management
Manish Regmi
manish at olpcnepal.org
Fri Mar 2 11:04:50 EST 2007
Hi,
On 3/2/07, Jordan Crouse <jordan.crouse at amd.com> wrote:
> This is the very early beginnings of KFB power management. By using the
> previous patch to keep track of KD_TEXT and KD_GRAPHICS mode, we can
> make assumptions about what we need to do to save the state of the
> system. To get the ball rolling, we do what it takes to restore
> the system back to the console prompt (ie, when the current VT is in
> KD_TEXT mode). If we are in KD_TEXT mode, we are lucky, in that we
> can just blast the current mode back into the registers when we come back
> up - so no state needs to be saved. As you can tell by the printks() and
> FIXMEs - that won't work when X is involved - when we aren't in control of
> the mode, we'll need to save off an incredible number of registers, including
> ones we don't even access in the KFB, like the GP and VID registers. I don't
> want that extensive work to gate the simple suspend/resume path, so this
> patch will do in the mean time.
just curious... Where are these patches commited? I could not find it
in olpc-2.6 :(
I am unable to see the changes in the git tree i cloned form
olpc-2.6. It is upto date. just pulled it now.
I also tried the geode branch. I dont have the clone of geode tree but
gitweb does not show the additions.
do i need to patch my tree?
Thanks....
> +#ifdef CONFIG_PM
> +static int gxfb_suspend(struct pci_dev *pdev, pm_message_t state)
> +{
> + struct fb_info *info = pci_get_drvdata(pdev);
> + struct geodefb_par *par = info->par;
> +
> + if (pdev->dev.power.power_state.event == state.event)
> + return 0;
> +
> + if (state.event == PM_SUSPEND_MEM) {
> +
> + /* If the FB is active, then somebody other then the console
> + * owns it - we need to save the entire state of the
> + * graphics engine to put back upon resume. Otherwise,
> + * we know what mode we are in right now, so we do nothing
> + * here and resume that mode upon resume
> + */
> +
> + if (par->fbactive) {
> + printk(KERN_INFO "gxfb: FIXME - I need to save the state!\n");
> + }
> +
> +
> + acquire_console_sem();
> + /* FIXME: Blank the screen here? */
> + fb_set_suspend(info, 1);
> + release_console_sem();
> + }
> +
> + pdev->dev.power.power_state = state;
> + return 0;
i did not understand why the fbactive trick is needed. will it be
needed after we save all "Graphics Processor Registers" and
family....
Thanks
--
--------------------------------------------------------
Manish Regmi
Volunteer
OLPC Nepal
http://manish-cs.blogspot.com/
More information about the Devel
mailing list