drm: Do not include <linux/fb.h> unnecessarily
Subsystems (11)
Thomas Zimmermann
maintainerv2 cover drm: Do not include <linux/fb.h> unnecessarily
Remove unnecessary include statements for <linux/fb.h>. I recently changed this header and had to rebuild a good part of DRM. So avoid this by removing the dependency.
Several files include <linux/fb.h> via drm_fb_helper.h. So in v2 I added additional patches that remove some of those include statements as well.
Some source files require the OF or backlight headers. Include those instead.
v2:
* add more patches to handle drm_fb_helper.h includes
* fix komeda build (kernel test robot)
Thomas Zimmermann (10):
drm: Include <linux/backlight.h> where needed
drm: Include <linux/of.h> where needed
drm: Don't include <linux/fb.h> in drm_crtc_helper.h drm/amdgpu: Do not include <linux/fb.h>
drm/panel: Do not include <linux/fb.h>
drm: Define enum mode_set_atomic in drm_modeset_helper_tables.h drm/amdgpu: Do not include <drm/drm_fb_helper.h> drm/nouveau: Do not include <drm/drm_fb_helper.h> drm/radeon: Remove trailing whitespaces
drm/radeon: Do not include <drm/drm_fb_helper.h>
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 - drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 1 - drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 1 - drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 - drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 1 - drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 1 - drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 1 - .../gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c | 1 - drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c | 1 - .../gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c | 1 - drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c | 1 - .../gpu/drm/amd/pm/powerplay/hwmgr/vega20_processpptables.c | 1 - drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 1 - drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 1 + drivers/gpu/drm/drm_modes.c | 5 +++-- drivers/gpu/drm/gma500/backlight.c | 2 ++ drivers/gpu/drm/nouveau/dispnv04/crtc.c | 1 - drivers/gpu/drm/nouveau/nouveau_drm.c | 1 - drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 1 - drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 1 - drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 2 +- drivers/gpu/drm/radeon/atombios_crtc.c | 1 - drivers/gpu/drm/radeon/radeon_acpi.c | 2 +- drivers/gpu/drm/radeon/radeon_connectors.c | 1 - drivers/gpu/drm/radeon/radeon_drv.c | 1 - drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 3 +-- include/drm/drm_crtc_helper.h | 2 -- include/drm/drm_fb_helper.h | 5 ----- include/drm/drm_modeset_helper_vtables.h | 6 +++++- 31 files changed, 16 insertions(+), 35 deletions(-)
base-commit: ac04152253dccfb02dcedfa0c57443122cf79314
Signature · 1 line
2.39.0
Thomas Zimmermann
maintainerPATCH v2 1/10 drm: Include <linux/backlight.h> where needed
Include <linux/backlight.h> in source files that need it. Some of DRM's source code gets the backlight header via drm_crtc_helper.h and <linux/fb.h>, which can leed to unnecessary recompilation. If possible, do not include drm_crtc_helper.h any longer.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + drivers/gpu/drm/gma500/backlight.c | 2 ++ drivers/gpu/drm/radeon/radeon_acpi.c | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +1 -1
@@ -24,6 +24,7 @@#include <linux/pci.h> #include <linux/acpi.h> +#include <linux/backlight.h> #include <linux/slab.h> #include <linux/power_supply.h> #include <linux/pm_runtime.h>
@@ -31,7 +32,6 @@#include <acpi/video.h> #include <acpi/actbl.h> -#include <drm/drm_crtc_helper.h> #include "amdgpu.h" #include "amdgpu_pm.h" #include "amdgpu_display.h"
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -0
@@ -67,6 +67,7 @@#include "ivsrcid/ivsrcid_vislands30.h" #include "i2caux_interface.h" +#include <linux/backlight.h> #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/types.h>
drivers/gpu/drm/gma500/backlight.c +2 -0
@@ -7,6 +7,8 @@* Authors: Eric Knopp */ +#include <linux/backlight.h> +#include <acpi/video.h> #include "psb_drv.h"
drivers/gpu/drm/radeon/radeon_acpi.c +1 -1
@@ -22,6 +22,7 @@*/ #include <linux/acpi.h> +#include <linux/backlight.h> #include <linux/pci.h> #include <linux/pm_runtime.h> #include <linux/power_supply.h>
@@ -30,7 +31,6 @@#include <acpi/acpi_bus.h> #include <acpi/video.h> -#include <drm/drm_crtc_helper.h> #include <drm/drm_probe_helper.h> #include "atom.h"
Signature · 1 line
2.39.0
Re: [PATCH v2 01/10] drm: Include <linux/backlight.h> where needed
Hi Thomas,
Quoted 4 lines · Thomas Zimmermann
Include <
linux/backlight.h> in source files that need it. Some of DRM's source code gets the backlight header viadrm_crtc_helper.hand <linux/fb.h>, which can leed to unnecessary recompilation. If possible, do not includedrm_crtc_helper.hany longer.
Are you planning a clean-up of drm_crtc_helper.h later? With a handful of forward it could losse all includes.
Quoted 3 lines
Signed-off-by Thomas Zimmermann <[email protected]>
Quoted 74 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + drivers/gpu/drm/gma500/backlight.c | 2 ++ drivers/gpu/drm/radeon/radeon_acpi.c | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +1
-1@@ -24,6 +24,7 @@#include <linux/pci.h> #include <linux/acpi.h> +#include <linux/backlight.h> #include <linux/slab.h> #include <linux/power_supply.h> #include <linux/pm_runtime.h> @@ -31,7 +32,6 @@#include <acpi/video.h> #include <acpi/actbl.h> -#include <drm/drm_crtc_helper.h> #include "amdgpu.h" #include "amdgpu_pm.h" #include "amdgpu_display.h" drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1
-0@@ -67,6 +67,7 @@#include "ivsrcid/ivsrcid_vislands30.h" #include "i2caux_interface.h" +#include <linux/backlight.h> #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/types.h> drivers/gpu/drm/gma500/backlight.c +2
-0@@ -7,6 +7,8 @@* Authors: Eric Knopp */ +#include <linux/backlight.h> +#include <acpi/video.h> #include "psb_drv.h" drivers/gpu/drm/radeon/radeon_acpi.c +1
-1@@ -22,6 +22,7 @@*/ #include <linux/acpi.h> +#include <linux/backlight.h> #include <linux/pci.h> #include <linux/pm_runtime.h> #include <linux/power_supply.h> @@ -30,7 +31,6 @@#include <acpi/acpi_bus.h> #include <acpi/video.h> -#include <drm/drm_crtc_helper.h> #include <drm/drm_probe_helper.h> #include "atom.h" Signature · 1 line
2.39.0
Thomas Zimmermann
maintainerRe: [PATCH v2 01/10] drm: Include <linux/backlight.h> where needed
Hi
Am 13.01.23 um 16:09 schrieb Sam Ravnborg:
Quoted 9 lines
Hi Thomas,
Quoted 4 lines · Thomas Zimmermann
Include <
linux/backlight.h> in source files that need it. Some of DRM's source code gets the backlight header viadrm_crtc_helper.hand <linux/fb.h>, which can leed to unnecessary recompilation. If possible, do not includedrm_crtc_helper.hany longer.Are you planning a clean-up of
drm_crtc_helper.hlater?With a handful of forward it could losse all includes.
Indeed, looks like it. And a quick grep shows that many source files include this header. I keep it in mind to try to improve that.
Quoted 5 lines
Quoted 4 lines
Signed-off-by Thomas Zimmermann <[email protected]>Reviewed-by Sam Ravnborg <[email protected]>
I've already merged the series. Maxime gave an a-b via IRC. Still thanks for reviewing.
Best regards
Thomas
Quoted 74 lines
Quoted 74 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + drivers/gpu/drm/gma500/backlight.c | 2 ++ drivers/gpu/drm/radeon/radeon_acpi.c | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +1
-1@@ -24,6 +24,7 @@#include <linux/pci.h> #include <linux/acpi.h> +#include <linux/backlight.h> #include <linux/slab.h> #include <linux/power_supply.h> #include <linux/pm_runtime.h> @@ -31,7 +32,6 @@#include <acpi/video.h> #include <acpi/actbl.h> -#include <drm/drm_crtc_helper.h> #include "amdgpu.h" #include "amdgpu_pm.h" #include "amdgpu_display.h" drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1
-0@@ -67,6 +67,7 @@#include "ivsrcid/ivsrcid_vislands30.h" #include "i2caux_interface.h" +#include <linux/backlight.h> #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/types.h> drivers/gpu/drm/gma500/backlight.c +2
-0@@ -7,6 +7,8 @@* Authors: Eric Knopp */ +#include <linux/backlight.h> +#include <acpi/video.h> #include "psb_drv.h" drivers/gpu/drm/radeon/radeon_acpi.c +1
-1@@ -22,6 +22,7 @@*/ #include <linux/acpi.h> +#include <linux/backlight.h> #include <linux/pci.h> #include <linux/pm_runtime.h> #include <linux/power_supply.h> @@ -30,7 +31,6 @@#include <acpi/acpi_bus.h> #include <acpi/video.h> -#include <drm/drm_crtc_helper.h> #include <drm/drm_probe_helper.h> #include "atom.h" Signature · 1 line
2.39.0
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: Ivo Totev
Thomas Zimmermann
maintainerPATCH v2 2/10 drm: Include <linux/of.h> where needed
In reply to Thomas ZimmermannInclude <linux/of.h> in source files that need it. Some of DRM's source code gets OF header via drm_crtc_helper.h and <linux/fb.h>, which can leed to unnecessary recompilation.
In drm_modes.c, add a comment on the reason for still including <linux/fb.h>. The header file is required to get KHZ2PICOS(). The macro is part of the UAPI headers, so it cannot be moved to a less prominent location.
v2:
* include <linux/of.h> in komeda_drv.c (kernel test robot)
--- drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 1 + drivers/gpu/drm/drm_modes.c | 5 +++-- drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 1 + 3 files changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/arm/display/komeda/komeda_drv.c +1 -0
@@ -6,6 +6,7 @@*/ #include <linux/module.h> #include <linux/kernel.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/component.h> #include <linux/pm_runtime.h>
drivers/gpu/drm/drm_modes.c +3 -2
@@ -31,10 +31,11 @@*/ #include <linux/ctype.h> +#include <linux/export.h> +#include <linux/fb.h> /* for KHZ2PICOS() */ #include <linux/list.h> #include <linux/list_sort.h> -#include <linux/export.h> -#include <linux/fb.h> +#include <linux/of.h> #include <video/of_display_timing.h> #include <video/of_videomode.h>
drivers/gpu/drm/panel/panel-ronbo-rb070d30.c +1 -0
@@ -15,6 +15,7 @@#include <linux/kernel.h> #include <linux/media-bus-format.h> #include <linux/module.h> +#include <linux/of.h> #include <linux/gpio/consumer.h> #include <linux/regulator/consumer.h>
Signature · 1 line
2.39.0
Liviu Dudau
maintainerRe: [PATCH v2 02/10] drm: Include <linux/of.h> where needed
Quoted 24 lines · Thomas Zimmermann
Include <
linux/of.h> in source files that need it. Some of DRM's source code gets OF header viadrm_crtc_helper.hand <linux/fb.h>, which can leed to unnecessary recompilation.In
drm_modes.c, add a comment on the reason for still including <linux/fb.h>. The header file is required to getKHZ2PICOS(). The macro is part of the UAPI headers, so it cannot be moved to a less prominent location.v2:
* include <linux/of.h> inkomeda_drv.c(kernel test robot)Signed-off-by Thomas Zimmermann <[email protected]>--- drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 1 + drivers/gpu/drm/drm_modes.c | 5 +++-- drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 1 + 3 files changed, 5 insertions(+), 2 deletions(-)drivers/gpu/drm/arm/display/komeda/komeda_drv.c +0
-0
drivers/gpu/drm/arm/display/komeda/komeda_drv.c line 12
Quoted 7 lines
drivers/gpu/drm/arm/display/komeda/komeda_drv.c +1
-0@@ -6,6 +6,7 @@*/ #include <linux/module.h> #include <linux/kernel.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/component.h> #include <linux/pm_runtime.h>
For komeda: Acked-by: Liviu Dudau <[email protected]>
Best regards,
Liviu
Quoted 33 lines
drivers/gpu/drm/drm_modes.c +3
-2@@ -31,10 +31,11 @@*/ #include <linux/ctype.h> +#include <linux/export.h> +#include <linux/fb.h> /* for KHZ2PICOS() */ #include <linux/list.h> #include <linux/list_sort.h> -#include <linux/export.h> -#include <linux/fb.h> +#include <linux/of.h> #include <video/of_display_timing.h> #include <video/of_videomode.h> drivers/gpu/drm/panel/panel-ronbo-rb070d30.c +1
-0@@ -15,6 +15,7 @@#include <linux/kernel.h> #include <linux/media-bus-format.h> #include <linux/module.h> +#include <linux/of.h> #include <linux/gpio/consumer.h> #include <linux/regulator/consumer.h> Signature · 1 line
2.39.0
Signature · 8 lines
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯Re: [PATCH v2 02/10] drm: Include <linux/of.h> where needed
In reply to Thomas ZimmermannQuoted 8 lines · Thomas Zimmermann
Include <
linux/of.h> in source files that need it. Some of DRM's source code gets OF header viadrm_crtc_helper.hand <linux/fb.h>, which can leed to unnecessary recompilation.In
drm_modes.c, add a comment on the reason for still including <linux/fb.h>. The header file is required to getKHZ2PICOS(). The macro is part of the UAPI headers, so it cannot be moved to a less prominent location.
I never liked that KHZ2PICOS() thing in there. Maybe we should just nuke it and see if anyone notices?
Quoted 55 lines
v2:
* include <linux/of.h> inkomeda_drv.c(kernel test robot)Signed-off-by Thomas Zimmermann <[email protected]>--- drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 1 + drivers/gpu/drm/drm_modes.c | 5 +++-- drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 1 + 3 files changed, 5 insertions(+), 2 deletions(-)drivers/gpu/drm/arm/display/komeda/komeda_drv.c +1
-0@@ -6,6 +6,7 @@*/ #include <linux/module.h> #include <linux/kernel.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/component.h> #include <linux/pm_runtime.h> drivers/gpu/drm/drm_modes.c +3
-2@@ -31,10 +31,11 @@*/ #include <linux/ctype.h> +#include <linux/export.h> +#include <linux/fb.h> /* for KHZ2PICOS() */ #include <linux/list.h> #include <linux/list_sort.h> -#include <linux/export.h> -#include <linux/fb.h> +#include <linux/of.h> #include <video/of_display_timing.h> #include <video/of_videomode.h> drivers/gpu/drm/panel/panel-ronbo-rb070d30.c +1
-0@@ -15,6 +15,7 @@#include <linux/kernel.h> #include <linux/media-bus-format.h> #include <linux/module.h> +#include <linux/of.h> #include <linux/gpio/consumer.h> #include <linux/regulator/consumer.h> Signature · 1 line
2.39.0
Signature · 2 lines
Ville Syrjälä Intel
Re: [PATCH v2 02/10] drm: Include <linux/of.h> where needed
Hi Ville,
Quoted 5 lines · Ville Syrjälä
Quoted 4 lines · Thomas Zimmermann
Include <
linux/of.h> in source files that need it. Some of DRM's source code gets OF header viadrm_crtc_helper.hand <linux/fb.h>, which can leed to unnecessary recompilation.
Quoted 7 lines
Quoted 4 lines
In
drm_modes.c, add a comment on the reason for still including <linux/fb.h>. The header file is required to getKHZ2PICOS(). The macro is part of the UAPI headers, so it cannot be moved to a less prominent location.I never liked that
KHZ2PICOS()thing in there. Maybe we should just nuke it and see if anyone notices?
https://github.com/search?q=KHZ2PICOS&type=code
tells me that it will be noticed.
So it is part of the UAPI
Sam
Re: [PATCH v2 02/10] drm: Include <linux/of.h> where needed
Quoted 7 lines · Sam Ravnborg
Hi Ville,
Quoted 5 lines · Ville Syrjälä
Quoted 4 lines · Thomas Zimmermann
Include <
linux/of.h> in source files that need it. Some of DRM's source code gets OF header viadrm_crtc_helper.hand <linux/fb.h>, which can leed to unnecessary recompilation.
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
In
drm_modes.c, add a comment on the reason for still including <linux/fb.h>. The header file is required to getKHZ2PICOS(). The macro is part of the UAPI headers, so it cannot be moved to a less prominent location.I never liked that
KHZ2PICOS()thing in there. Maybe we should just nuke it and see if anyone notices?
No idea what relevance any of those have.
Quoted 3 lines
tells me that it will be noticed.
So it is part of the UAPI
The only thing it does it potentially mistake some modes for being equal when they are not. So basically just second guessing what the driver/hardware is actually capable of doing.
Signature · 2 lines
Ville Syrjälä Intel
Thomas Zimmermann
maintainerPATCH v2 3/10 drm: Don't include <linux/fb.h> in drm_crtc_helper.h
In reply to Thomas ZimmermannIncluding <linux/fb.h> in drm_crtc_helper.h is not required. Remove the include statement and avoid rebuilding DRM whenever the fbdev header changes.
--- include/drm/drm_crtc_helper.h | 2 -- 1 file changed, 2 deletions(-)
include/drm/drm_crtc_helper.h +0 -2
@@ -37,8 +37,6 @@#include <linux/types.h> #include <linux/idr.h> -#include <linux/fb.h> -#include <drm/drm_crtc.h> #include <drm/drm_modeset_helper_vtables.h> #include <drm/drm_modeset_helper.h>
Signature · 1 line
2.39.0
Re: [PATCH v2 03/10] drm: Don't include <linux/fb.h> in drm_crtc_helper.h
Quoted 14 lines · Thomas Zimmermann
Including <
linux/fb.h> indrm_crtc_helper.his not required. Remove the include statement and avoid rebuilding DRM whenever the fbdev header changes.Signed-off-by Thomas Zimmermann <[email protected]>--- include/drm/drm_crtc_helper.h | 2 -- 1 file changed, 2 deletions(-)include/drm/drm_crtc_helper.h +0
-0
include/drm/drm_crtc_helper.h line 38
Quoted 2 lines
include/drm/drm_crtc_helper.h +0
-0@@ -37,8 +37,6 @@#include <linux/types.h> #include <linux/idr.h>
^ bunch of other unnecessary headers there as well.
Quoted 8 lines
include/drm/drm_crtc_helper.h +0
-2-#include <linux/fb.h> -#include <drm/drm_crtc.h> #include <drm/drm_modeset_helper_vtables.h> #include <drm/drm_modeset_helper.h> Signature · 1 line
2.39.0
Signature · 2 lines
Ville Syrjälä Intel
Thomas Zimmermann
maintainerPATCH v2 4/10 drm/amdgpu: Do not include <linux/fb.h>
In reply to Thomas ZimmermannRemove unnecessary include statements for <linux/fb.h>. No functional changes.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 - drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 1 - drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 1 - drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c | 1 - drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c | 1 - drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c | 1 - drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c | 1 - drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_processpptables.c | 1 - drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 1 - 9 files changed, 9 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -1
@@ -39,7 +39,6 @@#include <linux/mmu_notifier.h> #include <linux/suspend.h> #include <linux/cc_platform.h> -#include <linux/fb.h> #include <linux/dynamic_debug.h> #include "amdgpu.h"
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c +0 -1
@@ -22,7 +22,6 @@*/ #include "pp_debug.h" #include <linux/delay.h> -#include <linux/fb.h> #include <linux/module.h> #include <linux/pci.h> #include <linux/slab.h>
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c +0 -1
@@ -22,7 +22,6 @@*/ #include <linux/delay.h> -#include <linux/fb.h> #include <linux/module.h> #include <linux/pci.h> #include <linux/slab.h>
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c +0 -1
@@ -23,7 +23,6 @@#include <linux/module.h> #include <linux/pci.h> #include <linux/slab.h> -#include <linux/fb.h> #include "vega10_processpptables.h" #include "ppatomfwctrl.h"
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c +0 -1
@@ -22,7 +22,6 @@*/ #include <linux/delay.h> -#include <linux/fb.h> #include <linux/module.h> #include <linux/slab.h>
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c +0 -1
@@ -22,7 +22,6 @@*/ #include <linux/module.h> #include <linux/slab.h> -#include <linux/fb.h> #include "vega12/smu9_driver_if.h" #include "vega12_processpptables.h"
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c +0 -1
@@ -22,7 +22,6 @@*/ #include <linux/delay.h> -#include <linux/fb.h> #include <linux/module.h> #include <linux/slab.h>
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_processpptables.c +0 -1
@@ -22,7 +22,6 @@*/ #include <linux/module.h> #include <linux/slab.h> -#include <linux/fb.h> #include "smu11_driver_if.h" #include "vega20_processpptables.h"
drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c +0 -1
@@ -22,7 +22,6 @@*/ #include <linux/module.h> #include <linux/slab.h> -#include <linux/fb.h> #include "linux/delay.h" #include <linux/types.h> #include <linux/pci.h>
Signature · 1 line
2.39.0
Thomas Zimmermann
maintainerPATCH v2 5/10 drm/panel: Do not include <linux/fb.h>
In reply to Thomas ZimmermannRemove unnecessary include statements for <linux/fb.h>. No functional changes. Include <linux/of.h> where the driver got the header file via <linux/fb.h>.
--- drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 1 - drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 1 - drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 1 - 3 files changed, 3 deletions(-)
drivers/gpu/drm/panel/panel-ilitek-ili9881c.c +0 -1
@@ -7,7 +7,6 @@#include <linux/device.h> #include <linux/err.h> #include <linux/errno.h> -#include <linux/fb.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/of_device.h>
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c +0 -1
@@ -43,7 +43,6 @@#include <linux/delay.h> #include <linux/err.h> -#include <linux/fb.h> #include <linux/i2c.h> #include <linux/media-bus-format.h> #include <linux/module.h>
drivers/gpu/drm/panel/panel-ronbo-rb070d30.c +0 -1
@@ -11,7 +11,6 @@#include <linux/device.h> #include <linux/err.h> #include <linux/errno.h> -#include <linux/fb.h> #include <linux/kernel.h> #include <linux/media-bus-format.h> #include <linux/module.h>
Signature · 1 line
2.39.0
Re: [PATCH v2 05/10] drm/panel: Do not include <linux/fb.h>
Quoted 5 lines · Thomas Zimmermann
Remove unnecessary include statements for <
linux/fb.h>. No functional changes. Include <linux/of.h> where the driver got the header file via <linux/fb.h>.Signed-off-by Thomas Zimmermann <[email protected]>
Quoted 44 lines
--- drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 1 - drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 1 - drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 1 - 3 files changed, 3 deletions(-)drivers/gpu/drm/panel/panel-ilitek-ili9881c.c +0
-1@@ -7,7 +7,6 @@#include <linux/device.h> #include <linux/err.h> #include <linux/errno.h> -#include <linux/fb.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/of_device.h> drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c +0
-1@@ -43,7 +43,6 @@#include <linux/delay.h> #include <linux/err.h> -#include <linux/fb.h> #include <linux/i2c.h> #include <linux/media-bus-format.h> #include <linux/module.h> drivers/gpu/drm/panel/panel-ronbo-rb070d30.c +0
-1@@ -11,7 +11,6 @@#include <linux/device.h> #include <linux/err.h> #include <linux/errno.h> -#include <linux/fb.h> #include <linux/kernel.h> #include <linux/media-bus-format.h> #include <linux/module.h> Signature · 1 line
2.39.0
Thomas Zimmermann
maintainerPATCH v2 6/10 drm: Define enum mode_set_atomic in drm_modeset_helper_tables.h
In reply to Thomas ZimmermannDefine enum mode_set_atomic next to the only interface that uses the type. This will allow for removing several include statements for drm_fb_helper.h. No functional changes.
--- include/drm/drm_fb_helper.h | 5 ----- include/drm/drm_modeset_helper_vtables.h | 6 +++++- 2 files changed, 5 insertions(+), 6 deletions(-)
include/drm/drm_fb_helper.h +0 -5
@@ -37,11 +37,6 @@ struct drm_fb_helper;#include <drm/drm_client.h> -enum mode_set_atomic { -LEAVE_ATOMIC_MODE_SET , -ENTER_ATOMIC_MODE_SET , -}; -/** * struct drm_fb_helper_surface_size - describes fbdev size and scanout surface size * @fb_width: fbdev width
include/drm/drm_modeset_helper_vtables.h +5 -1
@@ -48,10 +48,14 @@* To make this clear all the helper vtables are pulled together in this location here. */ -enum mode_set_atomic ;struct drm_writeback_connector ;struct drm_writeback_job ; +enum mode_set_atomic { +LEAVE_ATOMIC_MODE_SET , +ENTER_ATOMIC_MODE_SET , +}; +/** * struct drm_crtc_helper_funcs - helper operations for CRTCs *
Signature · 1 line
2.39.0
Re: [PATCH v2 06/10] drm: Define enum mode_set_atomic in drm_modeset_helper_tables.h
Quoted 5 lines · Thomas Zimmermann
Define enum
mode_set_atomicnext to the only interface that uses the type. This will allow for removing several include statements fordrm_fb_helper.h. No functional changes.Signed-off-by Thomas Zimmermann <[email protected]>
Quoted 43 lines
--- include/drm/drm_fb_helper.h | 5 ----- include/drm/drm_modeset_helper_vtables.h | 6 +++++- 2 files changed, 5 insertions(+), 6 deletions(-)include/drm/drm_fb_helper.h +0
-5@@ -37,11 +37,6 @@ struct drm_fb_helper;#include <drm/drm_client.h> -enum mode_set_atomic { -LEAVE_ATOMIC_MODE_SET , -ENTER_ATOMIC_MODE_SET , -}; -/** * struct drm_fb_helper_surface_size - describes fbdev size and scanout surface size * @fb_width: fbdev width include/drm/drm_modeset_helper_vtables.h +5
-1@@ -48,10 +48,14 @@* To make this clear all the helper vtables are pulled together in this location here. */ -enum mode_set_atomic ;struct drm_writeback_connector ;struct drm_writeback_job ; +enum mode_set_atomic { +LEAVE_ATOMIC_MODE_SET , +ENTER_ATOMIC_MODE_SET , +}; +/** * struct drm_crtc_helper_funcs - helper operations for CRTCs * Signature · 1 line
2.39.0
Signature · 2 lines
Ville Syrjälä Intel
Thomas Zimmermann
maintainerPATCH v2 7/10 drm/amdgpu: Do not include <drm/drm_fb_helper.h>
In reply to Thomas ZimmermannIncluding <drm/drm_fb_helper.h> is not required, so remove the include statements. No functional changes.
--- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 1 - drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 1 - drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 - drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 1 - 4 files changed, 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +0 -1
@@ -21,7 +21,6 @@* */ -#include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_vblank.h>
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +0 -1
@@ -21,7 +21,6 @@* */ -#include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_vblank.h>
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +0 -1
@@ -23,7 +23,6 @@#include <linux/pci.h> -#include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_vblank.h>
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +0 -1
@@ -21,7 +21,6 @@* */ -#include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_vblank.h>
Signature · 1 line
2.39.0
Re: [PATCH v2 07/10] drm/amdgpu: Do not include <drm/drm_fb_helper.h>
Am 11.01.23 um 14:02 schrieb Thomas Zimmermann:
Quoted 2 lines
Including <
drm/drm_fb_helper.h> is not required, so remove the include statements. No functional changes.
Do you want to push them to drm-misc-next because of some inter-dependencies or should I pick them up through amd-staging-drm-next?
Christian.
Quoted 57 lines
Signed-off-by Thomas Zimmermann <[email protected]>--- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 1 - drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 1 - drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 - drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 1 - 4 files changed, 4 deletions(-)drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +0
-1@@ -21,7 +21,6 @@* */ -#include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_vblank.h> drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +0
-1@@ -21,7 +21,6 @@* */ -#include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_vblank.h> drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +0
-1@@ -23,7 +23,6 @@#include <linux/pci.h> -#include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_vblank.h> drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +0
-1@@ -21,7 +21,6 @@* */ -#include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_vblank.h>
Thomas Zimmermann
maintainerRe: [PATCH v2 07/10] drm/amdgpu: Do not include <drm/drm_fb_helper.h>
Hi
Am 11.01.23 um 14:21 schrieb Christian König:
Quoted 7 lines
Am 11.01.23 um 14:02 schrieb Thomas Zimmermann:
Quoted 2 lines
Including <
drm/drm_fb_helper.h> is not required, so remove the include statements. No functional changes.Do you want to push them to drm-misc-next because of some inter-dependencies or should I pick them up through amd-staging-drm-next?
I'd like to take the whole patchset via drm-misc-next. The earlier OF and backlight includes are required for some of the later removals. Best to keep this in one piece.
Best regards
Thomas
Quoted 52 lines
Christian.
Quoted 48 lines
Signed-off-by Thomas Zimmermann <[email protected]>---
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c| 1 -
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c| 1 -
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 -
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 1 -4 files changed, 4 deletions(-)drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +0
-1@@ -21,7 +21,6 @@* */ -#include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_vblank.h>drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +0
-1@@ -21,7 +21,6 @@* */ -#include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_vblank.h>drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +0
-1@@ -23,7 +23,6 @@ #include <linux/pci.h> -#include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_vblank.h>drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +0
-1@@ -21,7 +21,6 @@* */ -#include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_vblank.h>
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: Ivo Totev
Thomas Zimmermann
maintainerPATCH v2 8/10 drm/nouveau: Do not include <drm/drm_fb_helper.h>
In reply to Thomas ZimmermannIncluding <drm/drm_fb_helper.h> is not required, so remove the include statement. No functional changes.
--- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 1 - drivers/gpu/drm/nouveau/nouveau_drm.c | 1 - 2 files changed, 2 deletions(-)
drivers/gpu/drm/nouveau/dispnv04/crtc.c +0 -1
@@ -23,7 +23,6 @@* DEALINGS IN THE SOFTWARE. */ #include <drm/drm_crtc_helper.h> -#include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_plane_helper.h> #include <drm/drm_vblank.h>
drivers/gpu/drm/nouveau/nouveau_drm.c +0 -1
@@ -33,7 +33,6 @@#include <drm/drm_aperture.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_helper.h> #include <drm/drm_fbdev_generic.h> #include <drm/drm_gem_ttm_helper.h> #include <drm/drm_ioctl.h>
Signature · 1 line
2.39.0
Thomas Zimmermann
maintainerPATCH v2 9/10 drm/radeon: Remove trailing whitespaces
In reply to Thomas ZimmermannFix coding style. No functional changes.
--- drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_legacy_crtc.c +1 -1
@@ -322,7 +322,7 @@ static void radeon_crtc_dpms(struct drm_crtc *crtc, int mode)*/ if (rdev->flags &RADEON_SINGLE_CRTC ) crtc_ext_cntl =RADEON_CRTC_CRT_ON ; - +switch (mode) {case DRM_MODE_DPMS_ON : radeon_crtc->enabled = true;
Signature · 1 line
2.39.0
Thomas Zimmermann
maintainerPATCH v2 10/10 drm/radeon: Do not include <drm/drm_fb_helper.h>
In reply to Thomas ZimmermannIncluding <drm/drm_fb_helper.h> is not required, so remove the include statements. No functional changes.
--- drivers/gpu/drm/radeon/atombios_crtc.c | 1 - drivers/gpu/drm/radeon/radeon_connectors.c | 1 - drivers/gpu/drm/radeon/radeon_drv.c | 1 - drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 1 - 4 files changed, 4 deletions(-)
drivers/gpu/drm/radeon/atombios_crtc.c +0 -1
@@ -25,7 +25,6 @@*/ #include <drm/drm_crtc_helper.h> -#include <drm/drm_fb_helper.h> #include <drm/drm_fixed.h> #include <drm/drm_fourcc.h> #include <drm/drm_framebuffer.h>
drivers/gpu/drm/radeon/radeon_connectors.c +0 -1
@@ -27,7 +27,6 @@#include <drm/display/drm_dp_mst_helper.h> #include <drm/drm_edid.h> #include <drm/drm_crtc_helper.h> -#include <drm/drm_fb_helper.h> #include <drm/drm_probe_helper.h> #include <drm/radeon_drm.h> #include "radeon.h"
drivers/gpu/drm/radeon/radeon_drv.c +0 -1
@@ -40,7 +40,6 @@#include <drm/drm_aperture.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_helper.h> #include <drm/drm_file.h> #include <drm/drm_gem.h> #include <drm/drm_ioctl.h>
drivers/gpu/drm/radeon/radeon_legacy_crtc.c +0 -1
@@ -25,7 +25,6 @@*/ #include <drm/drm_crtc_helper.h> -#include <drm/drm_fb_helper.h> #include <drm/drm_fixed.h> #include <drm/drm_fourcc.h> #include <drm/drm_framebuffer.h>
Signature · 1 line
2.39.0
Hi Thomas.
Quoted 8 lines · Thomas Zimmermann
Remove unnecessary include statements for <
linux/fb.h>. I recently changed this header and had to rebuild a good part of DRM. So avoid this by removing the dependency.Several files include <
linux/fb.h> viadrm_fb_helper.h. So in v2 I added additional patches that remove some of those include statements as well.
Quoted 6 lines
Some source files require the OF or backlight headers. Include those instead.
v2:
* add more patches to handledrm_fb_helper.hincludes
* fix komeda build (kernel test robot)
Whole series are:
Except for the patches where I added an explicit r-b.
Sam