[PATCH v2] drm: rcar-du: track dma-buf fences

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We have to check dma-buf reservation objects
of our framebuffers before we use them.
Otherwise, another driver might be writing
on the same buffer which we are using.
This would cause visible tearing effects
on display.

We can use existing atomic helper functions
to solve this problem.

v2 changes:
- Remove drm_atomic_helper_wait_for_fences()
  call in rcar_du_kms.c. The commit_tail()
  function in drm_atomic_helper.c, which calls
  our atomic_commit_tail() implementation,
  already calls it.
- Remove proposed rcar_du_vsp_set_fence_for_plane()
  function. Call drm_gem_fb_prepare_fb(), which
  calls drm_atomic_set_fence_for_plane().

Signed-off-by: Emre Ucan <eucan@xxxxxxxxxxxxxx>
---
 drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
index 2c260c3..fbad616 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
@@ -18,6 +18,7 @@
 #include <drm/drm_fb_cma_helper.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_plane_helper.h>
+#include <drm/drm_gem_framebuffer_helper.h>
 
 #include <linux/bitops.h>
 #include <linux/dma-mapping.h>
@@ -237,7 +238,7 @@ static int rcar_du_vsp_plane_prepare_fb(struct drm_plane *plane,
 		}
 	}
 
-	return 0;
+	return drm_gem_fb_prepare_fb(plane, state);
 
 fail:
 	while (i--) {
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux