Skip to content

Commit 209d735

Browse files
committed
drm/i915/icl: Prevent incorrect DBuf enabling
Pretend that we have only 1 DBuf slice and that 1 slice is always enabled, until we have a proper way for on-demand toggling of the second slice. Currently we'll try to incorrectly enable DBuf even when all pipes are disabled and we are already runtime suspended (as the computed number of DBuf slices will be 1 in that case). This also means we'll leave the second slice enabled redundantly (except when suspended), but that's an acceptable tradeoff until we have a proper solution. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108756 Cc: Ville Syrjälä <[email protected]> Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 2835f4f commit 209d735

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

drivers/gpu/drm/i915/intel_pm.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3624,7 +3624,12 @@ static u8 intel_enabled_dbuf_slices_num(struct drm_i915_private *dev_priv)
36243624
if (INTEL_GEN(dev_priv) < 11)
36253625
return enabled_slices;
36263626

3627-
if (I915_READ(DBUF_CTL_S2) & DBUF_POWER_STATE)
3627+
/*
3628+
* FIXME: for now we'll only ever use 1 slice; pretend that we have
3629+
* only that 1 slice enabled until we have a proper way for on-demand
3630+
* toggling of the second slice.
3631+
*/
3632+
if (0 && I915_READ(DBUF_CTL_S2) & DBUF_POWER_STATE)
36283633
enabled_slices++;
36293634

36303635
return enabled_slices;

drivers/gpu/drm/i915/intel_runtime_pm.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3576,7 +3576,11 @@ static void icl_dbuf_enable(struct drm_i915_private *dev_priv)
35763576
!(I915_READ(DBUF_CTL_S2) & DBUF_POWER_STATE))
35773577
DRM_ERROR("DBuf power enable timeout\n");
35783578
else
3579-
dev_priv->wm.skl_hw.ddb.enabled_slices = 2;
3579+
/*
3580+
* FIXME: for now pretend that we only have 1 slice, see
3581+
* intel_enabled_dbuf_slices_num().
3582+
*/
3583+
dev_priv->wm.skl_hw.ddb.enabled_slices = 1;
35803584
}
35813585

35823586
static void icl_dbuf_disable(struct drm_i915_private *dev_priv)
@@ -3591,7 +3595,11 @@ static void icl_dbuf_disable(struct drm_i915_private *dev_priv)
35913595
(I915_READ(DBUF_CTL_S2) & DBUF_POWER_STATE))
35923596
DRM_ERROR("DBuf power disable timeout!\n");
35933597
else
3594-
dev_priv->wm.skl_hw.ddb.enabled_slices = 0;
3598+
/*
3599+
* FIXME: for now pretend that the first slice is always
3600+
* enabled, see intel_enabled_dbuf_slices_num().
3601+
*/
3602+
dev_priv->wm.skl_hw.ddb.enabled_slices = 1;
35953603
}
35963604

35973605
static void icl_mbus_init(struct drm_i915_private *dev_priv)

0 commit comments

Comments
 (0)