From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: dri-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [RFC] full suspend/resume support for i915 DRM driver
Date: Wed, 24 Oct 2007 08:18:30 -0700 [thread overview]
Message-ID: <200710240818.31128.jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <20071024133514.GB4898@ucw.cz>
On Wednesday, October 24, 2007 6:35:14 am Pavel Machek wrote:
> Hi!
>
> > We seem to see a lot of bug reports along the lines of, "my machine
> > resumes but I can't see X" or, "I can see X but only with a bright
> > flashlight", etc. These sorts of problems are due to the fact that
> > the X server isn't designed to do full state save/restore, and none
> > of the available kernel drivers do it on its behalf.
> >
> > Since intelfb and the rest of the Intel drivers are fairly incompatible,
> > this patch makes the DRM bind to the PCI device so it can register real
> > suspend/resume handlers. Those handlers take care of saving and
> > restoring enough state for X to come back reliably on at least one of my
> > problematic test machines, but text mode still has trouble (still
> > debugging VGA state save/restore, including trying to save/restore
> > actual VRAM contents for possible hibernate support).
> >
> > How does this approach look? Is a new DRM driver flag a good thing for
> > similar situations with other drivers? Thoughts?
>
> Looks okay to me... from very quick look.
>
> > + if (!i915_pipe_enabled(dev, pipe))
> > + return;
> > +
> > + if (pipe == PIPE_A)
> > + array = dev_priv->savePaletteA;
>
> coding style, we probably want save_palette_A.
Yeah, I tried not to pull over uglies from the X code but I guess I forgot
this bit. I should also update the copyright.
> > + unsigned long reg = pipe == PIPE_A ? PALETTE_A : PALETTE_B;
>
> Uff. Mixing = and == and ? in one expression is evil.
I could put parens around it if you think that would help, or just move it to
a new line...
> I think I seen some #if 0 code.... just remove that.
Oh I left some in there? Yeah I'll remove it.
Thanks,
Jesse
next prev parent reply other threads:[~2007-10-24 15:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-18 21:01 [RFC] full suspend/resume support for i915 DRM driver Jesse Barnes
2007-10-20 2:51 ` Jesse Barnes
2007-10-23 4:15 ` Jesse Barnes
2007-10-24 20:17 ` Adrian Bunk
2007-10-24 21:07 ` Jesse Barnes
2007-10-24 13:35 ` Pavel Machek
2007-10-24 15:18 ` Jesse Barnes [this message]
2007-10-24 21:22 ` Rafael J. Wysocki
2007-10-25 23:53 ` Jesse Barnes
2007-10-26 4:59 ` Greg KH
2007-10-26 16:57 ` Jesse Barnes
2007-10-26 17:10 ` Kay Sievers
2007-10-26 18:12 ` Jesse Barnes
2007-10-26 18:21 ` Kay Sievers
2007-10-26 18:40 ` fixing up DRM device model usage Jesse Barnes
2007-10-26 19:08 ` Kay Sievers
2007-10-26 21:31 ` Jesse Barnes
2007-10-27 21:12 ` Kay Sievers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200710240818.31128.jbarnes@virtuousgeek.org \
--to=jbarnes@virtuousgeek.org \
--cc=dri-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox