From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philipp Gesang Subject: [bisect] regression in suspend with i915 on 82852/855GM Date: Wed, 24 Jun 2015 00:26:48 +0200 Message-ID: <20150623222648.GD12335@acheron> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0963411790==" Return-path: Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by gabe.freedesktop.org (Postfix) with ESMTP id 1B5396EAC7 for ; Tue, 23 Jun 2015 16:00:54 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org Cc: daniel.vetter@intel.com List-Id: intel-gfx@lists.freedesktop.org --===============0963411790== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KuLpqunXa7jZSBt+" Content-Disposition: inline --KuLpqunXa7jZSBt+ Content-Type: multipart/mixed; boundary="bjuZg6miEcdLYP6q" Content-Disposition: inline --bjuZg6miEcdLYP6q Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, suspend/resume results in the backlight not coming back to life on my X40 laptop with an =E2=80=9CDisplay controller: Intel Corporation 82852/855GM Integrated Graphics Device=E2=80=9D. I bisected the issue. Apparently, commit b0cd324faed23d10d66ba6ade66579c681feef6f introduced the problem. Author: Jani Nikula Date: Wed Nov 12 16:25:43 2014 +0200 drm/i915: don't save/restore backlight hist ctl registers I can confirm that suspend works as expected with a 4.1 kernel if the lines to dump/undump the BLC_HIST_CTL register are reintroduced; see the attached patch. (According to a web search, the same issue seems to have arisen before in 2009, see [1].) Let me know if you=E2=80=99d like me to run further tests on that particular hardware. Best, Philipp [1] http://lists.freedesktop.org/archives/intel-gfx/2009-October/004490.html --bjuZg6miEcdLYP6q Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-drm-i915-save-and-restore-BLC_HIST_CTL-during-suspen.patch" Content-Transfer-Encoding: quoted-printable =46rom 2f5f519dd77cdd27f5a88413d8125fb23f6e526f Mon Sep 17 00:00:00 2001 =46rom: Philipp Gesang Date: Tue, 23 Jun 2015 23:37:28 +0200 Subject: [PATCH] drm/i915: save and restore BLC_HIST_CTL during suspend/res= ume This partially reverts b0cd324fae... Without considering the BLC_HIST_CTL register the backlight on an IBM X40 (855GM) remains dark after suspend/resume. Include its value again with the saved registers. Signed-off-by: Philipp Gesang --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_suspend.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_dr= v.h index 8ae6f7f..f68e0b5 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -925,6 +925,7 @@ struct i915_suspend_saved_registers { u32 savePP_OFF; u32 savePP_CONTROL; u32 savePP_DIVISOR; + u32 saveBLC_HIST_CTL; u32 saveFBC_CONTROL; u32 saveCACHE_MODE_0; u32 saveMI_ARB_STATE; diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i91= 5_suspend.c index cf67f82..f417744 100644 --- a/drivers/gpu/drm/i915/i915_suspend.c +++ b/drivers/gpu/drm/i915/i915_suspend.c @@ -54,6 +54,7 @@ static void i915_save_display(struct drm_device *dev) dev_priv->regfile.savePP_ON_DELAYS =3D I915_READ(PP_ON_DELAYS); dev_priv->regfile.savePP_OFF_DELAYS =3D I915_READ(PP_OFF_DELAYS); dev_priv->regfile.savePP_DIVISOR =3D I915_READ(PP_DIVISOR); + dev_priv->regfile.saveBLC_HIST_CTL =3D I915_READ(BLC_HIST_CTL); } =20 /* save FBC interval */ @@ -89,6 +90,7 @@ static void i915_restore_display(struct drm_device *dev) I915_WRITE(PP_OFF_DELAYS, dev_priv->regfile.savePP_OFF_DELAYS); I915_WRITE(PP_DIVISOR, dev_priv->regfile.savePP_DIVISOR); I915_WRITE(PP_CONTROL, dev_priv->regfile.savePP_CONTROL); + I915_WRITE(BLC_HIST_CTL, dev_priv->regfile.saveBLC_HIST_CTL); } =20 /* only restore FBC info on the platform that supports FBC*/ --=20 2.4.2 --bjuZg6miEcdLYP6q-- --KuLpqunXa7jZSBt+ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJVid0oAAoJELdcG6d+hz928rAP/R/I6zyLkyQeoWP4K4/JWja4 WhmHbiwXGVBNDYCgzq2YQ7vxhwn1V3ThQI3PHgoZ+PjVQZdDbxiI2dHuwgPQPqN2 bRp9cOwGqkYYi8rI0Ux08Jmzj7SL25Wl4WgckClt9KcJ9s1csnkAEu6UXNudrth6 Uf0Mngx3gOOPb+lOrVsbARHgxT54XyH9H3Qie31usFZfp42uvW8JiekLckVpfo+d o1kOk8LQrOfaq0dGaxWkRybZJ90ciA1LN4YTst5u/+iXxKLYwSUPj9W0pJPh5TOE UMKlr7UOH4EhXPjGrsatEGgX4NgETbS0YUmBBzYqMBgbH2+WAOZzHQufpbCc9t8U a0tFVvlTsCrCBU1fwfn6P/Jw3yp0EUARQmLJkkrtSbvO/2uZP2KAZtS9beRXPrdi zRyUSbRiKXcfhS6TxjtA6J/uFDGQAu81NHFCT6zxWA2PYbMxjPQGRd7PyhQeAoge 785g+PVVbUxA0Kx4t9VZp9nGEI7jigtgS9NMFqngu4Q5Is0gjN+g8FhtdHAl57np XkXF1n0tAw5IGdysqIJx1iKgCx6E5Nr1Zk/7klQXtiJaSfMcWaP3KpM/wslyDL7F zRbfiQbBI2RVdImj6N3W5n+8BQdm/Mz6BJ2u4ZlzhxLoOPlmFPkin3Ze+sdPKQl+ Sg0X4lSwCTZ/uX2ZkP21 =3i8X -----END PGP SIGNATURE----- --KuLpqunXa7jZSBt+-- --===============0963411790== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9pbnRlbC1nZngK --===============0963411790==--