linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] drm: Do not include <linux/fb.h> unnecessarily
@ 2023-01-09 10:12 Thomas Zimmermann
  2023-01-09 10:12 ` [PATCH 1/5] drm: Include <linux/backlight.h> where needed Thomas Zimmermann
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Thomas Zimmermann @ 2023-01-09 10:12 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, airlied, daniel,
	maarten.lankhorst, mripard, patrik.r.jakobsson, thierry.reding,
	sam, f.fainelli
  Cc: dri-devel, bcm-kernel-feedback-list, linux-rpi-kernel,
	linux-arm-kernel, amd-gfx, 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.

Some source files require the OF or backlight headers. Include those
instead.

Thomas Zimmermann (5):
  drm: Include <linux/backlight.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: Include <linux/of.h> in drm_modes.c

 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c                     | 2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.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/drm_modes.c                                  | 5 +++--
 drivers/gpu/drm/gma500/backlight.c                           | 2 ++
 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/radeon_acpi.c                         | 2 +-
 include/drm/drm_crtc_helper.h                                | 2 --
 18 files changed, 9 insertions(+), 18 deletions(-)


base-commit: ac04152253dccfb02dcedfa0c57443122cf79314
-- 
2.39.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/5] drm: Include <linux/backlight.h> where needed
  2023-01-09 10:12 [PATCH 0/5] drm: Do not include <linux/fb.h> unnecessarily Thomas Zimmermann
@ 2023-01-09 10:12 ` Thomas Zimmermann
  2023-01-09 10:29   ` Christian König
  2023-01-09 10:12 ` [PATCH 2/5] drm: Don't include linux/fb.h in drm_crtc_helper.h Thomas Zimmermann
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Thomas Zimmermann @ 2023-01-09 10:12 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, airlied, daniel,
	maarten.lankhorst, mripard, patrik.r.jakobsson, thierry.reding,
	sam, f.fainelli
  Cc: dri-devel, bcm-kernel-feedback-list, linux-rpi-kernel,
	linux-arm-kernel, amd-gfx, Thomas Zimmermann

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.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 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(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
index 57b5e11446c6..f29c1d0ad4c1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -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"
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 1b7f20a9d4ae..55a845eb0c6d 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -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>
diff --git a/drivers/gpu/drm/gma500/backlight.c b/drivers/gpu/drm/gma500/backlight.c
index 577a4987b193..8711a7a5b8da 100644
--- a/drivers/gpu/drm/gma500/backlight.c
+++ b/drivers/gpu/drm/gma500/backlight.c
@@ -7,6 +7,8 @@
  * Authors: Eric Knopp
  */
 
+#include <linux/backlight.h>
+
 #include <acpi/video.h>
 
 #include "psb_drv.h"
diff --git a/drivers/gpu/drm/radeon/radeon_acpi.c b/drivers/gpu/drm/radeon/radeon_acpi.c
index b603c0b77075..5771d1fcb073 100644
--- a/drivers/gpu/drm/radeon/radeon_acpi.c
+++ b/drivers/gpu/drm/radeon/radeon_acpi.c
@@ -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"
-- 
2.39.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/5] drm: Don't include linux/fb.h in drm_crtc_helper.h
  2023-01-09 10:12 [PATCH 0/5] drm: Do not include <linux/fb.h> unnecessarily Thomas Zimmermann
  2023-01-09 10:12 ` [PATCH 1/5] drm: Include <linux/backlight.h> where needed Thomas Zimmermann
@ 2023-01-09 10:12 ` Thomas Zimmermann
  2023-01-09 10:12 ` [PATCH 3/5] drm/amdgpu: Do not include <linux/fb.h> Thomas Zimmermann
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Thomas Zimmermann @ 2023-01-09 10:12 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, airlied, daniel,
	maarten.lankhorst, mripard, patrik.r.jakobsson, thierry.reding,
	sam, f.fainelli
  Cc: dri-devel, bcm-kernel-feedback-list, linux-rpi-kernel,
	linux-arm-kernel, amd-gfx, Thomas Zimmermann

Including <linux/fb.h> in drm_crtc_helper.h is not required. Remove
the include statement and avoid rebuilding DRM whenever the fbdev
header changes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 include/drm/drm_crtc_helper.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
index 1840db247f69..072bc4f90349 100644
--- a/include/drm/drm_crtc_helper.h
+++ b/include/drm/drm_crtc_helper.h
@@ -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>
-- 
2.39.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/5] drm/amdgpu: Do not include <linux/fb.h>
  2023-01-09 10:12 [PATCH 0/5] drm: Do not include <linux/fb.h> unnecessarily Thomas Zimmermann
  2023-01-09 10:12 ` [PATCH 1/5] drm: Include <linux/backlight.h> where needed Thomas Zimmermann
  2023-01-09 10:12 ` [PATCH 2/5] drm: Don't include linux/fb.h in drm_crtc_helper.h Thomas Zimmermann
@ 2023-01-09 10:12 ` Thomas Zimmermann
  2023-01-09 10:30   ` Christian König
  2023-01-09 10:12 ` [PATCH 4/5] drm/panel: " Thomas Zimmermann
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Thomas Zimmermann @ 2023-01-09 10:12 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, airlied, daniel,
	maarten.lankhorst, mripard, patrik.r.jakobsson, thierry.reding,
	sam, f.fainelli
  Cc: dri-devel, bcm-kernel-feedback-list, linux-rpi-kernel,
	linux-arm-kernel, amd-gfx, Thomas Zimmermann

