mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 23:14:31 +08:00
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
This commit is contained in:
parent
f71c9b7bc3
commit
0fe76b198d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user