drm: Fix config dependencies for fbdev emulation
Subsystems (5)
Thomas Zimmermann
maintainercover drm: Fix config dependencies for fbdev emulation
While working on the recent aperture helpers, I found it hard to disable fbdev because drivers keep on selecting it automatically.
Cleanup the config dependencies. Fbdev support should be configured by users. DRM drivers should check for DRM_FBDEV_EMULATION to enable fbdev support.
Thomas Zimmermann (4):
drm/vmwgfx: Make console emulation depend on DRM_FBDEV_EMULATION drm/mxsfb: Don't select DRM_KMS_FB_HELPER
drm/zte: Don't select DRM_KMS_FB_HELPER
drm: Remove DRM_KMS_FB_HELPER Kconfig option
drivers/gpu/drm/Kconfig | 28 +++++++++++----------------- drivers/gpu/drm/mxsfb/Kconfig | 1 - drivers/gpu/drm/vmwgfx/Kconfig | 7 +------ drivers/gpu/drm/vmwgfx/Makefile | 4 +++- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 19 +++++++++++++++++++ drivers/gpu/drm/zte/Kconfig | 1 - 6 files changed, 34 insertions(+), 26 deletions(-)
--
2.31.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Thomas Zimmermann
maintainerPATCH 1/4 drm/vmwgfx: Make console emulation depend on DRM_FBDEV_EMULATION
Respect DRM's kconfig setting for fbdev console emulation. If enabled, it will select all required config options. So remove them from vmwgfx's Kconfig file.
--- drivers/gpu/drm/vmwgfx/Kconfig | 7 +------ drivers/gpu/drm/vmwgfx/Makefile | 4 +++- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+), 7 deletions(-)
drivers/gpu/drm/vmwgfx/Kconfig +1 -6
@@ -2,12 +2,7 @@ config DRM_VMWGFX tristate "DRM driver for VMware Virtual GPU" depends on DRM && PCI && X86 && MMU - select FB_DEFERRED_IO - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT select DRM_TTM - select FB select MAPPING_DIRTY_HELPERS # Only needed for the transitional use of drm_crtc_init - can be removed # again once vmwgfx sets up the primary plane itself.
@@ -20,7 +15,7 @@ config DRM_VMWGFX The compiled module will be called "vmwgfx.ko". config DRM_VMWGFX_FBCON - depends on DRM_VMWGFX && FB + depends on DRM_VMWGFX && DRM_FBDEV_EMULATION bool "Enable framebuffer console under vmwgfx by default" help Choose this option if you are shipping a new vmwgfx
drivers/gpu/drm/vmwgfx/Makefile +3 -1
@@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \ - vmwgfx_fb.o vmwgfx_ioctl.o vmwgfx_resource.o vmwgfx_ttm_buffer.o \ + vmwgfx_ioctl.o vmwgfx_resource.o vmwgfx_ttm_buffer.o \ vmwgfx_cmd.o vmwgfx_irq.o vmwgfx_ldu.o vmwgfx_ttm_glue.o \ vmwgfx_overlay.o vmwgfx_gmrid_manager.o vmwgfx_fence.o \ vmwgfx_bo.o vmwgfx_scrn.o vmwgfx_context.o \
@@ -11,5 +11,7 @@ vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \ vmwgfx_validation.o vmwgfx_page_dirty.o vmwgfx_streamoutput.o \ ttm_object.o ttm_lock.o ttm_memory.o +vmwgfx-$(CONFIG_DRM_FBDEV_EMULATION) += vmwgfx_fb.o vmwgfx-$(CONFIG_TRANSPARENT_HUGEPAGE) += vmwgfx_thp.o + obj-$(CONFIG_DRM_VMWGFX) := vmwgfx.o
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +19 -0
@@ -1116,10 +1116,29 @@ extern void vmw_generic_waiter_remove(struct vmw_private *dev_priv,* Kernel framebuffer - vmwgfx_fb.c */ +#ifdef CONFIG_DRM_FBDEV_EMULATION int vmw_fb_init (struct vmw_private *vmw_priv);int vmw_fb_close (struct vmw_private *dev_priv);int vmw_fb_off (struct vmw_private *vmw_priv);int vmw_fb_on (struct vmw_private *vmw_priv); +#else +static inline int vmw_fb_init (struct vmw_private *vmw_priv) +{ +return 0 ; +} +static inline int vmw_fb_close (struct vmw_private *dev_priv) +{ +return 0 ; +} +static inline int vmw_fb_off (struct vmw_private *vmw_priv) +{ +return 0 ; +} +static inline int vmw_fb_on (struct vmw_private *vmw_priv) +{ +return 0 ; +} +#endif /** * Kernel modesetting - vmwgfx_kms.c
Signature · 6 lines
2.31.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 1/4] drm/vmwgfx: Make console emulation depend on DRM_FBDEV_EMULATION
Quoted 82 lines · Thomas Zimmermann
Respect DRM's kconfig setting for fbdev console emulation. If enabled, it will select all required config options. So remove them from vmwgfx's
Kconfigfile.Signed-off-by Thomas Zimmermann <[email protected]>--- drivers/gpu/drm/vmwgfx/Kconfig | 7 +------ drivers/gpu/drm/vmwgfx/Makefile | 4 +++- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+), 7 deletions(-)drivers/gpu/drm/vmwgfx/Kconfig +1
-6@@ -2,12 +2,7 @@ config DRM_VMWGFX tristate "DRM driver for VMware Virtual GPU" depends on DRM && PCI && X86 && MMU - select FB_DEFERRED_IO - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT select DRM_TTM - select FB select MAPPING_DIRTY_HELPERS # Only needed for the transitional use of drm_crtc_init - can be removed # again once vmwgfx sets up the primary plane itself.@@ -20,7 +15,7 @@ config DRM_VMWGFX The compiled module will be called "vmwgfx.ko". config DRM_VMWGFX_FBCON - depends on DRM_VMWGFX && FB + depends on DRM_VMWGFX && DRM_FBDEV_EMULATION bool "Enable framebuffer console under vmwgfx by default" help Choose this option if you are shipping a new vmwgfxdrivers/gpu/drm/vmwgfx/Makefile +3
-1@@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \ - vmwgfx_fb.o vmwgfx_ioctl.o vmwgfx_resource.o vmwgfx_ttm_buffer.o \ + vmwgfx_ioctl.o vmwgfx_resource.o vmwgfx_ttm_buffer.o \ vmwgfx_cmd.o vmwgfx_irq.o vmwgfx_ldu.o vmwgfx_ttm_glue.o \ vmwgfx_overlay.o vmwgfx_gmrid_manager.o vmwgfx_fence.o \ vmwgfx_bo.o vmwgfx_scrn.o vmwgfx_context.o \@@ -11,5 +11,7 @@ vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \ vmwgfx_validation.o vmwgfx_page_dirty.o vmwgfx_streamoutput.o \ ttm_object.o ttm_lock.o ttm_memory.o +vmwgfx-$(CONFIG_DRM_FBDEV_EMULATION) += vmwgfx_fb.o vmwgfx-$(CONFIG_TRANSPARENT_HUGEPAGE) += vmwgfx_thp.o + obj-$(CONFIG_DRM_VMWGFX) := vmwgfx.odrivers/gpu/drm/vmwgfx/vmwgfx_drv.h +12
-0@@ -1116,10 +1116,29 @@ extern void vmw_generic_waiter_remove(struct vmw_private *dev_priv,* Kernel framebuffer - vmwgfx_fb.c */ +#ifdef CONFIG_DRM_FBDEV_EMULATION int vmw_fb_init (struct vmw_private *vmw_priv);int vmw_fb_close (struct vmw_private *dev_priv);int vmw_fb_off (struct vmw_private *vmw_priv);int vmw_fb_on (struct vmw_private *vmw_priv); +#else +static inline int vmw_fb_init (struct vmw_private *vmw_priv) +{ +return 0 ; +} +static inline int vmw_fb_close (struct vmw_private *dev_priv) +{ +return 0 ; +} +static inline int vmw_fb_off (struct vmw_private *vmw_priv) +{
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h extern void vmw_generic_waiter_remove(struct vmw_private *dev_priv, · line 1144
Quoted 10 lines
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +7
-0+ return 0; +} +static inline int vmw_fb_on (struct vmw_private *vmw_priv) +{ +return 0 ; +} +#endif /** * Kernel modesetting - vmwgfx_kms.c
This changes the behavior a bit, I guess DRM_VMWGFX (or at least DRM_VMWGFX_FBCON) would need to select DRM_FBDEV_EMULATION to preserve the old behavior, but that's largely due to the fact that given how those options were setup we never run without FB set. In general it should be ok and looks more reasonable than the current setup. I'll try it out on Monday just in case, but for now:
z
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 1/4] drm/vmwgfx: Make console emulation depend on DRM_FBDEV_EMULATION
Quoted 91 lines · Zack Rusin
Quoted 89 lines · Thomas Zimmermann
Respect DRM's kconfig setting for fbdev console emulation. If enabled, it will select all required config options. So remove them from vmwgfx's
Kconfigfile.Signed-off-by Thomas Zimmermann <[email protected]>--- drivers/gpu/drm/vmwgfx/Kconfig | 7 +------ drivers/gpu/drm/vmwgfx/Makefile | 4 +++- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+), 7 deletions(-)drivers/gpu/drm/vmwgfx/Kconfig +1
-6@@ -2,12 +2,7 @@ config DRM_VMWGFX tristate "DRM driver for VMware Virtual GPU" depends on DRM && PCI && X86 && MMU - select FB_DEFERRED_IO - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT select DRM_TTM - select FB select MAPPING_DIRTY_HELPERS # Only needed for the transitional use of drm_crtc_init - can be removed # again once vmwgfx sets up the primary plane itself.@@ -20,7 +15,7 @@ config DRM_VMWGFX The compiled module will be called "vmwgfx.ko". config DRM_VMWGFX_FBCON - depends on DRM_VMWGFX && FB + depends on DRM_VMWGFX && DRM_FBDEV_EMULATION bool "Enable framebuffer console under vmwgfx by default" help Choose this option if you are shipping a new vmwgfxdrivers/gpu/drm/vmwgfx/Makefile +3
-1@@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \ - vmwgfx_fb.o vmwgfx_ioctl.o vmwgfx_resource.o vmwgfx_ttm_buffer.o \ + vmwgfx_ioctl.o vmwgfx_resource.o vmwgfx_ttm_buffer.o \ vmwgfx_cmd.o vmwgfx_irq.o vmwgfx_ldu.o vmwgfx_ttm_glue.o \ vmwgfx_overlay.o vmwgfx_gmrid_manager.o vmwgfx_fence.o \ vmwgfx_bo.o vmwgfx_scrn.o vmwgfx_context.o \@@ -11,5 +11,7 @@ vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \ vmwgfx_validation.o vmwgfx_page_dirty.o vmwgfx_streamoutput.o \ ttm_object.o ttm_lock.o ttm_memory.o +vmwgfx-$(CONFIG_DRM_FBDEV_EMULATION) += vmwgfx_fb.o vmwgfx-$(CONFIG_TRANSPARENT_HUGEPAGE) += vmwgfx_thp.o + obj-$(CONFIG_DRM_VMWGFX) := vmwgfx.odrivers/gpu/drm/vmwgfx/vmwgfx_drv.h +19
-0@@ -1116,10 +1116,29 @@ extern void vmw_generic_waiter_remove(struct vmw_private *dev_priv,* Kernel framebuffer - vmwgfx_fb.c */ +#ifdef CONFIG_DRM_FBDEV_EMULATION int vmw_fb_init (struct vmw_private *vmw_priv);int vmw_fb_close (struct vmw_private *dev_priv);int vmw_fb_off (struct vmw_private *vmw_priv);int vmw_fb_on (struct vmw_private *vmw_priv); +#else +static inline int vmw_fb_init (struct vmw_private *vmw_priv) +{ +return 0 ; +} +static inline int vmw_fb_close (struct vmw_private *dev_priv) +{ +return 0 ; +} +static inline int vmw_fb_off (struct vmw_private *vmw_priv) +{ +return 0 ; +} +static inline int vmw_fb_on (struct vmw_private *vmw_priv) +{ +return 0 ; +} +#endif
Quoted 5 lines
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h extern void vmw_generic_waiter_remove(struct vmw_private *dev_priv, · line 1144
Quoted 3 lines
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +0
-0/** * Kernel modesetting - vmwgfx_kms.c This changes the behavior a bit, I guess
DRM_VMWGFX(or at leastDRM_VMWGFX_FBCON) would need to selectDRM_FBDEV_EMULATIONto preserve the old behavior, but that's largely due to the fact that given how those options were setup we never run without FB set. In general it should be ok and looks more reasonable than the current setup. I'll try it out on Monday just in case, but for now:
The issue is that select in Kconfig is pretty annoying (hard to disable, and it's not recursive), so there's a bit a push to retire it. Especially for user-facing config knobs like whether you want fbdev emulation or not. Hence the change.
-Daniel
Quoted 3 lines
Reviewed-by Zack Rusin <[email protected]>z
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 1/4] drm/vmwgfx: Make console emulation depend on DRM_FBDEV_EMULATION
Quoted 98 lines · Daniel Vetter
Quoted 91 lines · Zack Rusin
Quoted 89 lines · Thomas Zimmermann
Respect DRM's kconfig setting for fbdev console emulation. If enabled, it will select all required config options. So remove them from vmwgfx's
Kconfigfile.Signed-off-by Thomas Zimmermann <[email protected]>--- drivers/gpu/drm/vmwgfx/Kconfig | 7 +------ drivers/gpu/drm/vmwgfx/Makefile | 4 +++- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+), 7 deletions(-)drivers/gpu/drm/vmwgfx/Kconfig +1
-6@@ -2,12 +2,7 @@ config DRM_VMWGFX tristate "DRM driver for VMware Virtual GPU" depends on DRM && PCI && X86 && MMU - select FB_DEFERRED_IO - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT select DRM_TTM - select FB select MAPPING_DIRTY_HELPERS # Only needed for the transitional use of drm_crtc_init - can be removed # again once vmwgfx sets up the primary plane itself.@@ -20,7 +15,7 @@ config DRM_VMWGFX The compiled module will be called "vmwgfx.ko". config DRM_VMWGFX_FBCON - depends on DRM_VMWGFX && FB + depends on DRM_VMWGFX && DRM_FBDEV_EMULATION bool "Enable framebuffer console under vmwgfx by default" help Choose this option if you are shipping a new vmwgfxdrivers/gpu/drm/vmwgfx/Makefile +3
-1@@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \ - vmwgfx_fb.o vmwgfx_ioctl.o vmwgfx_resource.o vmwgfx_ttm_buffer.o \ + vmwgfx_ioctl.o vmwgfx_resource.o vmwgfx_ttm_buffer.o \ vmwgfx_cmd.o vmwgfx_irq.o vmwgfx_ldu.o vmwgfx_ttm_glue.o \ vmwgfx_overlay.o vmwgfx_gmrid_manager.o vmwgfx_fence.o \ vmwgfx_bo.o vmwgfx_scrn.o vmwgfx_context.o \@@ -11,5 +11,7 @@ vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \ vmwgfx_validation.o vmwgfx_page_dirty.o vmwgfx_streamoutput.o \ ttm_object.o ttm_lock.o ttm_memory.o +vmwgfx-$(CONFIG_DRM_FBDEV_EMULATION) += vmwgfx_fb.o vmwgfx-$(CONFIG_TRANSPARENT_HUGEPAGE) += vmwgfx_thp.o + obj-$(CONFIG_DRM_VMWGFX) := vmwgfx.odrivers/gpu/drm/vmwgfx/vmwgfx_drv.h +19
-0@@ -1116,10 +1116,29 @@ extern void vmw_generic_waiter_remove(struct vmw_private *dev_priv,* Kernel framebuffer - vmwgfx_fb.c */ +#ifdef CONFIG_DRM_FBDEV_EMULATION int vmw_fb_init (struct vmw_private *vmw_priv);int vmw_fb_close (struct vmw_private *dev_priv);int vmw_fb_off (struct vmw_private *vmw_priv);int vmw_fb_on (struct vmw_private *vmw_priv); +#else +static inline int vmw_fb_init (struct vmw_private *vmw_priv) +{ +return 0 ; +} +static inline int vmw_fb_close (struct vmw_private *dev_priv) +{ +return 0 ; +} +static inline int vmw_fb_off (struct vmw_private *vmw_priv) +{ +return 0 ; +} +static inline int vmw_fb_on (struct vmw_private *vmw_priv) +{ +return 0 ; +} +#endif Quoted 5 lines
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h extern void vmw_generic_waiter_remove(struct vmw_private *dev_priv, · line 1144
Quoted 3 lines
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +0
-0/** * Kernel modesetting - vmwgfx_kms.c This changes the behavior a bit, I guess
DRM_VMWGFX(or at leastDRM_VMWGFX_FBCON) would need to selectDRM_FBDEV_EMULATIONto preserve the old behavior, but that's largely due to the fact that given how those options were setup we never run without FB set. In general it should be ok and looks more reasonable than the current setup. I'll try it out on Monday just in case, but for now:
Quoted 4 lines
The issue is that select in
Kconfigis pretty annoying (hard to disable, and it's not recursive), so there's a bit a push to retire it. Especially for user-facing config knobs like whether you want fbdev emulation or not. Hence the change.
Yes, I understand the change. It makes sense. I'm just saying that given how hard it was to even build vmwgfx without FB, it's likely it's never been used/tested in this configuration so it might be broken without FB config set. But like I said, it should be fine (it's basically only if we had some generic init code for the rest of the codebase tied to fb initialization).
z
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Thomas Zimmermann
maintainerRe: [PATCH 1/4] drm/vmwgfx: Make console emulation depend on DRM_FBDEV_EMULATION
In reply to Zack RusinHi
Am 15.04.21 um 20:21 schrieb Zack Rusin:
Quoted 9 lines · Thomas Zimmermann
Quoted 8 lines
Respect DRM's kconfig setting for fbdev console emulation. If enabled, it will select all required config options. So remove them from vmwgfx's
Kconfigfile.Signed-off-by Thomas Zimmermann <[email protected]>---
drivers/gpu/drm/vmwgfx/Kconfig | 7 +------ drivers/gpu/drm/vmwgfx/Makefile |
4 +++-
Quoted 10 lines
Quoted 10 lines
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h| 19 +++++++++++++++++++3 files changed, 23 insertions(+), 7 deletions(-)drivers/gpu/drm/vmwgfx/Kconfig +0
-0@@ -2,12 +2,7 @@config
DRM_VMWGFX
tristate "DRM driver for VMware Virtual
GPU"
Quoted 10 lines
Quoted 10 lines
depends on DRM && PCI && X86 && MMU
- selectFB_DEFERRED_IO
- selectFB_CFB_FILLRECT
- selectFB_CFB_COPYAREA
- selectFB_CFB_IMAGEBLIT
selectDRM_TTM
- select FB
selectMAPPING_DIRTY_HELPERS
# Only needed for the transitional use ofdrm_crtc_init- can be removed# again once vmwgfx sets up the primary
plane itself.
Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/vmwgfx/Kconfig +0
-0@@ -20,7 +15,7 @@ config DRM_VMWGFXThe compiled module will be
called "vmwgfx.ko".
Quoted 6 lines
Quoted 6 lines
config
DRM_VMWGFX_FBCON
- depends onDRM_VMWGFX&& FB
+ depends onDRM_VMWGFX&&DRM_FBDEV_EMULATIONbool "Enable framebuffer console under vmwgfx by default" help
Choose this option if
you are shipping a new vmwgfx
Quoted 8 lines
drivers/gpu/drm/vmwgfx/Makefile line 3
Quoted 8 lines
drivers/gpu/drm/vmwgfx/Makefile +0
-1@@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \ - vmwgfx_fb.o vmwgfx_ioctl.o
vmwgfx_resource.o
Quoted 50 lines
Quoted 37 lines
drivers/gpu/drm/vmwgfx/Makefile +1
-0vmwgfx_ttm_buffer.o \ + vmwgfx_ioctl.o vmwgfx_resource.o vmwgfx_ttm_buffer.o \ vmwgfx_cmd.o vmwgfx_irq.o vmwgfx_ldu.o vmwgfx_ttm_glue.o \ vmwgfx_overlay.o vmwgfx_gmrid_manager.o vmwgfx_fence.o \vmwgfx_bo.o vmwgfx_scrn.o vmwgfx_context.o \
drivers/gpu/drm/vmwgfx/Makefile +0
-0@@ -11,5 +11,7 @@ vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \ vmwgfx_validation.o vmwgfx_page_dirty.o vmwgfx_streamoutput.o \ttm_object.o ttm_lock.o ttm_memory.o +vmwgfx-$(CONFIG_DRM_FBDEV_EMULATION) += vmwgfx_fb.o vmwgfx-$(CONFIG_TRANSPARENT_HUGEPAGE) += vmwgfx_thp.o +
obj-$(CONFIG_DRM_VMWGFX) := vmwgfx.odrivers/gpu/drm/vmwgfx/vmwgfx_drv.h +12
-0@@ -1116,10 +1116,29 @@ extern void vmw_generic_waiter_remove(structvmw_private *dev_priv, * Kernel framebuffer - vmwgfx_fb.c */ +#ifdef CONFIG_DRM_FBDEV_EMULATION int vmw_fb_init(struct vmw_private *vmw_priv); int vmw_fb_close(struct vmw_private *dev_priv); int vmw_fb_off(struct vmw_private *vmw_priv); int vmw_fb_on(struct vmw_private *vmw_priv); +#else +static inline int vmw_fb_init (struct vmw_private *vmw_priv) +{ + return 0; +} +static inline int vmw_fb_close (struct vmw_private *dev_priv) +{ + return 0; +} +static inline int vmw_fb_off (struct vmw_private *vmw_priv) +{drivers/gpu/drm/vmwgfx/vmwgfx_drv.h extern void vmw_generic_waiter_remove(struct · line 1144
Quoted 10 lines
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +7
-0+ return 0; +} +static inline int vmw_fb_on (struct vmw_private *vmw_priv) +{ + return 0; +} +#endif /*** Kernel modesetting - vmwgfx_kms.c This changes the behavior a bit, I guess
DRM_VMWGFX(or at leastDRM_VMWGFX_FBCON) would need to selectDRM_FBDEV_EMULATIONto preserve the old behavior, but that's largely due to the fact that given how those options were setup we never run without FB set. In general it should be ok and looks more reasonable than the current setup. I'll try
Quoted 4 lines
it out on Monday just in case, but for now:
Reviewed-by Zack Rusin <[email protected]>
All other drivers use DRM_FBDEV_EMULATION, so vmwgfx would follow common conventions.
AFAICT DRM_VMWGFX_FBCON is just the default on/off setting. How about making DRM_VMWGFX_FBCON depend on DRM_FBDEV_EMULATION? Users would be able to enable fbdev emulation in general and, if needed, still pick a separate default on/off for vmwgfx.
Best regards
Thomas
Quoted 1 line
z
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Thomas Zimmermann
maintainerRe: [PATCH 1/4] drm/vmwgfx: Make console emulation depend on DRM_FBDEV_EMULATION
Am 15.04.21 um 20:50 schrieb Thomas Zimmermann:
Quoted 16 lines
Hi
Am 15.04.21 um 20:21 schrieb Zack Rusin:
Quoted 9 lines · Thomas Zimmermann
Quoted 8 lines
Respect DRM's kconfig setting for fbdev console emulation. If enabled, it will select all required config options. So remove them from vmwgfx's
Kconfigfile.Signed-off-by Thomas Zimmermann <[email protected]>---
drivers/gpu/drm/vmwgfx/Kconfig | 7 +------ drivers/gpu/drm/vmwgfx/Makefile |4 +++-
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h| 19 +++++++++++++++++++3 files changed, 23 insertions(+), 7 deletions(-)
Quoted 17 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/vmwgfx/Kconfig +0
-0@@ -2,12 +2,7 @@config
DRM_VMWGFX
tristate "DRM driver for VMware VirtualGPU"
Quoted 9 lines
Quoted 9 lines
depends on DRM && PCI && X86 && MMU
- selectFB_DEFERRED_IO
- selectFB_CFB_FILLRECT
- selectFB_CFB_COPYAREA
- selectFB_CFB_IMAGEBLIT
selectDRM_TTM
- select FB
selectMAPPING_DIRTY_HELPERS
# Only needed for the transitional use
of drm_crtc_init - can
Quoted 10 lines
Quoted 2 lines
Quoted 2 lines
be removed
# again once vmwgfx sets up the primaryplane itself.
Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/vmwgfx/Kconfig +0
-0@@ -20,7 +15,7 @@ config DRM_VMWGFXThe compiled module will be
called "vmwgfx.ko".
Quoted 4 lines
Quoted 4 lines
config
DRM_VMWGFX_FBCON
- depends onDRM_VMWGFX&& FB
+ depends onDRM_VMWGFX&&DRM_FBDEV_EMULATION
bool "Enable framebuffer console under
vmwgfx by default"
Quoted 64 lines
Quoted 2 lines
Quoted 2 lines
help
Choose this option ifyou are shipping a new vmwgfx
Quoted 8 lines
drivers/gpu/drm/vmwgfx/Makefile line 3
Quoted 8 lines
drivers/gpu/drm/vmwgfx/Makefile +0
-1@@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \ - vmwgfx_fb.o vmwgfx_ioctl.ovmwgfx_resource.o
Quoted 51 lines
Quoted 37 lines
drivers/gpu/drm/vmwgfx/Makefile +1
-0vmwgfx_ttm_buffer.o \ + vmwgfx_ioctl.o vmwgfx_resource.o vmwgfx_ttm_buffer.o \ vmwgfx_cmd.o vmwgfx_irq.o vmwgfx_ldu.o vmwgfx_ttm_glue.o \ vmwgfx_overlay.o vmwgfx_gmrid_manager.o vmwgfx_fence.o \vmwgfx_bo.o vmwgfx_scrn.o vmwgfx_context.o \
drivers/gpu/drm/vmwgfx/Makefile +0
-0@@ -11,5 +11,7 @@ vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \ vmwgfx_validation.o vmwgfx_page_dirty.o vmwgfx_streamoutput.o \ttm_object.o ttm_lock.o ttm_memory.o +vmwgfx-$(CONFIG_DRM_FBDEV_EMULATION) += vmwgfx_fb.o vmwgfx-$(CONFIG_TRANSPARENT_HUGEPAGE) += vmwgfx_thp.o +
obj-$(CONFIG_DRM_VMWGFX) := vmwgfx.odrivers/gpu/drm/vmwgfx/vmwgfx_drv.h +12
-0@@ -1116,10 +1116,29 @@ extern void vmw_generic_waiter_remove(structvmw_private *dev_priv, * Kernel framebuffer - vmwgfx_fb.c */ +#ifdef CONFIG_DRM_FBDEV_EMULATION int vmw_fb_init(struct vmw_private *vmw_priv); int vmw_fb_close(struct vmw_private *dev_priv); int vmw_fb_off(struct vmw_private *vmw_priv); int vmw_fb_on(struct vmw_private *vmw_priv); +#else +static inline int vmw_fb_init (struct vmw_private *vmw_priv) +{ + return 0; +} +static inline int vmw_fb_close (struct vmw_private *dev_priv) +{ + return 0; +} +static inline int vmw_fb_off (struct vmw_private *vmw_priv) +{drivers/gpu/drm/vmwgfx/vmwgfx_drv.h extern void vmw_generic_waiter_remove(struct · line 1144
Quoted 10 lines
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +7
-0+ return 0; +} +static inline int vmw_fb_on (struct vmw_private *vmw_priv) +{ + return 0; +} +#endif /*** Kernel modesetting - vmwgfx_kms.c This changes the behavior a bit, I guess
DRM_VMWGFX(or at leastDRM_VMWGFX_FBCON) would need to selectDRM_FBDEV_EMULATIONto preservethe old behavior, but that's largely due to the fact that given how those options were setup we never run without FB set. In general it should be ok and looks more reasonable than the current setup. I'll try
Quoted 8 lines
Quoted 4 lines
it out on Monday just in case, but for now:
Reviewed-by Zack Rusin <[email protected]>All other drivers use
DRM_FBDEV_EMULATION, so vmwgfx would follow common conventions.AFAICT
DRM_VMWGFX_FBCONis just the default on/off setting. How about makingDRM_VMWGFX_FBCONdepend onDRM_FBDEV_EMULATION? Users would be able to enable fbdev emulation in general and, if needed, still pick a separate default on/off for vmwgfx.
Oh, lol. That's already in the patchset.
Quoted 12 lines
Best regards
ThomasQuoted 1 line
z
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Thomas Zimmermann
maintainerPATCH 2/4 drm/mxsfb: Don't select DRM_KMS_FB_HELPER
In reply to Thomas ZimmermannSelecting DRM_FBDEV_EMULATION will include the correct secttings for fbdev emulation. Drivers should not override this.
--- drivers/gpu/drm/mxsfb/Kconfig | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/mxsfb/Kconfig +0 -1
@@ -10,7 +10,6 @@ config DRM_MXSFB depends on COMMON_CLK select DRM_MXS select DRM_KMS_HELPER - select DRM_KMS_FB_HELPER select DRM_KMS_CMA_HELPER select DRM_PANEL select DRM_PANEL_BRIDGE
Signature · 6 lines
2.31.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/4] drm/mxsfb: Don't select DRM_KMS_FB_HELPER
Quoted 4 lines · Thomas Zimmermann
Selecting
DRM_FBDEV_EMULATIONwill include the correct secttings for fbdev emulation. Drivers should not override this.Signed-off-by Thomas Zimmermann <[email protected]>
--
Stefan
Quoted 9 lines
--- drivers/gpu/drm/mxsfb/Kconfig | 1 - 1 file changed, 1 deletion(-)drivers/gpu/drm/mxsfb/Kconfig +0
-0
drivers/gpu/drm/mxsfb/Kconfig config DRM_MXSFB · line 15
Quoted 7 lines
drivers/gpu/drm/mxsfb/Kconfig +0
-1@@ -10,7 +10,6 @@ config DRM_MXSFB depends on COMMON_CLK select DRM_MXS select DRM_KMS_HELPER - select DRM_KMS_FB_HELPER select DRM_KMS_CMA_HELPER select DRM_PANEL select DRM_PANEL_BRIDGE
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Thomas Zimmermann
maintainerPATCH 3/4 drm/zte: Don't select DRM_KMS_FB_HELPER
In reply to Thomas ZimmermannSelecting DRM_FBDEV_EMULATION will include the correct secttings for fbdev emulation. Drivers should not override this.
--- drivers/gpu/drm/zte/Kconfig | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/zte/Kconfig +0 -1
@@ -3,7 +3,6 @@ config DRM_ZTE tristate "DRM Support for ZTE SoCs" depends on DRM && ARCH_ZX select DRM_KMS_CMA_HELPER - select DRM_KMS_FB_HELPER select DRM_KMS_HELPER select SND_SOC_HDMI_CODEC if SND_SOC select VIDEOMODE_HELPERS
Signature · 6 lines
2.31.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Thomas Zimmermann
maintainerPATCH 4/4 drm: Remove DRM_KMS_FB_HELPER Kconfig option
In reply to Thomas ZimmermannIt's only used by DRM_FBDEV_EMULATION, so inline it there.
--- drivers/gpu/drm/Kconfig | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-)
drivers/gpu/drm/Kconfig +11 -17
@@ -80,23 +80,6 @@ config DRM_KMS_HELPER help CRTC helpers for KMS drivers. -config DRM_KMS_FB_HELPER - bool - depends on DRM_KMS_HELPER - select FB - select FRAMEBUFFER_CONSOLE if !EXPERT - select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE - select FB_SYS_FOPS - select FB_SYS_FILLRECT - select FB_SYS_COPYAREA - select FB_SYS_IMAGEBLIT - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT - select FB_DEFERRED_IO - help - FBDEV helpers for KMS drivers. - config DRM_DEBUG_DP_MST_TOPOLOGY_REFS bool "Enable refcount backtrace history in the DP MST helpers" depends on STACKTRACE_SUPPORT
@@ -117,6 +100,17 @@ config DRM_FBDEV_EMULATION depends on DRM select DRM_KMS_HELPER select DRM_KMS_FB_HELPER + select FB + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select FB_DEFERRED_IO + select FB_SYS_FOPS + select FB_SYS_FILLRECT + select FB_SYS_COPYAREA + select FB_SYS_IMAGEBLIT + select FRAMEBUFFER_CONSOLE if !EXPERT + select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE default y help Choose this option if you have a need for the legacy fbdev
Signature · 6 lines
2.31.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 4/4] drm: Remove DRM_KMS_FB_HELPER Kconfig option
Quoted 3 lines · Thomas Zimmermann
It's only used by
DRM_FBDEV_EMULATION, so inline it there.Signed-off-by Thomas Zimmermann <[email protected]>
I'm not sure on patch 1, I'll leave that to Zack, but I think 2-4 would work alone too. On those:
Quoted 53 lines
--- drivers/gpu/drm/Kconfig | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-)drivers/gpu/drm/Kconfig +11
-17@@ -80,23 +80,6 @@ config DRM_KMS_HELPER help CRTC helpers for KMS drivers. -config DRM_KMS_FB_HELPER - bool - depends on DRM_KMS_HELPER - select FB - select FRAMEBUFFER_CONSOLE if !EXPERT - select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE - select FB_SYS_FOPS - select FB_SYS_FILLRECT - select FB_SYS_COPYAREA - select FB_SYS_IMAGEBLIT - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT - select FB_DEFERRED_IO - help - FBDEV helpers for KMS drivers. - config DRM_DEBUG_DP_MST_TOPOLOGY_REFS bool "Enable refcount backtrace history in the DP MST helpers" depends on STACKTRACE_SUPPORT@@ -117,6 +100,17 @@ config DRM_FBDEV_EMULATION depends on DRM select DRM_KMS_HELPER select DRM_KMS_FB_HELPER + select FB + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select FB_DEFERRED_IO + select FB_SYS_FOPS + select FB_SYS_FILLRECT + select FB_SYS_COPYAREA + select FB_SYS_IMAGEBLIT + select FRAMEBUFFER_CONSOLE if !EXPERT + select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE default y help Choose this option if you have a need for the legacy fbdevSignature · 1 line
2.31.1
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 4/4] drm: Remove DRM_KMS_FB_HELPER Kconfig option
In reply to Thomas ZimmermannHi Thomas,
Quoted 36 lines · Thomas Zimmermann
It's only used by
DRM_FBDEV_EMULATION, so inline it there.Signed-off-by Thomas Zimmermann <[email protected]>--- drivers/gpu/drm/Kconfig | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-)drivers/gpu/drm/Kconfig +0
-17@@ -80,23 +80,6 @@ config DRM_KMS_HELPER help CRTC helpers for KMS drivers. -config DRM_KMS_FB_HELPER - bool - depends on DRM_KMS_HELPER - select FB - select FRAMEBUFFER_CONSOLE if !EXPERT - select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE - select FB_SYS_FOPS - select FB_SYS_FILLRECT - select FB_SYS_COPYAREA - select FB_SYS_IMAGEBLIT - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT - select FB_DEFERRED_IO - help - FBDEV helpers for KMS drivers. - config DRM_DEBUG_DP_MST_TOPOLOGY_REFS bool "Enable refcount backtrace history in the DP MST helpers" depends on STACKTRACE_SUPPORT
drivers/gpu/drm/Kconfig config DRM_FBDEV_EMULATION · line 102
Quoted 3 lines
drivers/gpu/drm/Kconfig +0
-0@@ -117,6 +100,17 @@ config DRM_FBDEV_EMULATION depends on DRM select DRM_KMS_HELPER select DRM_KMS_FB_HELPER
It's still selected here ^
Quoted 4 lines
drivers/gpu/drm/Kconfig +4
-0+ select FB + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT
drivers/gpu/drm/Kconfig config DRM_FBDEV_EMULATION · line 116
Quoted 10 lines
drivers/gpu/drm/Kconfig +7
-0+ select FB_DEFERRED_IO + select FB_SYS_FOPS + select FB_SYS_FILLRECT + select FB_SYS_COPYAREA + select FB_SYS_IMAGEBLIT + select FRAMEBUFFER_CONSOLE if !EXPERT + select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE default y help Choose this option if you have a need for the legacy fbdev
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds