]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Ensure damage clip area is within pipe area
authorJouni Högander <jouni.hogander@intel.com>
Fri, 13 May 2022 14:28:11 +0000 (17:28 +0300)
committerJosé Roberto de Souza <jose.souza@intel.com>
Mon, 16 May 2022 12:47:11 +0000 (05:47 -0700)
commit233a91eae19c1ed6792cda99106fd15348120729
treee17d4df10b2f5ccb42e7b3f22c4fecced21cd6e7
parentbd7298e3ccc269f6dd3f52545c549c62a6f3e13d
drm/i915: Ensure damage clip area is within pipe area

Current update area calculation is not handling situation where
e.g. cursor plane is fully or partially outside pipe area.

Fix this by checking damage area against pipe_src area using
drm_rect_intersect.

v2: Set x1 and x2 in damaged_area initialization
v3: Move drm_rect_intersect into clip_area_update
v4: draw_area -> pipe_src

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5440
Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: Mika Kahola <mika.kahola@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220513142811.779331-3-jouni.hogander@intel.com
drivers/gpu/drm/i915/display/intel_psr.c