Skip to content

Commit 8565c50

Browse files
ddavenport-chromiumrodrigovivi
authored andcommitted
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: Drew Davenport <ddavenport@chromium.org> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221226225246.1.I15dff7bb5a0e485c862eae61a69096caf12ef29f@changeid (cherry picked from commit 0fe76b1) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
1 parent 5dc4c99 commit 8565c50

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1627,7 +1627,7 @@ static int skl_check_main_surface(struct intel_plane_state *plane_state)
16271627
u32 offset;
16281628
int ret;
16291629

1630-
if (w > max_width || w < min_width || h > max_height) {
1630+
if (w > max_width || w < min_width || h > max_height || h < 1) {
16311631
drm_dbg_kms(&dev_priv->drm,
16321632
"requested Y/RGB source size %dx%d outside limits (min: %dx1 max: %dx%d)\n",
16331633
w, h, min_width, max_width, max_height);

0 commit comments

Comments
 (0)