From: Daniel Vetter <daniel@ffwll.ch>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 3/4] drm/i915: dont save/restore VGA state for kms
Date: Fri, 25 Jan 2013 20:25:55 +0100 [thread overview]
Message-ID: <20130125192555.GP23080@phenom.ffwll.local> (raw)
In-Reply-To: <20130125190958.GJ9135@intel.com>
On Fri, Jan 25, 2013 at 09:09:58PM +0200, Ville Syrjälä wrote:
> On Fri, Jan 25, 2013 at 05:53:21PM +0100, Daniel Vetter wrote:
> > The only thing we really care about that it is off. To do so, reuse
> > the recently created i915_redisable_vga function, which is already
> > used to put obnoxious firmware into check on lid reopening.
> >
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > ---
> > drivers/gpu/drm/i915/i915_drv.h | 1 +
> > drivers/gpu/drm/i915/i915_suspend.c | 48 +++++++++++++++++++-----------------
> > drivers/gpu/drm/i915/intel_display.c | 2 +-
> > 3 files changed, 28 insertions(+), 23 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index 953060c..0ce7c8a 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -1788,6 +1788,7 @@ extern void intel_modeset_cleanup(struct drm_device *dev);
> > extern int intel_modeset_vga_set_state(struct drm_device *dev, bool state);
> > extern void intel_modeset_setup_hw_state(struct drm_device *dev,
> > bool force_restore);
> > +extern void i915_redisable_vga(struct drm_device *dev);
> > extern bool intel_fbc_enabled(struct drm_device *dev);
> > extern void intel_disable_fbc(struct drm_device *dev);
> > extern bool ironlake_set_drps(struct drm_device *dev, u8 val);
> > diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
> > index 056bd12..edcbfaf 100644
> > --- a/drivers/gpu/drm/i915/i915_suspend.c
> > +++ b/drivers/gpu/drm/i915/i915_suspend.c
> > @@ -69,6 +69,15 @@ static void i915_save_vga(struct drm_device *dev)
> > int i;
> > u16 cr_index, cr_data, st01;
> >
> > + /* VGA state */
> > + dev_priv->regfile.saveVGA0 = I915_READ(VGA0);
> > + dev_priv->regfile.saveVGA1 = I915_READ(VGA1);
> > + dev_priv->regfile.saveVGA_PD = I915_READ(VGA_PD);
>
> BTW these three don't seem to exist on PCH platforms at all. I guess
> gen <= 4 would be the most appropriate check since VLV doesn't have
> them either, but in this code it doesn't matter much if the check is
> for non-PCH instead. I'll include a patch for this in my
> IS_DISPLAYREG() series.
We refuse to load the driver if modesetting isn't enabled and we're on
gen6+. And ums on ilk was only ever supported by rhel. So Imo we can just
punt on this as not a problem, now that the legacy vga state is only
saved/restored in ums mode.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2013-01-25 19:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-25 16:53 [PATCH 0/4] disable more register safe/restore code for kms Daniel Vetter
2013-01-25 16:53 ` [PATCH 1/4] drm/i915: move modeset checks out of save/restore_modeset_reg Daniel Vetter
2013-01-28 10:54 ` Imre Deak
2013-01-28 21:54 ` Daniel Vetter
2013-01-25 16:53 ` [PATCH 2/4] drm/i915: extract ums suspend/resume into i915_ums.c Daniel Vetter
2013-01-25 16:53 ` [PATCH 3/4] drm/i915: dont save/restore VGA state for kms Daniel Vetter
2013-01-25 19:09 ` Ville Syrjälä
2013-01-25 19:25 ` Daniel Vetter [this message]
2013-01-25 16:53 ` [PATCH 4/4] drm/i915: move DP save/restore into i915_ums.c Daniel Vetter
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=20130125192555.GP23080@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.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.