]> git.baikalelectronics.ru Git - kernel.git/commit
drm/v3d: Fix prime imports of buffers from other drivers.
authorEric Anholt <eric@anholt.net>
Wed, 28 Nov 2018 23:09:27 +0000 (15:09 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 30 Nov 2018 21:47:34 +0000 (13:47 -0800)
commit6dcef2d22a0c16e0b70a7bff99330dfe5a02666a
treeb3129f3cf471592d619d7cce13f400b95a93053a
parentec1a395be486e3f27b0be8276132f524afc1b9c1
drm/v3d: Fix prime imports of buffers from other drivers.

v3d_bo_get_pages() checks this to decide to map the imported buffer
instead of the backing shmem file.  The caller was about to set this
value anyway, and there's no error path in between.  Ideally we
wouldn't even allocate the shmem file for our imports, but that's a
more invasive fix.

Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: b0214c68b650 ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+")
Link: https://patchwork.freedesktop.org/patch/msgid/20181128230927.10951-3-eric@anholt.net
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Dave Emett <david.emett@broadcom.com>
drivers/gpu/drm/v3d/v3d_bo.c