aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew Davenport <[email protected]>2022-12-26 22:53:24 -0700
committerVille Syrjälä <[email protected]>2023-01-12 20:17:37 +0200
commit0fe76b198d482b41771a8d17b45fb726d13083cf (patch)
tree260d73bf7fad74ecdbef0708eb97854ee0c9e158
parentf71c9b7bc35ff7c1fb68d114903876eec658439b (diff)
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: [email protected] Signed-off-by: Drew Davenport <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20221226225246.1.I15dff7bb5a0e485c862eae61a69096caf12ef29f@changeid
-rw-r--r--drivers/gpu/drm/i915/display/skl_universal_plane.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
index 76490cc59d8f..7d07fa3123ec 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
@@ -1627,7 +1627,7 @@ static int skl_check_main_surface(struct intel_plane_state *plane_state)
u32 offset;
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,
"requested Y/RGB source size %dx%d outside limits (min: %dx1 max: %dx%d)\n",
w, h, min_width, max_width, max_height);