diff options
author | Arthur Grillo <[email protected]> | 2023-03-25 14:27:19 -0300 |
---|---|---|
committer | Ville Syrjälä <[email protected]> | 2024-03-04 13:00:26 +0200 |
commit | 711c487ca4b94582e6ce2f301c62801646f28749 (patch) | |
tree | 2775cf5f6785eac6a627cfb2f024ea5b0646e031 | |
parent | d10612f8303fab350d82f8b7d5793683af50ee3c (diff) |
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 <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_overlay.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_overlay.c b/drivers/gpu/drm/i915/display/intel_overlay.c index 2b1392d5a902..1c2099ed5514 100644 --- a/drivers/gpu/drm/i915/display/intel_overlay.c +++ b/drivers/gpu/drm/i915/display/intel_overlay.c @@ -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; |