Commit 8565c502 authored by Drew Davenport's avatar Drew Davenport Committed by Rodrigo Vivi

drm/i915/display: Check source height is > 0

The error message suggests that the height of the src rect must be at
least 1. Reject source with height of 0.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarDrew Davenport <ddavenport@chromium.org>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221226225246.1.I15dff7bb5a0e485c862eae61a69096caf12ef29f@changeid
(cherry picked from commit 0fe76b19)
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 5dc4c995
...@@ -1627,7 +1627,7 @@ static int skl_check_main_surface(struct intel_plane_state *plane_state) ...@@ -1627,7 +1627,7 @@ static int skl_check_main_surface(struct intel_plane_state *plane_state)
u32 offset; u32 offset;
int ret; int ret;
if (w > max_width || w < min_width || h > max_height) { if (w > max_width || w < min_width || h > max_height || h < 1) {
drm_dbg_kms(&dev_priv->drm, drm_dbg_kms(&dev_priv->drm,
"requested Y/RGB source size %dx%d outside limits (min: %dx1 max: %dx%d)\n", "requested Y/RGB source size %dx%d outside limits (min: %dx1 max: %dx%d)\n",
w, h, min_width, max_width, max_height); w, h, min_width, max_width, max_height);
......
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