drm/mediatek: Use drm_atomic_helper_wait_for_fences
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 14 Jun 2019 20:36:00 +0000 (22:36 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 25 Jun 2019 16:12:57 +0000 (18:12 +0200)
commit2a11d881255ba71ed13602a979250bdad7465889
tree82247119279632de90c5bc7bcd25a4b4125ed0c1
parent0fbbd27e5ab18a0d2bd91e63ec9d16349d42d5bf
drm/mediatek: Use drm_atomic_helper_wait_for_fences

If we use the gem fb helper as the prepare_fb hook, plus the
drm_prime.c import helpers now automatically setting obj->resv, we can
use the shared helpers to wait for fences instead of rolling our own.
Note that this relies on mtk setting drm_fb->obj, which is already
done in mtk_drm_framebuffer_init().

Aside: Probably can use the default commit_tail with this again, but I
didn't check for that.

Reviewed-by: CK Hu <ck.hu@mediatek.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: CK Hu <ck.hu@mediatek.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-45-daniel.vetter@ffwll.ch
drivers/gpu/drm/mediatek/mtk_drm_drv.c
drivers/gpu/drm/mediatek/mtk_drm_fb.c
drivers/gpu/drm/mediatek/mtk_drm_fb.h
drivers/gpu/drm/mediatek/mtk_drm_plane.c