All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org, "Mcallister,
	Jeffrey" <jeffrey.mcallister@intel.com>
Subject: Re: [PATCH 6/9] drm/i915: PCH_NOP suspend/resume
Date: Tue, 19 Mar 2013 10:53:21 -0700	[thread overview]
Message-ID: <20130319175320.GB1450@bwidawsk.net> (raw)
In-Reply-To: <CAKMK7uEJmdY7yybyJwsSaHMJe0i+YxvuOxyKbhhZPxB8DJP_Lw@mail.gmail.com>

On Tue, Mar 19, 2013 at 08:51:01AM +0100, Daniel Vetter wrote:
> On Tue, Mar 19, 2013 at 1:51 AM, Ben Widawsky <ben@bwidawsk.net> wrote:
> > On Sun, Mar 17, 2013 at 10:28:55PM +0100, Daniel Vetter wrote:
> >> On Wed, Mar 13, 2013 at 11:21:05AM -0700, Ben Widawsky wrote:
> >> > More registers we can't write.
> >> >
> >> > Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> >> > ---
> >> >  drivers/gpu/drm/i915/i915_suspend.c | 57 ++++++++++++++++++++++++++-----------
> >> >  1 file changed, 41 insertions(+), 16 deletions(-)
> >> >
> >> > diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
> >> > index c1e02b0..dd5766a 100644
> >> > --- a/drivers/gpu/drm/i915/i915_suspend.c
> >> > +++ b/drivers/gpu/drm/i915/i915_suspend.c
> >> > @@ -333,11 +333,19 @@ int i915_save_state(struct drm_device *dev)
> >> >
> >> >     mutex_lock(&dev->struct_mutex);
> >> >
> >> > -   i915_save_display(dev);
> >> > +   if (!HAS_PCH_NOP(dev))
> >> > +           i915_save_display(dev);
> >>
> >> This here looks a bit funny - imo it's better to move this check to the
> >> only two places where we still touch registers in the kms case: lvds & pp
> >> restore.
> >
> > I had something like this originally, except I also can't touch the
> > backlight registers (even though they're not in a bad range).
> >
> > In an earlier patch you asked me to move the check up in the callchain,
> > and I liked that idea. It seems to me here the same logic applies, we
> > never care about any of the display registers. If you feel strongly
> > about it though, I will change it. Please correct me if I misunderstood
> > your request.
> 
> Yes, in general I think it's good to move the checks up in the
> callchains and consolidate them that way. I'm voting for an exception
> here in the register save/restore code since we're slowly moving away
> from it for kms. Moving the PCH_NOP check into the few remaining
> places allows us to easily kill them once those are guarded with if
> (!kms) checks, too. I've just figured that that way we won't have a
> stray PCH_NOP check left behind for code which (eventually) isn't run
> at all in kms mode.
> 
> I don't mind if you leave this as-is, really just a tiny bikeshed.
> -Daniel

I think having the check never hurts, and since I tend to introduce bugs
whenever I change things, I'll punt on this if you don't mind.

> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch

-- 
Ben Widawsky, Intel Open Source Technology Center

  reply	other threads:[~2013-03-19 17:51 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-13 18:20 [PATCH 0/9] displayless PCH Ben Widawsky
2013-03-13 18:21 ` [PATCH 1/9] drm/i915: Move num_pipes to intel info Ben Widawsky
2013-03-13 18:31   ` Chris Wilson
2013-03-13 18:36     ` Ben Widawsky
2013-03-13 21:05   ` [PATCH 01/10] [v2] " Ben Widawsky
2013-03-19 19:25   ` [PATCH 1/9] " Jesse Barnes
2013-03-19 23:06     ` Daniel Vetter
2013-03-13 18:21 ` [PATCH 2/9] drm/i915: Support PCH no display Ben Widawsky
2013-03-17 21:13   ` Daniel Vetter
2013-03-13 18:21 ` [PATCH 3/9] drm/i915: PCH_NOP Ben Widawsky
2013-03-17 21:05   ` Daniel Vetter
2013-03-17 21:14     ` Daniel Vetter
2013-03-13 18:21 ` [PATCH 4/9] drm/i915: Don't touch South display when PCH_NOP Ben Widawsky
2013-03-14 11:44   ` Jani Nikula
2013-03-14 15:55     ` [PATCH 04/10] [v2] drm/i915: Don't touch South Display " Ben Widawsky
2013-03-17 21:21       ` Daniel Vetter
2013-03-18 23:05         ` Ben Widawsky
2013-03-13 18:21 ` [PATCH 5/9] drm/i915: Don't initialize watermark stuff with PCH_NOP Ben Widawsky
2013-03-13 18:47   ` Chris Wilson
2013-03-13 21:06   ` [PATCH 05/10] [v2] " Ben Widawsky
2013-03-17 21:02     ` Daniel Vetter
2013-03-19  0:45       ` Ben Widawsky
2013-03-13 18:21 ` [PATCH 6/9] drm/i915: PCH_NOP suspend/resume Ben Widawsky
2013-03-17 21:28   ` Daniel Vetter
2013-03-19  0:51     ` Ben Widawsky
2013-03-19  7:51       ` Daniel Vetter
2013-03-19 17:53         ` Ben Widawsky [this message]
2013-03-13 18:21 ` [PATCH 7/9] drm/i915: Don't wait for PCH on reset Ben Widawsky
2013-03-19 19:36   ` Jesse Barnes
2013-03-20 16:43     ` [PATCH] " Ben Widawsky
2013-03-20 16:58       ` Jesse Barnes
2013-03-13 18:21 ` [PATCH 8/9] drm/i915: Set PCH_NOP Ben Widawsky
2013-03-17 21:36   ` Daniel Vetter
2013-03-13 18:21 ` [PATCH 9/9] drm/i915: Add a pipeless ivybridge configuration Ben Widawsky
2013-03-13 18:52   ` Chris Wilson
2013-03-13 21:08   ` [PATCH 09/10] drm/i915: Introduce IVB_FEATURES for device definition Ben Widawsky
2013-03-13 21:08     ` [PATCH 10/10] [v2] drm/i915: Add a pipeless ivybridge configuration Ben Widawsky
2013-03-15  4:05     ` [PATCH 09/10] drm/i915: Introduce IVB_FEATURES for device definition Ben Widawsky
2013-03-13 18:58 ` [PATCH 0/9] displayless PCH Chris Wilson
2013-03-13 19:05   ` Ben Widawsky

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=20130319175320.GB1450@bwidawsk.net \
    --to=ben@bwidawsk.net \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jeffrey.mcallister@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.