From: Daniel Vetter <daniel@ffwll.ch>
To: Indan Zupancic <indan@nul.nu>
Cc: Jani Nikula <jani.nikula@intel.com>, Takashi Iwai <tiwai@suse.de>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/4] drm/i915: save/restore the legacy backlight control
Date: Tue, 28 Aug 2012 16:14:38 +0200 [thread overview]
Message-ID: <20120828141438.GC5125@phenom.ffwll.local> (raw)
In-Reply-To: <f4681f7d3186e3aa3767c295e25b205d.squirrel@webmail.greenhost.nl>
On Tue, Aug 28, 2012 at 03:56:31PM +0200, Indan Zupancic wrote:
> Hello,
>
> On Tue, August 28, 2012 08:53, Jani Nikula wrote:
> > From: Daniel Vetter <daniel.vetter@ffwll.ch>
> >
> > This is a prep patch to stop drm/i915 from changing the LBPC registers
> > itself - but we still need to properly save/restore it on
> > suspend/resume.
> >
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_drv.h | 1 +
> > drivers/gpu/drm/i915/i915_reg.h | 3 +++
> > drivers/gpu/drm/i915/i915_suspend.c | 8 ++++++++
> > drivers/gpu/drm/i915/intel_panel.c | 2 --
> > 4 files changed, 12 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index 58b43db..af1701c 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -606,6 +606,7 @@ typedef struct drm_i915_private {
> > u32 savePP_CONTROL;
> > u32 savePP_DIVISOR;
> > u32 savePFIT_CONTROL;
> > + u8 saveLBPC;
> > u32 save_palette_a[256];
> > u32 save_palette_b[256];
> > u32 saveDPFC_CB_BASE;
> > diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> > index d0b60f2..3303c18 100644
> > --- a/drivers/gpu/drm/i915/i915_reg.h
> > +++ b/drivers/gpu/drm/i915/i915_reg.h
> > @@ -1889,6 +1889,9 @@
> >
> > #define PFIT_AUTO_RATIOS 0x61238
> >
> > +/* legacy/combination backlight modes in pci config space. */
> > +#define PCI_LBPC 0xf4
> > +
> > /* Backlight control */
> > #define BLC_PWM_CTL2 0x61250 /* 965+ only */
> > #define BLM_PWM_ENABLE (1 << 31)
> > diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
> > index 4776ccf..05daff7 100644
> > --- a/drivers/gpu/drm/i915/i915_suspend.c
> > +++ b/drivers/gpu/drm/i915/i915_suspend.c
> > @@ -639,6 +639,10 @@ static void i915_save_display(struct drm_device *dev)
> > dev_priv->saveBLC_PWM_CTL2 = I915_READ(BLC_PWM_CTL2);
> > if (IS_MOBILE(dev) && !IS_I830(dev))
> > dev_priv->saveLVDS = I915_READ(LVDS);
> > +
> > + if (IS_GEN2(dev) || IS_GEN4(dev))
> > + pci_read_config_byte(dev->pdev, PCI_LBPC,
> > + &dev_priv->saveLBPC);
>
> What about GEN3?
>
> It seems weird that LBPC wouldn't be restored during resume by some BIOSes,
> is this really necessary?
ba3820ade317ee36e496b9b40d2ec3987dd4aef0 claims so. But that commit
managed to put too many things into the same thing unfortunately.
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
next prev parent reply other threads:[~2012-08-28 14:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-28 6:53 [PATCH 0/4] drm/i915: backlight fixes and cleanup Jani Nikula
2012-08-28 6:53 ` [PATCH 1/4] drm/i915: save/restore the legacy backlight control Jani Nikula
2012-08-28 7:16 ` Chris Wilson
2012-08-28 7:48 ` Daniel Vetter
2012-08-28 13:56 ` Indan Zupancic
2012-08-28 14:14 ` Daniel Vetter [this message]
2012-08-28 14:49 ` Indan Zupancic
2012-08-28 15:15 ` Daniel Vetter
2012-08-30 8:32 ` Indan Zupancic
2012-08-30 8:50 ` Daniel Vetter
2012-08-28 6:53 ` [PATCH 2/4] drm/i915: remove combination mode for backlight control, again Jani Nikula
2012-08-28 14:39 ` Indan Zupancic
2012-08-28 14:55 ` Daniel Vetter
2012-08-30 9:29 ` Indan Zupancic
2012-11-14 16:48 ` Jesse Barnes
2012-08-28 6:53 ` [PATCH 3/4] drm/i915: remove brightness inversion quirk for acer aspire 5734z Jani Nikula
2012-08-28 6:53 ` [PATCH 4/4] drm/i915: remove module parameter and quirk for inverting brightness Jani Nikula
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=20120828141438.GC5125@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=indan@nul.nu \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=tiwai@suse.de \
/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.