All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/overlay: Remove redundant drm_rect_visible() use
@ 2023-03-24 14:25 ` Arthur Grillo
  0 siblings, 0 replies; 6+ messages in thread
From: Arthur Grillo @ 2023-03-24 14:25 UTC (permalink / raw)
  To: intel-gfx, dri-devel
  Cc: tvrtko.ursulin, tales.aparecida, lucas.demarchi, mairacanal,
	rodrigo.vivi, andrealmeid, 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] 6+ messages in thread

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

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.