Fixes a build failure with msm. This change was supposed to be part of commit 49a3f51dfeee ("drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends"), but msm was forgotten.
Signed-off-by: Thomas Zimmermann <tzimmerm...@suse.de> Fixes: 49a3f51dfeee ("drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends") Cc: Thomas Zimmermann <tzimmerm...@suse.de> Cc: Christian König <christian.koe...@amd.com> Cc: David Airlie <airl...@linux.ie> Cc: Daniel Vetter <dan...@ffwll.ch> Cc: Maarten Lankhorst <maarten.lankho...@linux.intel.com> Cc: Maxime Ripard <mrip...@kernel.org> Cc: Dave Airlie <airl...@redhat.com> Cc: Lucas Stach <l.st...@pengutronix.de> Cc: Russell King <linux+etna...@armlinux.org.uk> Cc: Christian Gmeiner <christian.gmei...@gmail.com> Cc: Qiang Yu <yuq...@gmail.com> Cc: Ben Skeggs <bske...@redhat.com> Cc: Rob Herring <r...@kernel.org> Cc: Tomeu Vizoso <tomeu.viz...@collabora.com> Cc: Steven Price <steven.pr...@arm.com> Cc: Alyssa Rosenzweig <alyssa.rosenzw...@collabora.com> Cc: Gerd Hoffmann <kra...@redhat.com> Cc: Alex Deucher <alexander.deuc...@amd.com> Cc: "Christian König" <christian.koe...@amd.com> Cc: Sandy Huang <h...@rock-chips.com> Cc: "Heiko Stübner" <he...@sntech.de> Cc: Hans de Goede <hdego...@redhat.com> Cc: Sean Paul <s...@poorly.run> Cc: Eric Anholt <e...@anholt.net> Cc: Rodrigo Siqueira <rodrigosiqueiram...@gmail.com> Cc: Melissa Wen <melissa....@gmail.com> Cc: Haneen Mohammed <hamohammed...@gmail.com> Cc: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Cc: Sumit Semwal <sumit.sem...@linaro.org> Cc: Emil Velikov <emil.veli...@collabora.com> Cc: Luben Tuikov <luben.tui...@amd.com> Cc: Marek Szyprowski <m.szyprow...@samsung.com> Cc: Arunpravin <apane...@amd.com> Cc: Huang Rui <ray.hu...@amd.com> Cc: Madhav Chauhan <madhav.chau...@amd.com> Cc: Jason Gunthorpe <j...@ziepe.ca> Cc: Sam Ravnborg <s...@ravnborg.org> Cc: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Qinglang Miao <miaoqingl...@huawei.com> Cc: dri-de...@lists.freedesktop.org Cc: etna...@lists.freedesktop.org Cc: l...@lists.freedesktop.org Cc: nouv...@lists.freedesktop.org Cc: virtualizat...@lists.linux-foundation.org Cc: spice-de...@lists.freedesktop.org Cc: amd-gfx@lists.freedesktop.org Cc: linux-arm-ker...@lists.infradead.org Cc: linux-rockc...@lists.infradead.org Cc: xen-de...@lists.xenproject.org --- drivers/gpu/drm/msm/msm_drv.h | 4 ++-- drivers/gpu/drm/msm/msm_gem_prime.c | 13 ++++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h index c45789f36e48..a6aef687bc6e 100644 --- a/drivers/gpu/drm/msm/msm_drv.h +++ b/drivers/gpu/drm/msm/msm_drv.h @@ -295,8 +295,8 @@ int msm_gem_dumb_create(struct drm_file *file, struct drm_device *dev, int msm_gem_dumb_map_offset(struct drm_file *file, struct drm_device *dev, uint32_t handle, uint64_t *offset); struct sg_table *msm_gem_prime_get_sg_table(struct drm_gem_object *obj); -void *msm_gem_prime_vmap(struct drm_gem_object *obj); -void msm_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr); +int msm_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map); +void msm_gem_prime_vunmap(struct drm_gem_object *obj, struct dma_buf_map *map); int msm_gem_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma); struct drm_gem_object *msm_gem_prime_import_sg_table(struct drm_device *dev, struct dma_buf_attachment *attach, struct sg_table *sg); diff --git a/drivers/gpu/drm/msm/msm_gem_prime.c b/drivers/gpu/drm/msm/msm_gem_prime.c index 515ef80816a0..9880348a4dc7 100644 --- a/drivers/gpu/drm/msm/msm_gem_prime.c +++ b/drivers/gpu/drm/msm/msm_gem_prime.c @@ -22,12 +22,19 @@ struct sg_table *msm_gem_prime_get_sg_table(struct drm_gem_object *obj) return drm_prime_pages_to_sg(obj->dev, msm_obj->pages, npages); } -void *msm_gem_prime_vmap(struct drm_gem_object *obj) +int msm_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map) { - return msm_gem_get_vaddr(obj); + void *vaddr; + + vaddr = msm_gem_get_vaddr(obj); + if (IS_ERR(vaddr)) + return PTR_ERR(vaddr); + dma_buf_map_set_vaddr(map, vaddr); + + return 0; } -void msm_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr) +void msm_gem_prime_vunmap(struct drm_gem_object *obj, struct dma_buf_map *map) { msm_gem_put_vaddr(obj); } -- 2.29.2 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx