From: Vinod Govindapillai Date: Fri, 13 Dec 2024 12:03:57 +0000 (+0200) Subject: drm/i915/xe3: do not configure auto min dbuf for cursor WMs X-Git-Tag: v6.14-rc1~174^2~8^2~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d483fa58991fab33cf7b29d01d8243343dd0e5ad;p=thirdparty%2Fkernel%2Flinux.git drm/i915/xe3: do not configure auto min dbuf for cursor WMs Cursor planes do not have the minimum dbuf configuration. The ddb allocation and registration routines handle this correctly. But the plane wm handling for cursor need to be differentiated for this case. Auto minimum buf enable bit should not be enabled for cursor wm registers in xe3. Fixes: a831920c370c ("drm/i915/xe3: Use hw support for min/interim ddb allocations for async flip") Signed-off-by: Vinod Govindapillai Reviewed-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20241213120357.300584-1-vinod.govindapillai@intel.com Signed-off-by: Vinod Govindapillai --- diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c index d3506e8ccd9b2..29e8ea91c8584 100644 --- a/drivers/gpu/drm/i915/display/skl_watermark.c +++ b/drivers/gpu/drm/i915/display/skl_watermark.c @@ -1922,10 +1922,11 @@ static int skl_wm_max_lines(struct drm_i915_private *i915) return 31; } -static bool xe3_auto_min_alloc_capable(struct intel_display *display, - int level) +static bool xe3_auto_min_alloc_capable(struct intel_plane *plane, int level) { - return DISPLAY_VER(display) >= 30 && level == 0; + struct intel_display *display = to_intel_display(plane); + + return DISPLAY_VER(display) >= 30 && level == 0 && plane->id != PLANE_CURSOR; } static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, @@ -1937,7 +1938,6 @@ static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, struct skl_wm_level *result /* out */) { struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev); - struct intel_display *display = to_intel_display(crtc_state); uint_fixed_16_16_t method1, method2; uint_fixed_16_16_t selected_result; u32 blocks, lines, min_ddb_alloc = 0; @@ -2061,7 +2061,7 @@ static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, /* Bspec says: value >= plane ddb allocation -> invalid, hence the +1 here */ result->min_ddb_alloc = max(min_ddb_alloc, blocks) + 1; result->enable = true; - result->auto_min_alloc_wm_enable = xe3_auto_min_alloc_capable(display, level); + result->auto_min_alloc_wm_enable = xe3_auto_min_alloc_capable(plane, level); if (DISPLAY_VER(i915) < 12 && i915->display.sagv.block_time_us) result->can_sagv = latency >= i915->display.sagv.block_time_us;