Commit 66ab7005 authored by Daniel Vetter's avatar Daniel Vetter

drm/vc4: Use drm_gem_fb_prepare_fb

vc4 has switched to using drm_fb->obj[], so we can just use the helper
unchanged.

v2: Make it compile ... oops.

Cc: Eric Anholt <eric@anholt.net>
Cc: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: default avatarEric Anholt <eric@anholt.net>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Cc: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20190625204208.5614-4-daniel.vetter@ffwll.ch
parent e78ad765
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <drm/drm_fb_cma_helper.h> #include <drm/drm_fb_cma_helper.h>
#include <drm/drm_plane_helper.h> #include <drm/drm_plane_helper.h>
#include <drm/drm_atomic_uapi.h> #include <drm/drm_atomic_uapi.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include "uapi/drm/vc4_drm.h" #include "uapi/drm/vc4_drm.h"
#include "vc4_drv.h" #include "vc4_drv.h"
...@@ -1126,7 +1127,6 @@ static int vc4_prepare_fb(struct drm_plane *plane, ...@@ -1126,7 +1127,6 @@ static int vc4_prepare_fb(struct drm_plane *plane,
struct drm_plane_state *state) struct drm_plane_state *state)
{ {
struct vc4_bo *bo; struct vc4_bo *bo;
struct dma_fence *fence;
int ret; int ret;
if (!state->fb) if (!state->fb)
...@@ -1134,8 +1134,7 @@ static int vc4_prepare_fb(struct drm_plane *plane, ...@@ -1134,8 +1134,7 @@ static int vc4_prepare_fb(struct drm_plane *plane,
bo = to_vc4_bo(&drm_fb_cma_get_gem_obj(state->fb, 0)->base); bo = to_vc4_bo(&drm_fb_cma_get_gem_obj(state->fb, 0)->base);
fence = reservation_object_get_excl_rcu(bo->base.base.resv); drm_gem_fb_prepare_fb(plane, state);
drm_atomic_set_fence_for_plane(state, fence);
if (plane->state->fb == state->fb) if (plane->state->fb == state->fb)
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment