Skip to content

Commit e1d49d7

Browse files
author
Thomas Zimmermann
committed
drm/tegra: Use regular fbdev I/O helpers
Use the regular fbdev helpers for framebuffer I/O instead of DRM's helpers. Tegra does not use damage handling, so DRM's fbdev helpers are mere wrappers around the fbdev code. By using fbdev helpers directly within each DRM fbdev emulation, we can eventually remove DRM's wrapper functions entirely. v4: * use initializer macros for struct fb_ops v2: * use FB_SYS_HELPERS option Signed-off-by: Thomas Zimmermann <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Mikko Perttunen <[email protected]> Cc: Jonathan Hunter <[email protected]> Acked-by: Thierry Reding <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 95da53d commit e1d49d7

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

drivers/gpu/drm/tegra/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ config DRM_TEGRA
1212
select DRM_KMS_HELPER
1313
select DRM_MIPI_DSI
1414
select DRM_PANEL
15+
select FB_SYS_HELPERS if DRM_FBDEV_EMULATION
1516
select TEGRA_HOST1X
1617
select INTERCONNECT
1718
select IOMMU_IOVA

drivers/gpu/drm/tegra/fbdev.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99

1010
#include <linux/console.h>
11+
#include <linux/fb.h>
1112
#include <linux/vmalloc.h>
1213

1314
#include <drm/drm_drv.h>
@@ -58,12 +59,9 @@ static void tegra_fbdev_fb_destroy(struct fb_info *info)
5859

5960
static const struct fb_ops tegra_fb_ops = {
6061
.owner = THIS_MODULE,
62+
__FB_DEFAULT_SYS_OPS_RDWR,
6163
DRM_FB_HELPER_DEFAULT_OPS,
62-
.fb_read = drm_fb_helper_sys_read,
63-
.fb_write = drm_fb_helper_sys_write,
64-
.fb_fillrect = drm_fb_helper_sys_fillrect,
65-
.fb_copyarea = drm_fb_helper_sys_copyarea,
66-
.fb_imageblit = drm_fb_helper_sys_imageblit,
64+
__FB_DEFAULT_SYS_OPS_DRAW,
6765
.fb_mmap = tegra_fb_mmap,
6866
.fb_destroy = tegra_fbdev_fb_destroy,
6967
};

0 commit comments

Comments
 (0)