aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_fbdev_dma.c
diff options
context:
space:
mode:
authorThomas Zimmermann <[email protected]>2023-06-13 14:51:33 +0000
committerThomas Zimmermann <[email protected]>2023-06-19 11:56:40 +0000
commit0adec22702d497385dbdc52abb165f379a00efba (patch)
treea9f34a922c354670898fb3716eef7f9f5ee94db4 /drivers/gpu/drm/drm_fbdev_dma.c
parentdrm/msm: Initialize mmap offset after constructing the buffer object (diff)
downloadkernel-0adec22702d497385dbdc52abb165f379a00efba.tar.gz
kernel-0adec22702d497385dbdc52abb165f379a00efba.zip
drm: Remove struct drm_driver.gem_prime_mmap
All drivers initialize this field with drm_gem_prime_mmap(). Call the function directly and remove the field. Simplifies the code and resolves a long-standing TODO item. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/drm_fbdev_dma.c')
-rw-r--r--drivers/gpu/drm/drm_fbdev_dma.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_fbdev_dma.c b/drivers/gpu/drm/drm_fbdev_dma.c
index d86773fa8ab0..8217f1ddc007 100644
--- a/drivers/gpu/drm/drm_fbdev_dma.c
+++ b/drivers/gpu/drm/drm_fbdev_dma.c
@@ -54,12 +54,8 @@ static void drm_fbdev_dma_fb_destroy(struct fb_info *info)
static int drm_fbdev_dma_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
{
struct drm_fb_helper *fb_helper = info->par;
- struct drm_device *dev = fb_helper->dev;
-
- if (drm_WARN_ON_ONCE(dev, !fb_helper->dev->driver->gem_prime_mmap))
- return -ENODEV;
- return fb_helper->dev->driver->gem_prime_mmap(fb_helper->buffer->gem, vma);
+ return drm_gem_prime_mmap(fb_helper->buffer->gem, vma);
}
static const struct fb_ops drm_fbdev_dma_fb_ops = {