drm: omapdrm: Fix implicit dma_buf fencing
authorIvaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Wed, 5 Jan 2022 15:36:58 +0000 (17:36 +0200)
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Thu, 6 Jan 2022 13:31:33 +0000 (15:31 +0200)
commit36e195467ecca6a55fd1a9374d3109692f381fd7
treeb8fce0f482700840d67006e570764a62bc5bd703
parent59a39fcc21c56845e74bf60c1177925bb0255de4
drm: omapdrm: Fix implicit dma_buf fencing

Currently omapdrm driver does not initialize dma_buf_export_info resv
member, which leads to a new dma_resv being allocated and attached to
the exported dma_buf. This leads to the issue that fences created on
dma_buf objects imported by other drivers are ignored by omapdrm, as only
fences in gem object resv are waited on. This leads to various issues like
displaying incomplete frames.

Fix that by initializing dma_buf resv to the resv of the gem object being
exported.

Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Tested-by: Merlijn Wajer <merlijn@wizzup.org>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1641397018-29872-1-git-send-email-ivo.g.dimitrov.75@gmail.com
drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c