drm/mediatek: use correct device to import PRIME buffers
authorAlexandre Courbot <acourbot@chromium.org>
Mon, 29 Jul 2019 05:33:34 +0000 (14:33 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Sep 2019 09:33:44 +0000 (10:33 +0100)
commitc9f595453bc3a9e9126d7f68bc0de29e2a98eda4
treef12690b62c97f7ef0e571bcef38ab1a2d69779d0
parenta54fa5dff8cdb415757faadb4378d4de72513bfc
drm/mediatek: use correct device to import PRIME buffers

[ Upstream commit 4c6f3196e6ea111c456c6086dc3f57d4706b0b2d ]

PRIME buffers should be imported using the DMA device. To this end, use
a custom import function that mimics drm_gem_prime_import_dev(), but
passes the correct device.

Fixes: 119f5173628aa ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.")
Signed-off-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: CK Hu <ck.hu@mediatek.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/mediatek/mtk_drm_drv.c