Skip to content

Commit 608a7d3

Browse files
committed
drm/i915/wm: Use drm_get_format_info() in SKL+ cursor DDB allocation
Replace the technically inaccurate drm_format_info() with the accurate drm_get_format_info() in the SKL+ cursor DDB allocation code. Since we're only interested in the linear modifier here, the two functions do actually return the same information. But let's not use drm_format_info() to avoid setting a bad example. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20251107181126.5743-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
1 parent f5255f9 commit 608a7d3

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -635,15 +635,21 @@ 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_format_info *info;
638639
struct skl_wm_level wm = {};
639640
int ret, min_ddb_alloc = 0;
640641
struct skl_wm_params wp;
642+
u64 modifier;
643+
u32 format;
641644
int level;
642645

646+
format = DRM_FORMAT_ARGB8888;
647+
modifier = DRM_FORMAT_MOD_LINEAR;
648+
649+
info = drm_get_format_info(display->drm, format, modifier);
650+
643651
ret = skl_compute_wm_params(crtc_state, 256,
644-
drm_format_info(DRM_FORMAT_ARGB8888),
645-
DRM_FORMAT_MOD_LINEAR,
646-
DRM_MODE_ROTATE_0,
652+
info, modifier, DRM_MODE_ROTATE_0,
647653
crtc_state->pixel_rate, &wp, 0, 0);
648654
drm_WARN_ON(display->drm, ret);
649655

0 commit comments

Comments
 (0)