Remove unnecessary include statements for <linux/fb.h>. No functional
changes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 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(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 1353ffd08988..ebc6e6cbe2ab 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -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"
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
index 7ef7e81525a3..d6edd83f67c6 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
@@ -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>
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c
index c8c9fb827bda..733cac4600ff 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c
@@ -22,7 +22,6 @@
  */
 
 #include <linux/delay.h>
-#include <linux/fb.h>
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/slab.h>
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c
index 95b988823f50..bb90d8abf79b 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c
@@ -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"
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c
index a2f4d6773d45..c73693dc4c09 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c
@@ -22,7 +22,6 @@
  */
 
 #include <linux/delay.h>
-#include <linux/fb.h>
 #include <linux/module.h>
 #include <linux/slab.h>
 
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c
index bd54fbd393b9..89148f73b514 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c
@@ -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"
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c
index b30684c84e20..33f3d9792181 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c
@@ -22,7 +22,6 @@
  */
 
 #include <linux/delay.h>
-#include <linux/fb.h>
 #include <linux/module.h>
 #include <linux/slab.h>
 
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_processpptables.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_processpptables.c
index 1f9082539457..79c817752a33 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_processpptables.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_processpptables.c
@@ -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"
diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
index 5ca3c422f7d4..5c3f42d97f69 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
@@ -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>
-- 
2.39.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/5] drm/panel: Do not include <linux/fb.h>
  2023-01-09 10:12 [PATCH 0/5] drm: Do not include <linux/fb.h> unnecessarily Thomas Zimmermann
                   ` (2 preceding siblings ...)
  2023-01-09 10:12 ` [PATCH 3/5] drm/amdgpu: Do not include <linux/fb.h> Thomas Zimmermann
@ 2023-01-09 10:12 ` Thomas Zimmermann
  2023-01-09 10:12 ` [PATCH 5/5] drm: Include <linux/of.h> in drm_modes.c Thomas Zimmermann
  2023-01-13 10:36 ` [PATCH 0/5] drm: Do not include <linux/fb.h> unnecessarily Maxime Ripard
  5 siblings, 0 replies; 10+ messages in thread
From: Thomas Zimmermann @ 2023-01-09 10:12 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, airlied, daniel,
	maarten.lankhorst, mripard, patrik.r.jakobsson, thierry.reding,
	sam, f.fainelli
  Cc: dri-devel, bcm-kernel-feedback-list, linux-rpi-kernel,
	linux-arm-kernel, amd-gfx, 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 <tzimmermann@suse.de>
---
 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 +-
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
index cbb68caa36f2..1ec696adf9de 100644
--- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
+++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
@@ -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>
diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
index 79f852465a84..35d568da342f 100644
--- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
+++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
@@ -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>
diff --git a/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c b/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
index a8a98c91b13c..2ef5ea5eaeeb 100644
--- a/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
+++ b/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
@@ -11,10 +11,10 @@
 #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>
+#include <linux/of.h>
 
 #include <linux/gpio/consumer.h>
 #include <linux/regulator/consumer.h>
-- 
2.39.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/5] drm: Include <linux/of.h> in drm_modes.c
  2023-01-09 10:12 [PATCH 0/5] drm: Do not include <linux/fb.h> unnecessarily Thomas Zimmermann
                   ` (3 preceding siblings ...)
  2023-01-09 10:12 ` [PATCH 4/5] drm/panel: " Thomas Zimmermann
@ 2023-01-09 10:12 ` Thomas Zimmermann
  2023-01-13 10:36 ` [PATCH 0/5] drm: Do not include <linux/fb.h> unnecessarily Maxime Ripard
  5 siblings, 0 replies; 10+ messages in thread
From: Thomas Zimmermann @ 2023-01-09 10:12 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, airlied, daniel,
	maarten.lankhorst, mripard, patrik.r.jakobsson, thierry.reding,
	sam, f.fainelli
  Cc: dri-devel, bcm-kernel-feedback-list, linux-rpi-kernel,
	linux-arm-kernel, amd-gfx, Thomas Zimmermann

Include <linux/of.h> in drm_modes.c for of_property_read_u32(). Until
now, the OF header got included via <linux/fb.h>.

Also comment on the reason for still including <linux/fb.h>. The header
file is still required to get KHZ2PICOS(). The macro is part of the UAPI
headers, so it cannot be moved to a less prominent location.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/drm_modes.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index be030f4a5311..40d482a01178 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -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>
-- 
2.39.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/5] drm: Include <linux/backlight.h> where needed
  2023-01-09 10:12 ` [PATCH 1/5] drm: Include <linux/backlight.h> where needed Thomas Zimmermann
