summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2025-11-07 20:11:24 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2025-11-12 23:00:49 +0200
commit3107fc63078bf1c3df235eabf6609155fd1c239c (patch)
treebdcd5f7412bc075e2082abc63bd74d59b5961b8e
parent608a7d3f21755e2c3c3c6e6a404e41afb725b4de (diff)
drm/i915: Use mode_config->cursor_width for cursor DDB allocation
Replace the hardcoded 256 with mode_config->cursor_width when doing the cursor DDB allocation. Currently 256 is correct for all SKL+, but this might change in the future. One less place to change should that happen. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20251107181126.5743-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
-rw-r--r--drivers/gpu/drm/i915/display/skl_watermark.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
index 16d74ab3a2b5..54e9e0be019d 100644
--- a/drivers/gpu/drm/i915/display/skl_watermark.c
+++ b/drivers/gpu/drm/i915/display/skl_watermark.c
@@ -635,6 +635,7 @@ skl_cursor_allocation(const struct intel_crtc_state *crtc_state,
{
struct intel_display *display = to_intel_display(crtc_state);
struct intel_plane *plane = to_intel_plane(crtc_state->uapi.crtc->cursor);
+ const struct drm_mode_config *mode_config = &display->drm->mode_config;
const struct drm_format_info *info;
struct skl_wm_level wm = {};
int ret, min_ddb_alloc = 0;
@@ -648,7 +649,7 @@ skl_cursor_allocation(const struct intel_crtc_state *crtc_state,
info = drm_get_format_info(display->drm, format, modifier);
- ret = skl_compute_wm_params(crtc_state, 256,
+ ret = skl_compute_wm_params(crtc_state, mode_config->cursor_width,
info, modifier, DRM_MODE_ROTATE_0,
crtc_state->pixel_rate, &wp, 0, 0);
drm_WARN_ON(display->drm, ret);