drm/i915/overlay: Remove redundant drm_rect_visible() use

The drm_rect_intersect() already returns if the intersection is visible
or not, so the use of drm_rect_visible() is duplicate.

Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230325172719.92102-1-arthurgrillo@riseup.net
This commit is contained in:
Arthur Grillo
2023-03-25 14:27:19 -03:00
committed by Ville Syrjälä
parent d10612f830
commit 711c487ca4

View File

@@ -972,10 +972,11 @@ static int check_overlay_dst(struct intel_overlay *overlay,
rec->dst_width, rec->dst_height);
clipped = req;
drm_rect_intersect(&clipped, &crtc_state->pipe_src);
if (!drm_rect_visible(&clipped) ||
!drm_rect_equals(&clipped, &req))
if (!drm_rect_intersect(&clipped, &crtc_state->pipe_src))
return -EINVAL;
if (!drm_rect_equals(&clipped, &req))
return -EINVAL;
return 0;