From 4c398f50a1fbc94d0c3615f284244dbb19e06add Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Thu, 8 Apr 2021 16:01:38 +0200 Subject: drm/nouveau: Use drm_gem_ttm_dumb_map_offset() Nouveau now uses drm_gem_ttm_dumb_map_offset() to implement struct drm_driver.dumb_map_offset. Signed-off-by: Thomas Zimmermann Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210408140139.27731-4-tzimmermann@suse.de --- drivers/gpu/drm/nouveau/nouveau_display.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'drivers/gpu/drm/nouveau/nouveau_display.c') diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index dac02c7be54d..14101bd2a0ff 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -838,21 +838,3 @@ nouveau_display_dumb_create(struct drm_file *file_priv, struct drm_device *dev, drm_gem_object_put(&bo->bo.base); return ret; } - -int -nouveau_display_dumb_map_offset(struct drm_file *file_priv, - struct drm_device *dev, - uint32_t handle, uint64_t *poffset) -{ - struct drm_gem_object *gem; - - gem = drm_gem_object_lookup(file_priv, handle); - if (gem) { - struct nouveau_bo *bo = nouveau_gem_object(gem); - *poffset = drm_vma_node_offset_addr(&bo->bo.base.vma_node); - drm_gem_object_put(gem); - return 0; - } - - return -ENOENT; -} -- cgit v1.2.3