Skip to content

Commit 5b07688

Browse files
mikuintideak
authored andcommitted
drm/i915/gen9: Extend dmc debug mask to include cores
Cores need to be included into the debug mask. We don't exactly know what it does but the spec says it must be enabled. So obey. v2: Cores should be only set for BXT (Imre, Art) Cc: Imre Deak <[email protected]> Cc: Runyan, Arthur J <[email protected]> Signed-off-by: Mika Kuoppala <[email protected]> Reviewed-by: Imre Deak <[email protected]> Signed-off-by: Imre Deak <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 779cb5d commit 5b07688

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7568,6 +7568,7 @@ enum skl_disp_power_wells {
75687568
#define DC_STATE_EN_UPTO_DC5_DC6_MASK 0x3
75697569

75707570
#define DC_STATE_DEBUG _MMIO(0x45520)
7571+
#define DC_STATE_DEBUG_MASK_CORES (1<<0)
75717572
#define DC_STATE_DEBUG_MASK_MEMORY_UP (1<<1)
75727573

75737574
/* Please see hsw_read_dcomp() and hsw_write_dcomp() before using this register,

drivers/gpu/drm/i915/intel_runtime_pm.c

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -456,15 +456,19 @@ static void assert_can_disable_dc9(struct drm_i915_private *dev_priv)
456456
*/
457457
}
458458

459-
static void gen9_set_dc_state_debugmask_memory_up(
460-
struct drm_i915_private *dev_priv)
459+
static void gen9_set_dc_state_debugmask(struct drm_i915_private *dev_priv)
461460
{
462-
uint32_t val;
461+
uint32_t val, mask;
462+
463+
mask = DC_STATE_DEBUG_MASK_MEMORY_UP;
464+
465+
if (IS_BROXTON(dev_priv))
466+
mask |= DC_STATE_DEBUG_MASK_CORES;
463467

464468
/* The below bit doesn't need to be cleared ever afterwards */
465469
val = I915_READ(DC_STATE_DEBUG);
466-
if (!(val & DC_STATE_DEBUG_MASK_MEMORY_UP)) {
467-
val |= DC_STATE_DEBUG_MASK_MEMORY_UP;
470+
if ((val & mask) != mask) {
471+
val |= mask;
468472
I915_WRITE(DC_STATE_DEBUG, val);
469473
POSTING_READ(DC_STATE_DEBUG);
470474
}
@@ -526,7 +530,7 @@ static void gen9_set_dc_state(struct drm_i915_private *dev_priv, uint32_t state)
526530
state = DC_STATE_EN_UPTO_DC5;
527531

528532
if (state & DC_STATE_EN_UPTO_DC5_DC6_MASK)
529-
gen9_set_dc_state_debugmask_memory_up(dev_priv);
533+
gen9_set_dc_state_debugmask(dev_priv);
530534

531535
val = I915_READ(DC_STATE_EN);
532536
DRM_DEBUG_KMS("Setting DC state from %02x to %02x\n",

0 commit comments

Comments
 (0)