drm/i915/gen6+: Clear upper data byte during PCODE write
authorImre Deak <[email protected]>
Mon, 28 Nov 2016 15:29:27 +0000 (17:29 +0200)
committerImre Deak <[email protected]>
Fri, 2 Dec 2016 14:32:44 +0000 (16:32 +0200)
The spec calls for the upper data byte to be cleared before most of the
PCODE write commands, for others like IPS control it doesn't say
anything about this byte. Let's clear it in case it's clobbered somehow,
especially that there are places where we only do a PCODE write without
a preceding PCODE read.

Cc: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/i915/intel_pm.c

index adf208fc6a2d3d80bd2c63afccd91038304148fe..b7fa1fa7d669f9f2811aa9f4847189c1b3b20cb0 100644 (file)
@@ -7838,6 +7838,7 @@ int sandybridge_pcode_write(struct drm_i915_private *dev_priv,
        }
 
        I915_WRITE_FW(GEN6_PCODE_DATA, val);
+       I915_WRITE_FW(GEN6_PCODE_DATA1, 0);
        I915_WRITE_FW(GEN6_PCODE_MAILBOX, GEN6_PCODE_READY | mbox);
 
        if (intel_wait_for_register_fw(dev_priv,