intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Paulo Zanoni <przanoni@gmail.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/6] drm/i915: don't restore LVDS enable state blindly v2
Date: Tue, 19 Feb 2013 17:39:49 -0300	[thread overview]
Message-ID: <CA+gsUGTbjQdQK5DjXh2pqRGaHy1g0UiRkGiZpJR_nsGAdhBbRw@mail.gmail.com> (raw)
In-Reply-To: <1361304703-2869-2-git-send-email-jbarnes@virtuousgeek.org>

Hi

2013/2/19 Jesse Barnes <jbarnes@virtuousgeek.org>:
> We still rely on a few LVDS bits, but restoring the enable bit can cause
> trouble at this point, so don't.
>
> v2: use the right mask to prevent restore (Daniel)
>     conditionalize on KMS support (Denial)
>
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

Briefly tested on SNB, and it still works.

> ---
>  drivers/gpu/drm/i915/i915_suspend.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
> index 2135f21..c1e02b0 100644
> --- a/drivers/gpu/drm/i915/i915_suspend.c
> +++ b/drivers/gpu/drm/i915/i915_suspend.c
> @@ -255,6 +255,7 @@ static void i915_save_display(struct drm_device *dev)
>  static void i915_restore_display(struct drm_device *dev)
>  {
>         struct drm_i915_private *dev_priv = dev->dev_private;
> +       u32 mask = 0xffffffff;
>
>         /* Display arbitration */
>         if (INTEL_INFO(dev)->gen <= 4)
> @@ -267,10 +268,13 @@ static void i915_restore_display(struct drm_device *dev)
>         if (INTEL_INFO(dev)->gen >= 4 && !HAS_PCH_SPLIT(dev))
>                 I915_WRITE(BLC_PWM_CTL2, dev_priv->regfile.saveBLC_PWM_CTL2);
>
> +       if (drm_core_check_feature(dev, DRIVER_MODESET))
> +               mask = ~LVDS_PORT_EN;
> +
>         if (HAS_PCH_SPLIT(dev)) {
> -               I915_WRITE(PCH_LVDS, dev_priv->regfile.saveLVDS);
> +               I915_WRITE(PCH_LVDS, dev_priv->regfile.saveLVDS & mask);
>         } else if (IS_MOBILE(dev) && !IS_I830(dev))
> -               I915_WRITE(LVDS, dev_priv->regfile.saveLVDS);
> +               I915_WRITE(LVDS, dev_priv->regfile.saveLVDS & mask);
>
>         if (!IS_I830(dev) && !IS_845G(dev) && !HAS_PCH_SPLIT(dev))
>                 I915_WRITE(PFIT_CONTROL, dev_priv->regfile.savePFIT_CONTROL);
> --
> 1.7.9.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Paulo Zanoni

  reply	other threads:[~2013-02-19 20:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-19 20:11 VT switchless suspend/resume Jesse Barnes
2013-02-19 20:11 ` [PATCH 1/6] drm/i915: don't restore LVDS enable state blindly v2 Jesse Barnes
2013-02-19 20:39   ` Paulo Zanoni [this message]
2013-02-19 21:35     ` Daniel Vetter
2013-02-19 20:11 ` [PATCH 2/6] drm/i915: add sprite restore function v3 Jesse Barnes
2013-02-19 20:11 ` [PATCH 3/6] drm/i915: restore cursor and sprite state when forcing a config restore Jesse Barnes
2013-02-19 20:11 ` [PATCH 4/6] drm/i915: enable VT switchless resume v2 Jesse Barnes
2013-03-18  7:49   ` Daniel Vetter
2013-03-18 17:42     ` Jesse Barnes
2013-03-18 18:50       ` Daniel Vetter
2013-03-19 16:56         ` Jesse Barnes
2013-03-19 17:13           ` Daniel Vetter
2013-03-26 12:14             ` Daniel Vetter
2013-03-26 15:35               ` Jesse Barnes
2013-02-19 20:11 ` [PATCH 5/6] drm/i915: emit a hotplug event on resume Jesse Barnes
2013-02-19 20:11 ` [PATCH 6/6] drm/i915: remove disabled memset of framebuffer from intel_fb Jesse Barnes
2013-02-19 21:17   ` Paulo Zanoni
2013-03-04 22:04     ` Daniel Vetter
2013-02-19 21:25 ` VT switchless suspend/resume Paulo Zanoni
2013-02-25 19:19   ` Paulo Zanoni
2013-02-25 21:31     ` Jesse Barnes
2013-03-07 16:38       ` Jesse Barnes
  -- strict thread matches above, loose matches on Subject: below --
2013-02-15 21:23 VT switchless v3 Jesse Barnes
2013-02-15 21:23 ` [PATCH 1/6] drm/i915: don't restore LVDS enable state blindly v2 Jesse Barnes

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=CA+gsUGTbjQdQK5DjXh2pqRGaHy1g0UiRkGiZpJR_nsGAdhBbRw@mail.gmail.com \
    --to=przanoni@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.org \
    /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;
as well as URLs for NNTP newsgroup(s).