@ 2023-01-09 10:29   ` Christian König
  0 siblings, 0 replies; 10+ messages in thread
From: Christian König @ 2023-01-09 10:29 UTC (permalink / raw)
  To: Thomas Zimmermann, alexander.deucher, christian.koenig, airlied,
	daniel, maarten.lankhorst, mripard, patrik.r.jakobsson,
	thierry.reding, sam, f.fainelli
  Cc: dri-devel, amd-gfx, bcm-kernel-feedback-list, linux-rpi-kernel,
	linux-arm-kernel

Am 09.01.23 um 11:12 schrieb Thomas Zimmermann:
> 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.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>

Acked-by: Christian König <christian.koenig@amd.com> for the amdgpu parts.

> ---
>   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(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> index 57b5e11446c6..f29c1d0ad4c1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> @@ -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"
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 1b7f20a9d4ae..55a845eb0c6d 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -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>
> diff --git a/drivers/gpu/drm/gma500/backlight.c b/drivers/gpu/drm/gma500/backlight.c
> index 577a4987b193..8711a7a5b8da 100644
> --- a/drivers/gpu/drm/gma500/backlight.c
> +++ b/drivers/gpu/drm/gma500/backlight.c
> @@ -7,6 +7,8 @@
>    * Authors: Eric Knopp
>    */
>   
> +#include <linux/backlight.h>
> +
>   #include <acpi/video.h>
>   
>   #include "psb_drv.h"
> diff --git a/drivers/gpu/drm/radeon/radeon_acpi.c b/drivers/gpu/drm/radeon/radeon_acpi.c
> index b603c0b77075..5771d1fcb073 100644
> --- a/drivers/gpu/drm/radeon/radeon_acpi.c
> +++ b/drivers/gpu/drm/radeon/radeon_acpi.c
> @@ -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"


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/5] drm/amdgpu: Do not include <linux/fb.h>
  2023-01-09 10:12 ` [PATCH 3/5] drm/amdgpu: Do not include <linux/fb.h> Thomas Zimmermann
