diff options
| author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2025-10-10 00:13:08 +0300 |
|---|---|---|
| committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2025-10-28 23:01:18 +0200 |
| commit | 057ec016636b2a76dc10dd7d3dd186ed6809ccdb (patch) | |
| tree | e471dc078ba1eff75cc2e470b049ea99bb539e9d | |
| parent | 299843cd7b907f55aa8c4f1affe7ec5cf53be691 (diff) | |
| download | linux-057ec016636b2a76dc10dd7d3dd186ed6809ccdb.tar.gz linux-057ec016636b2a76dc10dd7d3dd186ed6809ccdb.zip | |
drm/i915: Start checking plane min size for the chroma plane
Currently we check the plane min size only for the Y plane.
Extend the check to the CbCr plane as well.
This will also allow us to remove the planar format check from
icl_plane_min_width() since the +2 on the CbCr plane is equivalent
to +4 on the Y plane. I suspect this approach actually models the
hardware issue more accurately.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20251009211313.30234-5-ville.syrjala@linux.intel.com
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
| -rw-r--r-- | drivers/gpu/drm/i915/display/skl_universal_plane.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c index 34b193d56763..c657565a6b91 100644 --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c @@ -401,17 +401,8 @@ static int icl_plane_min_width(const struct drm_framebuffer *fb, int color_plane, unsigned int rotation) { - int min_width; - - min_width = 16 / fb->format->cpp[color_plane]; - /* Wa_14011264657, Wa_14011050563: gen11+ */ - if (intel_format_info_is_yuv_semiplanar(fb->format, fb->modifier)) - min_width += 4; - else - min_width += 2; - - return min_width; + return 16 / fb->format->cpp[color_plane] + 2; } static int xe3_plane_max_width(const struct drm_framebuffer *fb, @@ -2071,6 +2062,7 @@ static int skl_check_nv12_aux_surface(struct intel_plane_state *plane_state) int uv_plane = 1; int ccs_plane = intel_fb_is_ccs_modifier(fb->modifier) ? skl_main_to_aux_plane(fb, uv_plane) : 0; + int min_width = intel_plane_min_width(plane, fb, uv_plane, rotation); int max_width = intel_plane_max_width(plane, fb, uv_plane, rotation); int max_height = intel_plane_max_height(plane, fb, uv_plane, rotation); int x = plane_state->uapi.src.x1 >> 17; @@ -2080,11 +2072,11 @@ static int skl_check_nv12_aux_surface(struct intel_plane_state *plane_state) u32 offset; /* FIXME not quite sure how/if these apply to the chroma plane */ - if (w > max_width || h > max_height) { + if (w > max_width || w < min_width || h > max_height || h < 1) { drm_dbg_kms(display->drm, - "[PLANE:%d:%s] CbCr source size %dx%d too big (limit %dx%d)\n", + "[PLANE:%d:%s] requested CbCr source size %dx%d outside limits (min: %dx1 max: %dx%d)\n", plane->base.base.id, plane->base.name, - w, h, max_width, max_height); + w, h, min_width, max_width, max_height); return -EINVAL; } |
