drm/i915/gen9: Verify and enforce dc6 state writes
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Thu, 18 Feb 2016 15:58:09 +0000 (17:58 +0200)
committerJani Nikula <jani.nikula@intel.com>
Mon, 22 Feb 2016 16:37:43 +0000 (18:37 +0200)
commit9b18572e83bfd5378b3fcff3acf123f7bddf558a
tree97d8e80f31f5fdf507c4c21c524934a2c290d970
parent9b6f20984c5402af06e13cde64b5fe7c31853d1a
drm/i915/gen9: Verify and enforce dc6 state writes

It has been observed that sometimes disabling the dc6 fails
and dc6 state pops back up, brief moment after disabling. This
has to be dmc save/restore timing issue or other bug in the
way dc states are handled.

Try to work around this issue as we don't have firmware fix
yet available. Verify that the value we wrote for the dmc sticks,
and also enforce it by rewriting it, if it didn't.

v2: Zero rereads on rewrite for extra paranoia (Imre)

Testcase: kms_flip/basic-flip-vs-dpms
References: https://bugs.freedesktop.org/show_bug.cgi?id=93768
Cc: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1455811089-27884-1-git-send-email-mika.kuoppala@intel.com
(cherry picked from commit 779cb5d3ddd72950ec726f86e38f7575c7fbdd4c)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_runtime_pm.c