Merge v5.3-rc1 into drm-misc-next
[linux-2.6-block.git] / drivers / gpu / drm / msm / disp / dpu1 / dpu_plane.c
index 45bfac9e3af7bc90b93fc88635effcb3efc7a03b..8cf0b8a4ed0345509c72e02a3161893405089191 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <drm/drm_damage_helper.h>
 #include <drm/drm_atomic_uapi.h>
+#include <drm/drm_gem_framebuffer_helper.h>
 
 #include "msm_drv.h"
 #include "dpu_kms.h"
@@ -764,8 +765,6 @@ static int dpu_plane_prepare_fb(struct drm_plane *plane,
        struct dpu_plane *pdpu = to_dpu_plane(plane);
        struct dpu_plane_state *pstate = to_dpu_plane_state(new_state);
        struct dpu_hw_fmt_layout layout;
-       struct drm_gem_object *obj;
-       struct dma_fence *fence;
        struct dpu_kms *kms = _dpu_plane_get_kms(&pdpu->base);
        int ret;
 
@@ -782,10 +781,7 @@ static int dpu_plane_prepare_fb(struct drm_plane *plane,
         *       we can use msm_atomic_prepare_fb() instead of doing the
         *       implicit fence and fb prepare by hand here.
         */
-       obj = msm_framebuffer_bo(new_state->fb, 0);
-       fence = reservation_object_get_excl_rcu(obj->resv);
-       if (fence)
-               drm_atomic_set_fence_for_plane(new_state, fence);
+       drm_gem_fb_prepare_fb(plane, new_state);
 
        if (pstate->aspace) {
                ret = msm_framebuffer_prepare(new_state->fb,