@ 2023-01-09 10:30   ` Christian König
  0 siblings, 0 replies; 10+ messages in thread
From: Christian König @ 2023-01-09 10:30 UTC (permalink / raw)
  To: Thomas Zimmermann, alexander.deucher, christian.koenig, airlied,
	daniel, maarten.lankhorst, mripard, patrik.r.jakobsson,
	thierry.reding, sam, f.fainelli
  Cc: dri-devel, amd-gfx, bcm-kernel-feedback-list, linux-rpi-kernel,
	linux-arm-kernel

Am 09.01.23 um 11:12 schrieb Thomas Zimmermann:
> Remove unnecessary include statements for <linux/fb.h>. No functional
> changes.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>

Acked-by: Christian König <christian.koenig@amd.com>

> ---
>   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(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 1353ffd08988..ebc6e6cbe2ab 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -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"
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> index 7ef7e81525a3..d6edd83f67c6 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> @@ -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>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c
> index c8c9fb827bda..733cac4600ff 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c
> @@ -22,7 +22,6 @@
>    */
>   
>   #include <linux/delay.h>
> -#include <linux/fb.h>
>   #include <linux/module.h>
>   #include <linux/pci.h>
>   #include <linux/slab.h>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c
> index 95b988823f50..bb90d8abf79b 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c
> @@ -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"
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c
> index a2f4d6773d45..c73693dc4c09 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c
> @@ -22,7 +22,6 @@
>    */
>   
>   #include <linux/delay.h>
> -#include <linux/fb.h>
>   #include <linux/module.h>
>   #include <linux/slab.h>
>   
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c
> index bd54fbd393b9..89148f73b514 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c
> @@ -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"
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c
> index b30684c84e20..33f3d9792181 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c
> @@ -22,7 +22,6 @@
>    */
>   
>   #include <linux/delay.h>
> -#include <linux/fb.h>
>   #include <linux/module.h>
>   #include <linux/slab.h>
>   
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_processpptables.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_processpptables.c
> index 1f9082539457..79c817752a33 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_processpptables.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_processpptables.c
> @@ -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"
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
> index 5ca3c422f7d4..5c3f42d97f69 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
> @@ -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>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/5] drm: Do not include <linux/fb.h> unnecessarily
  2023-01-09 10:12 [PATCH 0/5] drm: Do not include <linux/fb.h> unnecessarily Thomas Zimmermann
                   ` (4 preceding siblings ...)
  2023-01-09 10:12 ` [PATCH 5/5] drm: Include <linux/of.h> in drm_modes.c Thomas Zimmermann
@ 2023-01-13 10:36 ` Maxime Ripard
  2023-01-13 12:10   ` Thomas Zimmermann
  5 siblings, 1 reply; 10+ messages in thread
From: Maxime Ripard @ 2023-01-13 10:36 UTC (permalink / raw)
  To: Thomas Zimmermann
  Cc: alexander.deucher, christian.koenig, airlied, daniel,
	maarten.lankhorst, patrik.r.jakobsson, thierry.reding, sam,
	f.fainelli, dri-devel, bcm-kernel-feedback-list, linux-rpi-kernel,
	linux-arm-kernel, amd-gfx


[-- Attachment #1.1: Type: text/plain, Size: 407 bytes --]

On Mon, Jan 09, 2023 at 11:12:38AM +0100, Thomas Zimmermann wrote:
> 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.
> 
> Some source files require the OF or backlight headers. Include those
> instead.

For the series:
Acked-by: Maxime Ripard <maxime@cerno.tech>

Maxime

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/5] drm: Do not include <linux/fb.h> unnecessarily
  2023-01-13 10:36 ` [PATCH 0/5] drm: Do not include <linux/fb.h> unnecessarily Maxime Ripard
@ 2023-01-13 12:10   ` Thomas Zimmermann
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Zimmermann @ 2023-01-13 12:10 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: f.fainelli, amd-gfx, sam, thierry.reding,
	bcm-kernel-feedback-list, dri-devel, alexander.deucher,
	christian.koenig, linux-arm-kernel, linux-rpi-kernel


[-- Attachment #1.1.1: Type: text/plain, Size: 715 bytes --]



Am 13.01.23 um 11:36 schrieb Maxime Ripard:
> On Mon, Jan 09, 2023 at 11:12:38AM +0100, Thomas Zimmermann wrote:
>> 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.
>>
>> Some source files require the OF or backlight headers. Include those
>> instead.
> 
> For the series:
> Acked-by: Maxime Ripard <maxime@cerno.tech>

per irc discussion, acked for all of v2 as well

> 
> Maxime

-- 
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

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-01-13 12:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-09 10:12 [PATCH 0/5] drm: Do not include <linux/fb.h> unnecessarily Thomas Zimmermann
2023-01-09 10:12 ` [PATCH 1/5] drm: Include <linux/backlight.h> where needed Thomas Zimmermann
2023-01-09 10:29   ` Christian König
2023-01-09 10:12 ` [PATCH 2/5] drm: Don't include linux/fb.h in drm_crtc_helper.h Thomas Zimmermann
2023-01-09 10:12 ` [PATCH 3/5] drm/amdgpu: Do not include <linux/fb.h> Thomas Zimmermann
2023-01-09 10:30   ` Christian König
2023-01-09 10:12 ` [PATCH 4/5] drm/panel: " Thomas Zimmermann
2023-01-09 10:12 ` [PATCH 5/5] drm: Include <linux/of.h> in drm_modes.c Thomas Zimmermann
2023-01-13 10:36 ` [PATCH 0/5] drm: Do not include <linux/fb.h> unnecessarily Maxime Ripard
2023-01-13 12:10   ` Thomas Zimmermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).