From: Emre Ucan Date: Mon, 30 Apr 2018 12:02:04 +0000 (+0200) Subject: drm: rcar-du: Track dma-buf fences X-Git-Tag: v4.18-rc1~128^2~18^2 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=b06078de418d6f77c81aa74516f787663f51a262;p=linux.git drm: rcar-du: Track dma-buf fences 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. Signed-off-by: Emre Ucan Reviewed-by: Laurent Pinchart Reviewed-by: Daniel Vetter Signed-off-by: Laurent Pinchart --- diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c index 4a01a99a4674..3badf02ab24a 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -237,6 +238,10 @@ static int rcar_du_vsp_plane_prepare_fb(struct drm_plane *plane, } } + ret = drm_gem_fb_prepare_fb(plane, state); + if (ret) + goto fail; + return 0; fail: