drm: Move plane helpers into drm_kms_helper.ko
Subsystems (3)
PATCH 1/1 drm: Move plane helpers into drm_kms_helper.ko
The drm core shouldn't depend upon any helpers, and we make sure this doesn't accidentally happen by moving them into the helper-only drm_kms_helper.ko module.
--- drivers/gpu/drm/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/Makefile +3 -3
@@ -13,8 +13,7 @@ drm-y := drm_auth.o drm_buffer.o drm_bufs.o drm_cache.o \ drm_crtc.o drm_modes.o drm_edid.o \ drm_info.o drm_debugfs.o drm_encoder_slave.o \ drm_trace_points.o drm_global.o drm_prime.o \ - drm_rect.o drm_vma_manager.o drm_flip_work.o \ - drm_plane_helper.o + drm_rect.o drm_vma_manager.o drm_flip_work.o drm-$(CONFIG_COMPAT) += drm_ioc32.o drm-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o
@@ -23,7 +22,8 @@ drm-$(CONFIG_DRM_PANEL) += drm_panel.o drm-usb-y := drm_usb.o -drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_probe_helper.o +drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_probe_helper.o \ + drm_plane_helper.o drm_kms_helper-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o drm_kms_helper-$(CONFIG_DRM_KMS_FB_HELPER) += drm_fb_helper.o drm_kms_helper-$(CONFIG_DRM_KMS_CMA_HELPER) += drm_fb_cma_helper.o
Signature · 1 line
2.0.0
Quoted 6 lines · Daniel Vetter
The drm core shouldn't depend upon any helpers, and we make sure this doesn't accidentally happen by moving them into the helper-only drm_kms_helper.ko module.
Cc Matt Roper <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Are there any KMS drivers that don't 'select DRM_KMS_HELPER' in their Kconfig today? From a quick grep + cscope it looks like radeon and vmwgfx don't select the helper library.
Since drm_crtc_init() is part of the helper library now (since it creates a helper-created primary plane), I think those drivers either need to select the helper in their Kconfig to get a proper build, or they need to be updated to provide their own primary planes and call drm_crtc_init_with_planes(), right?
Matt
Quoted 31 lines
--- drivers/gpu/drm/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/Makefile +3
-3@@ -13,8 +13,7 @@ drm-y := drm_auth.o drm_buffer.o drm_bufs.o drm_cache.o \ drm_crtc.o drm_modes.o drm_edid.o \ drm_info.o drm_debugfs.o drm_encoder_slave.o \ drm_trace_points.o drm_global.o drm_prime.o \ - drm_rect.o drm_vma_manager.o drm_flip_work.o \ - drm_plane_helper.o + drm_rect.o drm_vma_manager.o drm_flip_work.o drm-$(CONFIG_COMPAT) += drm_ioc32.o drm-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o@@ -23,7 +22,8 @@ drm-$(CONFIG_DRM_PANEL) += drm_panel.o drm-usb-y := drm_usb.o -drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_probe_helper.o +drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_probe_helper.o \ + drm_plane_helper.o drm_kms_helper-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o drm_kms_helper-$(CONFIG_DRM_KMS_FB_HELPER) += drm_fb_helper.o drm_kms_helper-$(CONFIG_DRM_KMS_CMA_HELPER) += drm_fb_cma_helper.oSignature · 1 line
2.0.0
Signature · 5 lines
Matt Roper Graphics Software Engineer IoTG Platform Enabling & Development Intel Corporation (916) 356-2795
Quoted 12 lines · Matt Roper
Quoted 6 lines · Daniel Vetter
The drm core shouldn't depend upon any helpers, and we make sure this doesn't accidentally happen by moving them into the helper-only drm_kms_helper.ko module.
Cc Matt Roper <[email protected]>Signed-off-by Daniel Vetter <[email protected]>Are there any KMS drivers that don't 'select
DRM_KMS_HELPER' in theirKconfigtoday? From a quick grep + cscope it looks like radeon and vmwgfx don't select the helper library.
Quoted 5 lines
Since
drm_crtc_init()is part of the helper library now (since it creates a helper-created primary plane), I think those drivers either need to select the helper in theirKconfigto get a proper build, or they need to be updated to provide their own primary planes and calldrm_crtc_init_with_planes(), right?
Radeon definitely uses the crtc helpers, so should have the dependency somewhere. vmwgfx might indeed be broken now a bit. I'll wait for the 0-day kernel test build farm to confirm that ;-)
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Matt Roper
Reviewed-byQuoted 19 lines · Daniel Vetter
Quoted 12 lines · Matt Roper
Quoted 6 lines · Daniel Vetter
The drm core shouldn't depend upon any helpers, and we make sure this doesn't accidentally happen by moving them into the helper-only drm_kms_helper.ko module.
Cc Matt Roper <[email protected]>Signed-off-by Daniel Vetter <[email protected]>Are there any KMS drivers that don't 'select
DRM_KMS_HELPER' in theirKconfigtoday? From a quick grep + cscope it looks like radeon and vmwgfx don't select the helper library.Quoted 5 lines
Since
drm_crtc_init()is part of the helper library now (since it creates a helper-created primary plane), I think those drivers either need to select the helper in theirKconfigto get a proper build, or they need to be updated to provide their own primary planes and calldrm_crtc_init_with_planes(), right?
Quoted 4 lines
Radeon definitely uses the crtc helpers, so should have the dependency somewhere. vmwgfx might indeed be broken now a bit. I'll wait for the 0-day kernel test build farm to confirm that ;-)
-Daniel
Yeah, you're right; now that I look closer radeon pulls it in from the main drm directory Kconfig and only has ums stuff in its driver directory Kconfig. But I think vmwgfx probably still needs to select the helper library.
If vmwgfx gets a kconfig update to pull in the helper library, then this is
Matt
Quoted 4 lines
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Signature · 5 lines
Matt Roper Graphics Software Engineer IoTG Platform Enabling & Development Intel Corporation (916) 356-2795
PATCH 1/1 drm: Move plane helpers into drm_kms_helper.ko
In reply to Daniel VetterThe drm core shouldn't depend upon any helpers, and we make sure this doesn't accidentally happen by moving them into the helper-only drm_kms_helper.ko module.
v2: Don't break the build for vmwgfx, spotted by Matt.
--- drivers/gpu/drm/Makefile | 6 +++--- drivers/gpu/drm/vmwgfx/Kconfig | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/Makefile +3 -3
@@ -13,8 +13,7 @@ drm-y := drm_auth.o drm_buffer.o drm_bufs.o drm_cache.o \ drm_crtc.o drm_modes.o drm_edid.o \ drm_info.o drm_debugfs.o drm_encoder_slave.o \ drm_trace_points.o drm_global.o drm_prime.o \ - drm_rect.o drm_vma_manager.o drm_flip_work.o \ - drm_plane_helper.o + drm_rect.o drm_vma_manager.o drm_flip_work.o drm-$(CONFIG_COMPAT) += drm_ioc32.o drm-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o
@@ -23,7 +22,8 @@ drm-$(CONFIG_DRM_PANEL) += drm_panel.o drm-usb-y := drm_usb.o -drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_probe_helper.o +drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_probe_helper.o \ + drm_plane_helper.o drm_kms_helper-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o drm_kms_helper-$(CONFIG_DRM_KMS_FB_HELPER) += drm_fb_helper.o drm_kms_helper-$(CONFIG_DRM_KMS_CMA_HELPER) += drm_fb_cma_helper.o
drivers/gpu/drm/vmwgfx/Kconfig +3 -0
@@ -6,6 +6,9 @@ config DRM_VMWGFX select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select DRM_TTM + # Only needed for the transitional use of drm_crtc_init - can be removed + # again once vmwgfx sets up the primary plane itself. + select DRM_KMS_HELPER help Choose this option if you would like to run 3D acceleration in a VMware virtual machine.
Signature · 1 line
2.0.0
PATCH 1/1 drm: Move plane helpers into drm_kms_helper.ko
In reply to Daniel VetterThe drm core shouldn't depend upon any helpers, and we make sure this doesn't accidentally happen by moving them into the helper-only drm_kms_helper.ko module.
v2: Don't break the build for vmwgfx, spotted by Matt.
v3: Unbreak the depency loop around CONFIG_FB (not actually a loop since it involves select). Reported by Chris.
--- drivers/gpu/drm/Makefile | 6 +++--- drivers/gpu/drm/vmwgfx/Kconfig | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-)
drivers/gpu/drm/Makefile +3 -3
@@ -13,8 +13,7 @@ drm-y := drm_auth.o drm_buffer.o drm_bufs.o drm_cache.o \ drm_crtc.o drm_modes.o drm_edid.o \ drm_info.o drm_debugfs.o drm_encoder_slave.o \ drm_trace_points.o drm_global.o drm_prime.o \ - drm_rect.o drm_vma_manager.o drm_flip_work.o \ - drm_plane_helper.o + drm_rect.o drm_vma_manager.o drm_flip_work.o drm-$(CONFIG_COMPAT) += drm_ioc32.o drm-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o
@@ -23,7 +22,8 @@ drm-$(CONFIG_DRM_PANEL) += drm_panel.o drm-usb-y := drm_usb.o -drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_probe_helper.o +drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_probe_helper.o \ + drm_plane_helper.o drm_kms_helper-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o drm_kms_helper-$(CONFIG_DRM_KMS_FB_HELPER) += drm_fb_helper.o drm_kms_helper-$(CONFIG_DRM_KMS_CMA_HELPER) += drm_fb_cma_helper.o
drivers/gpu/drm/vmwgfx/Kconfig +5 -2
@@ -1,11 +1,14 @@ config DRM_VMWGFX tristate "DRM driver for VMware Virtual GPU" - depends on DRM && PCI && FB + depends on DRM && PCI select FB_DEFERRED_IO select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select DRM_TTM + # Only needed for the transitional use of drm_crtc_init - can be removed + # again once vmwgfx sets up the primary plane itself. + select DRM_KMS_HELPER help Choose this option if you would like to run 3D acceleration in a VMware virtual machine.
@@ -14,7 +17,7 @@ config DRM_VMWGFX The compiled module will be called "vmwgfx.ko". config DRM_VMWGFX_FBCON - depends on DRM_VMWGFX + depends on DRM_VMWGFX && FB bool "Enable framebuffer console under vmwgfx by default" help Choose this option if you are shipping a new vmwgfx
Signature · 1 line
2.0.0
Dave Airlie
maintainerQuoted 63 lines · Daniel Vetter
The drm core shouldn't depend upon any helpers, and we make sure this doesn't accidentally happen by moving them into the helper-only drm_kms_helper.ko module.
v2: Don't break the build for vmwgfx, spotted by Matt.
v3: Unbreak the depency loop around
CONFIG_FB(not actually a loop since it involves select). Reported by Chris.Cc Matt Roper <[email protected]>Cc Thomas Hellstrom <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/Makefile | 6 +++--- drivers/gpu/drm/vmwgfx/Kconfig | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-)drivers/gpu/drm/Makefile +3
-3@@ -13,8 +13,7 @@ drm-y := drm_auth.o drm_buffer.o drm_bufs.o drm_cache.o \ drm_crtc.o drm_modes.o drm_edid.o \ drm_info.o drm_debugfs.o drm_encoder_slave.o \ drm_trace_points.o drm_global.o drm_prime.o \ - drm_rect.o drm_vma_manager.o drm_flip_work.o \ - drm_plane_helper.o + drm_rect.o drm_vma_manager.o drm_flip_work.o drm-$(CONFIG_COMPAT) += drm_ioc32.o drm-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o@@ -23,7 +22,8 @@ drm-$(CONFIG_DRM_PANEL) += drm_panel.o drm-usb-y := drm_usb.o -drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_probe_helper.o +drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_probe_helper.o \ + drm_plane_helper.o drm_kms_helper-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o drm_kms_helper-$(CONFIG_DRM_KMS_FB_HELPER) += drm_fb_helper.o drm_kms_helper-$(CONFIG_DRM_KMS_CMA_HELPER) += drm_fb_cma_helper.odrivers/gpu/drm/vmwgfx/Kconfig +4
-1@@ -1,11 +1,14 @@ config DRM_VMWGFX tristate "DRM driver for VMware Virtual GPU" - depends on DRM && PCI && FB + depends on DRM && PCI select FB_DEFERRED_IO select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select DRM_TTM + # Only needed for the transitional use of drm_crtc_init - can be removed + # again once vmwgfx sets up the primary plane itself. + select DRM_KMS_HELPER help Choose this option if you would like to run 3D acceleration in a VMware virtual machine.
drivers/gpu/drm/vmwgfx/Kconfig config DRM_VMWGFX · line 23
Quoted 8 lines
drivers/gpu/drm/vmwgfx/Kconfig +1
-1@@ -14,7 +17,7 @@ config DRM_VMWGFX The compiled module will be called "vmwgfx.ko". config DRM_VMWGFX_FBCON - depends on DRM_VMWGFX + depends on DRM_VMWGFX && FB bool "Enable framebuffer console under vmwgfx by default" help Choose this option if you are shipping a new vmwgfx
Applied thanks,
Dave.