Commit 711c487c authored by Arthur Grillo's avatar Arthur Grillo Committed by Ville Syrjälä

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: default avatarArthur Grillo <arthurgrillo@riseup.net>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230325172719.92102-1-arthurgrillo@riseup.net
parent d10612f8
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment