Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915/overlay: Remove redundant drm_rect_visible() use
@ 2023-03-24 14:25 Arthur Grillo
  2023-03-24 16:45 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Arthur Grillo @ 2023-03-24 14:25 UTC (permalink / raw)
  To: intel-gfx, dri-devel
  Cc: tales.aparecida, lucas.demarchi, mairacanal, daniel, rodrigo.vivi,
	andrealmeid, airlied, Arthur Grillo

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>
---
 drivers/gpu/drm/i915/display/intel_overlay.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_overlay.c b/drivers/gpu/drm/i915/display/intel_overlay.c
index c12bdca8da9b..444d88f418c5 100644
--- a/drivers/gpu/drm/i915/display/intel_overlay.c
+++ b/drivers/gpu/drm/i915/display/intel_overlay.c
@@ -966,9 +966,8 @@ 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) ||
+	if (!drm_rect_intersect(&clipped, &crtc_state->pipe_src) ||
 	    !drm_rect_equals(&clipped, &req))
 		return -EINVAL;
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-24 23:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-24 14:25 [Intel-gfx] [PATCH] drm/i915/overlay: Remove redundant drm_rect_visible() use Arthur Grillo
2023-03-24 16:45 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-03-24 21:55 ` [Intel-gfx] [PATCH] " Ville Syrjälä
2023-03-24 23:07 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox