Message ID | 20230512084152.31233-8-tzimmermann@suse.de (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | drm/fbdev: Remove DRM's helpers for fbdev I/O | expand |
Hi Thomas,
kernel test robot noticed the following build errors:
[auto build test ERROR on 451e49cfbaa90720149e63f4fa9c7824013c783d]
url: https://github.com/intel-lab-lkp/linux/commits/Thomas-Zimmermann/drm-armada-Use-regular-fbdev-I-O-helpers/20230512-164432
base: 451e49cfbaa90720149e63f4fa9c7824013c783d
patch link: https://lore.kernel.org/r/20230512084152.31233-8-tzimmermann%40suse.de
patch subject: [Intel-gfx] [PATCH 07/11] drm/omapdrm: Use regular fbdev I/O helpers
config: arm-allmodconfig (https://download.01.org/0day-ci/archive/20230513/202305130058.VuW3nBPS-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/f9113ec6815b748d0b917f78527582b8b08deb40
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Thomas-Zimmermann/drm-armada-Use-regular-fbdev-I-O-helpers/20230512-164432
git checkout f9113ec6815b748d0b917f78527582b8b08deb40
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/gpu/drm/omapdrm/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305130058.VuW3nBPS-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/omapdrm/omap_fbdev.c:306:6: error: redefinition of 'omap_fbdev_setup'
306 | void omap_fbdev_setup(struct drm_device *dev)
| ^~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/omapdrm/omap_fbdev.c:19:
drivers/gpu/drm/omapdrm/omap_fbdev.h:17:20: note: previous definition of 'omap_fbdev_setup' with type 'void(struct drm_device *)'
17 | static inline void omap_fbdev_setup(struct drm_device *dev)
| ^~~~~~~~~~~~~~~~
vim +/omap_fbdev_setup +306 drivers/gpu/drm/omapdrm/omap_fbdev.c
9e69bcd88e4593 Thomas Zimmermann 2023-04-03 305
9e69bcd88e4593 Thomas Zimmermann 2023-04-03 @306 void omap_fbdev_setup(struct drm_device *dev)
diff --git a/drivers/gpu/drm/omapdrm/Kconfig b/drivers/gpu/drm/omapdrm/Kconfig index 76ded1568bd0..7f7efc302752 100644 --- a/drivers/gpu/drm/omapdrm/Kconfig +++ b/drivers/gpu/drm/omapdrm/Kconfig @@ -4,6 +4,7 @@ config DRM_OMAP depends on DRM && OF depends on ARCH_OMAP2PLUS select DRM_KMS_HELPER + select DRM_OMAP_FBDEV_EMULATION if DRM_FBDEV_EMULATION select VIDEOMODE_HELPERS select HDMI default n @@ -130,3 +131,11 @@ config OMAP2_DSS_SLEEP_AFTER_VENC_RESET disable the sleep if it doesn't cause problems on your platform. endif + +config DRM_OMAP_FBDEV_EMULATION + tristate + depends on DRM_OMAP + select FB_SYS_COPYAREA + select FB_SYS_FILLRECT + select FB_SYS_FOPS + select FB_SYS_IMAGEBLIT diff --git a/drivers/gpu/drm/omapdrm/Makefile b/drivers/gpu/drm/omapdrm/Makefile index 710b4e0abcf0..917fcafc77c1 100644 --- a/drivers/gpu/drm/omapdrm/Makefile +++ b/drivers/gpu/drm/omapdrm/Makefile @@ -17,7 +17,7 @@ omapdrm-y := omap_drv.o \ omap_dmm_tiler.o \ tcm-sita.o -omapdrm-$(CONFIG_DRM_FBDEV_EMULATION) += omap_fbdev.o +omapdrm-$(CONFIG_DRM_OMAP_FBDEV_EMULATION) += omap_fbdev.o omapdrm-y += dss/base.o dss/output.o dss/dss.o dss/dispc.o \ dss/dispc_coefs.o dss/pll.o dss/video-pll.o diff --git a/drivers/gpu/drm/omapdrm/omap_debugfs.c b/drivers/gpu/drm/omapdrm/omap_debugfs.c index a3d470468e5b..796d20d010c0 100644 --- a/drivers/gpu/drm/omapdrm/omap_debugfs.c +++ b/drivers/gpu/drm/omapdrm/omap_debugfs.c @@ -42,7 +42,7 @@ static int mm_show(struct seq_file *m, void *arg) return 0; } -#ifdef CONFIG_DRM_FBDEV_EMULATION +#ifdef CONFIG_DRM_OMAP_FBDEV_EMULATION static int fb_show(struct seq_file *m, void *arg) { struct drm_info_node *node = (struct drm_info_node *) m->private; @@ -71,7 +71,7 @@ static int fb_show(struct seq_file *m, void *arg) static struct drm_info_list omap_debugfs_list[] = { {"gem", gem_show, 0}, {"mm", mm_show, 0}, -#ifdef CONFIG_DRM_FBDEV_EMULATION +#ifdef CONFIG_DRM_OMAP_FBDEV_EMULATION {"fb", fb_show, 0}, #endif }; diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c index b950e93b3846..55a65b81ccdc 100644 --- a/drivers/gpu/drm/omapdrm/omap_fbdev.c +++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c @@ -4,6 +4,8 @@ * Author: Rob Clark <rob@ti.com> */ +#include <linux/fb.h> + #include <drm/drm_drv.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_fb_helper.h> @@ -103,11 +105,11 @@ static const struct fb_ops omap_fb_ops = { .fb_pan_display = omap_fbdev_pan_display, .fb_ioctl = drm_fb_helper_ioctl, - .fb_read = drm_fb_helper_sys_read, - .fb_write = drm_fb_helper_sys_write, - .fb_fillrect = drm_fb_helper_sys_fillrect, - .fb_copyarea = drm_fb_helper_sys_copyarea, - .fb_imageblit = drm_fb_helper_sys_imageblit, + .fb_read = fb_sys_read, + .fb_write = fb_sys_write, + .fb_fillrect = sys_fillrect, + .fb_copyarea = sys_copyarea, + .fb_imageblit = sys_imageblit, .fb_destroy = omap_fbdev_fb_destroy, }; diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.h b/drivers/gpu/drm/omapdrm/omap_fbdev.h index 74c691a8d45f..ee65bc05f34e 100644 --- a/drivers/gpu/drm/omapdrm/omap_fbdev.h +++ b/drivers/gpu/drm/omapdrm/omap_fbdev.h @@ -11,7 +11,7 @@ struct drm_device; -#ifdef CONFIG_DRM_FBDEV_EMULATION +#ifdef CONFIG_DRM_OMAP_FBDEV_EMULATION void omap_fbdev_setup(struct drm_device *dev); #else static inline void omap_fbdev_setup(struct drm_device *dev) diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c index 6b58a5bb7b44..96e8135f127b 100644 --- a/drivers/gpu/drm/omapdrm/omap_gem.c +++ b/drivers/gpu/drm/omapdrm/omap_gem.c @@ -634,7 +634,7 @@ int omap_gem_dumb_map_offset(struct drm_file *file, struct drm_device *dev, return ret; } -#ifdef CONFIG_DRM_FBDEV_EMULATION +#ifdef CONFIG_DRM_OMAP_FBDEV_EMULATION /* Set scrolling position. This allows us to implement fast scrolling * for console. * @@ -1067,7 +1067,7 @@ void omap_gem_put_sg(struct drm_gem_object *obj, struct sg_table *sgt) omap_gem_unpin(obj); } -#ifdef CONFIG_DRM_FBDEV_EMULATION +#ifdef CONFIG_DRM_OMAP_FBDEV_EMULATION /* * Get kernel virtual address for CPU access.. this more or less only * exists for omap_fbdev.
Use the regular fbdev helpers for framebuffer I/O instead of DRM's helpers. Omapdrm does not use damage handling, so DRM's fbdev helpers are mere wrappers around the fbdev code. Add CONFIG_DRM_OMAP_FBDEV_EMULATION to select the necessary Kconfig options automatically. Make fbdev emulation depend on the new config option. By using fbdev helpers directly within each DRM fbdev emulation, we can eventually remove DRM's wrapper functions entirely. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Tomi Valkeinen <tomba@kernel.org> --- drivers/gpu/drm/omapdrm/Kconfig | 9 +++++++++ drivers/gpu/drm/omapdrm/Makefile | 2 +- drivers/gpu/drm/omapdrm/omap_debugfs.c | 4 ++-- drivers/gpu/drm/omapdrm/omap_fbdev.c | 12 +++++++----- drivers/gpu/drm/omapdrm/omap_fbdev.h | 2 +- drivers/gpu/drm/omapdrm/omap_gem.c | 4 ++-- 6 files changed, 22 insertions(+), 11 deletions(-)