Skip to content

Commit 3107fc6

Browse files
committed
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>
1 parent 608a7d3 commit 3107fc6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/gpu/drm/i915/display/skl_watermark.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,7 @@ skl_cursor_allocation(const struct intel_crtc_state *crtc_state,
635635
{
636636
struct intel_display *display = to_intel_display(crtc_state);
637637
struct intel_plane *plane = to_intel_plane(crtc_state->uapi.crtc->cursor);
638+
const struct drm_mode_config *mode_config = &display->drm->mode_config;
638639
const struct drm_format_info *info;
639640
struct skl_wm_level wm = {};
640641
int ret, min_ddb_alloc = 0;
@@ -648,7 +649,7 @@ skl_cursor_allocation(const struct intel_crtc_state *crtc_state,
648649

649650
info = drm_get_format_info(display->drm, format, modifier);
650651

651-
ret = skl_compute_wm_params(crtc_state, 256,
652+
ret = skl_compute_wm_params(crtc_state, mode_config->cursor_width,
652653
info, modifier, DRM_MODE_ROTATE_0,
653654
crtc_state->pixel_rate, &wp, 0, 0);
654655
drm_WARN_ON(display->drm, ret);

0 commit comments

Comments
 (0)