Commit 533a7836 authored by Juha-Pekka Heikkilä's avatar Juha-Pekka Heikkilä Committed by Lucas De Marchi

drm/i915/xe2lpd: Enable odd size and panning for planar yuv

Enable odd size and panning for planar yuv formats.

Cc: Suraj Kandpal <suraj.kandpal@intel.com>
Signed-off-by: default avatarJuha-Pekka Heikkilä <juha-pekka.heikkila@intel.com>
Reviewed-by: default avatarSuraj Kandpal <suraj.kandpal@intel.com>
Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230919192128.2045154-15-lucas.demarchi@intel.com
parent 6f35a04f
...@@ -981,6 +981,14 @@ int intel_plane_check_src_coordinates(struct intel_plane_state *plane_state) ...@@ -981,6 +981,14 @@ int intel_plane_check_src_coordinates(struct intel_plane_state *plane_state)
if (fb->format->format == DRM_FORMAT_RGB565 && rotated) { if (fb->format->format == DRM_FORMAT_RGB565 && rotated) {
hsub = 2; hsub = 2;
vsub = 2; vsub = 2;
} else if (DISPLAY_VER(i915) >= 20 &&
intel_format_info_is_yuv_semiplanar(fb->format, fb->modifier)) {
/*
* This allows NV12 and P0xx formats to have odd size and/or odd
* source coordinates on DISPLAY_VER(i915) >= 20
*/
hsub = 1;
vsub = 1;
} else { } else {
hsub = fb->format->hsub; hsub = fb->format->hsub;
vsub = fb->format->vsub; vsub = fb->format->vsub;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment