drm/rockchip: respect CONFIG_DRM_FBDEV_EMULATION
Subsystems (4)
PATCH 1/1 drm/rockchip: respect CONFIG_DRM_FBDEV_EMULATION
If DRM_FBDEV_EMULATION is not selected in the config then we should not setup a framebuffer console.
--- drivers/gpu/drm/rockchip/Makefile | 3 ++- drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-)
drivers/gpu/drm/rockchip/Makefile +2 -1
@@ -2,8 +2,9 @@ # Makefile for the drm device driver. This driver provides support for the # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. -rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o rockchip_drm_fbdev.o \ +rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o \ rockchip_drm_gem.o rockchip_drm_vop.o +rockchipdrm-$(CONFIG_DRM_FBDEV_EMULATION) += rockchip_drm_fbdev.o obj-$(CONFIG_ROCKCHIP_DW_HDMI) += dw_hdmi-rockchip.o obj-$(CONFIG_ROCKCHIP_DW_MIPI_DSI) += dw-mipi-dsi.o
drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h +11 -0
@@ -15,7 +15,18 @@#ifndef _ROCKCHIP_DRM_FBDEV_H#define _ROCKCHIP_DRM_FBDEV_H +#ifdef CONFIG_DRM_FBDEV_EMULATION int rockchip_drm_fbdev_init (struct drm_device *dev);void rockchip_drm_fbdev_fini (struct drm_device *dev); +#else +static inline int rockchip_drm_fbdev_init (struct drm_device *dev) +{ +return 0 ; +} + +static inline void rockchip_drm_fbdev_fini (struct drm_device *dev) +{ +} +#endif #endif /* _ROCKCHIP_DRM_FBDEV_H */
Signature · 1 line
2.7.0.226.gfe986fe
Quoted 2 lines · John Keeping
If
DRM_FBDEV_EMULATIONis not selected in the config then we should not setup a framebuffer console.
It should just magically work, and this patch here just removes a bit more dead code in the rockchip driver itself that's not needed in case fbdev emulation is disabled.
Can you please double-check this is the case and then resend with a clarified commit message?
Thanks, Daniel
Quoted 52 lines
Signed-off-by John Keeping <[email protected]>--- drivers/gpu/drm/rockchip/Makefile | 3 ++- drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-)drivers/gpu/drm/rockchip/Makefile +2
-1@@ -2,8 +2,9 @@ # Makefile for the drm device driver. This driver provides support for the # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. -rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o rockchip_drm_fbdev.o \ +rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o \ rockchip_drm_gem.o rockchip_drm_vop.o +rockchipdrm-$(CONFIG_DRM_FBDEV_EMULATION) += rockchip_drm_fbdev.o obj-$(CONFIG_ROCKCHIP_DW_HDMI) += dw_hdmi-rockchip.o obj-$(CONFIG_ROCKCHIP_DW_MIPI_DSI) += dw-mipi-dsi.odrivers/gpu/drm/rockchip/rockchip_drm_fbdev.h +11
-0@@ -15,7 +15,18 @@#ifndef _ROCKCHIP_DRM_FBDEV_H#define _ROCKCHIP_DRM_FBDEV_H +#ifdef CONFIG_DRM_FBDEV_EMULATION int rockchip_drm_fbdev_init (struct drm_device *dev);void rockchip_drm_fbdev_fini (struct drm_device *dev); +#else +static inline int rockchip_drm_fbdev_init (struct drm_device *dev) +{ +return 0 ; +} + +static inline void rockchip_drm_fbdev_fini (struct drm_device *dev) +{ +} +#endif #endif /* _ROCKCHIP_DRM_FBDEV_H */ Signature · 6 lines
2.7.0.226.gfe986fe _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 1/1 drm/rockchip: respect CONFIG_DRM_FBDEV_EMULATION
If DRM_FBDEV_EMULATION is not selected in the config then we can save a bit of space by not including the framebuffer code.
---
Quoted 10 lines · Daniel Vetter
Quoted 2 lines · John Keeping
If
DRM_FBDEV_EMULATIONis not selected in the config then we should not setup a framebuffer console.It should just magically work, and this patch here just removes a bit more dead code in the rockchip driver itself that's not needed in case fbdev emulation is disabled.
Can you please double-check this is the case and then resend with a clarified commit message?
You're right, it does work without this change, so this is just to save a bit of space when we don't need this feature.
v2:
- change commit message to clarify that this is only to remove some dead code
drivers/gpu/drm/rockchip/Makefile | 3 ++- drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-)
drivers/gpu/drm/rockchip/Makefile +2 -1
@@ -2,8 +2,9 @@ # Makefile for the drm device driver. This driver provides support for the # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. -rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o rockchip_drm_fbdev.o \ +rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o \ rockchip_drm_gem.o rockchip_drm_vop.o +rockchipdrm-$(CONFIG_DRM_FBDEV_EMULATION) += rockchip_drm_fbdev.o obj-$(CONFIG_ROCKCHIP_DW_HDMI) += dw_hdmi-rockchip.o obj-$(CONFIG_ROCKCHIP_DW_MIPI_DSI) += dw-mipi-dsi.o
drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h +11 -0
@@ -15,7 +15,18 @@#ifndef _ROCKCHIP_DRM_FBDEV_H#define _ROCKCHIP_DRM_FBDEV_H +#ifdef CONFIG_DRM_FBDEV_EMULATION int rockchip_drm_fbdev_init (struct drm_device *dev);void rockchip_drm_fbdev_fini (struct drm_device *dev); +#else +static inline int rockchip_drm_fbdev_init (struct drm_device *dev) +{ +return 0 ; +} + +static inline void rockchip_drm_fbdev_fini (struct drm_device *dev) +{ +} +#endif #endif /* _ROCKCHIP_DRM_FBDEV_H */
Signature · 1 line
2.7.0.226.gfe986fe
Mark yao
AppliedQuoted 55 lines · John Keeping
If
DRM_FBDEV_EMULATIONis not selected in the config then we can save a bit of space by not including the framebuffer code.Signed-off-by John Keeping <[email protected]>---
Quoted 9 lines · Daniel Vetter
Quoted 2 lines · John Keeping
If
DRM_FBDEV_EMULATIONis not selected in the config then we should not setup a framebuffer console.It should just magically work, and this patch here just removes a bit more dead code in the rockchip driver itself that's not needed in case fbdev emulation is disabled.
Can you please double-check this is the case and then resend with a clarified commit message?
You're right, it does work without this change, so this is just to save a bit of space when we don't need this feature.
v2:
- change commit message to clarify that this is only to remove some dead codedrivers/gpu/drm/rockchip/Makefile | 3 ++- drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-)drivers/gpu/drm/rockchip/Makefile +2
-1@@ -2,8 +2,9 @@ # Makefile for the drm device driver. This driver provides support for the # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. -rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o rockchip_drm_fbdev.o \ +rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o \ rockchip_drm_gem.o rockchip_drm_vop.o +rockchipdrm-$(CONFIG_DRM_FBDEV_EMULATION) += rockchip_drm_fbdev.o obj-$(CONFIG_ROCKCHIP_DW_HDMI) += dw_hdmi-rockchip.o obj-$(CONFIG_ROCKCHIP_DW_MIPI_DSI) += dw-mipi-dsi.odrivers/gpu/drm/rockchip/rockchip_drm_fbdev.h +3
-0@@ -15,7 +15,18 @@#ifndef _ROCKCHIP_DRM_FBDEV_H#define _ROCKCHIP_DRM_FBDEV_H +#ifdef CONFIG_DRM_FBDEV_EMULATION int rockchip_drm_fbdev_init (struct drm_device *dev);void rockchip_drm_fbdev_fini (struct drm_device *dev); +#else +static inline int rockchip_drm_fbdev_init (struct drm_device *dev)
drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h line 32
Quoted 10 lines
drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h +8
-0+{ +return 0 ; +} + +static inline void rockchip_drm_fbdev_fini (struct drm_device *dev) +{ +} +#endif #endif /* _ROCKCHIP_DRM_FBDEV_H */
Looks good and it works on my popmetal board.
Applied to my branch:-) .
Signature · 1 line
?ark Yao