Skip to content

Commit

Permalink
drm/i915/overlay: Remove redundant drm_rect_visible() use
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Arthur Grillo authored and Ville Syrjälä committed Mar 4, 2024
1 parent d10612f commit 711c487
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/gpu/drm/i915/display/intel_overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 711c487

Please sign in to comment.