drm/xe: move xe_display.[ch] under display/
Subsystems (3)
PATCH 1/2 drm/xe: move xe_display.[ch] under display/
All the other display related files are under display/ subdirectory, also move xe_display.[ch] there.
Sort the build list while at it.
---
drivers/gpu/drm/xe/Makefile | 18 +++++++++---------
drivers/gpu/drm/xe/{ => display}/xe_display.c | 0
drivers/gpu/drm/xe/{ => display}/xe_display.h | 0
3 files changed, 9 insertions(+), 9 deletions(-)
rename drivers/gpu/drm/xe/{ => display}/xe_display.c (100%)
rename drivers/gpu/drm/xe/{ => display}/xe_display.h (100%)drivers/gpu/drm/xe/Makefile +9 -9
@@ -185,17 +185,17 @@ $(obj)/i915-display/%.o: $(srctree)/drivers/gpu/drm/i915/display/%.c FORCE # Display code specific to xe xe-$(CONFIG_DRM_XE_DISPLAY) += \ - xe_display.o \ - display/xe_fb_pin.o \ - display/xe_hdcp_gsc.o \ - display/xe_plane_initial.o \ - display/xe_display_rps.o \ + display/ext/i915_irq.o \ + display/ext/i915_utils.o \ + display/intel_fb_bo.o \ + display/intel_fbdev_fb.o \ + display/xe_display.o \ display/xe_display_misc.o \ + display/xe_display_rps.o \ display/xe_dsb_buffer.o \ - display/intel_fbdev_fb.o \ - display/intel_fb_bo.o \ - display/ext/i915_irq.o \ - display/ext/i915_utils.o + display/xe_fb_pin.o \ + display/xe_hdcp_gsc.o \ + display/xe_plane_initial.o # SOC code shared with i915 xe-$(CONFIG_DRM_XE_DISPLAY) += \
drivers/gpu/drm/xe/display/xe_display.c renamed from drivers/gpu/drm/xe/xe_display.c +0 -0
drivers/gpu/drm/xe/display/xe_display.h renamed from drivers/gpu/drm/xe/xe_display.h +0 -0
Signature · 1 line
2.39.2
PATCH 2/2 drm/xe: drop display/ subdir from include directories
There are very few places that need to include anything from under display/. Require the display/ prefix in #include directives, and drop the subdirectory from the header search path.
Sort the include lists while at it.
--- drivers/gpu/drm/xe/Makefile | 1 - drivers/gpu/drm/xe/xe_device.c | 6 +++--- drivers/gpu/drm/xe/xe_irq.c | 2 +- drivers/gpu/drm/xe/xe_pci.c | 2 +- drivers/gpu/drm/xe/xe_pm.c | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-)
drivers/gpu/drm/xe/Makefile +0 -1
@@ -165,7 +165,6 @@ xe-$(CONFIG_DRM_XE_KUNIT_TEST) += \ subdir-ccflags-$(CONFIG_DRM_XE_DISPLAY) += \ -I$(srctree)/$(src)/display/ext \ -I$(srctree)/$(src)/compat-i915-headers \ - -I$(srctree)/drivers/gpu/drm/xe/display/ \ -I$(srctree)/drivers/gpu/drm/i915/display/ \ -Ddrm_i915_gem_object=xe_bo \ -Ddrm_i915_private=xe_device
drivers/gpu/drm/xe/xe_device.c +3 -3
@@ -15,20 +15,21 @@#include <drm/drm_print.h> #include <drm/xe_drm.h> +#include "display/xe_display.h" #include "regs/xe_gt_regs.h" #include "regs/xe_regs.h" #include "xe_bo.h" #include "xe_debugfs.h" -#include "xe_display.h" #include "xe_dma_buf.h" #include "xe_drm_client.h" #include "xe_drv.h" -#include "xe_exec_queue.h" #include "xe_exec.h" +#include "xe_exec_queue.h" #include "xe_ggtt.h" #include "xe_gsc_proxy.h" #include "xe_gt.h" #include "xe_gt_mcr.h" +#include "xe_hwmon.h" #include "xe_irq.h" #include "xe_memirq.h" #include "xe_mmio.h"
@@ -43,7 +44,6 @@#include "xe_ttm_sys_mgr.h" #include "xe_vm.h" #include "xe_wait_user_fence.h" -#include "xe_hwmon.h" #ifdef CONFIG_LOCKDEP struct lockdep_map xe_device_mem_access_lockdep_map = {
drivers/gpu/drm/xe/xe_irq.c +1 -1
@@ -9,10 +9,10 @@#include <drm/drm_managed.h> +#include "display/xe_display.h" #include "regs/xe_gt_regs.h" #include "regs/xe_regs.h" #include "xe_device.h" -#include "xe_display.h" #include "xe_drv.h" #include "xe_gsc_proxy.h" #include "xe_gt.h"
drivers/gpu/drm/xe/xe_pci.c +1 -1
@@ -15,9 +15,9 @@#include <drm/drm_drv.h> #include <drm/xe_pciids.h> +#include "display/xe_display.h" #include "regs/xe_gt_regs.h" #include "xe_device.h" -#include "xe_display.h" #include "xe_drv.h" #include "xe_gt.h" #include "xe_macros.h"
drivers/gpu/drm/xe/xe_pm.c +1 -1
@@ -10,11 +10,11 @@#include <drm/drm_managed.h> #include <drm/ttm/ttm_placement.h> +#include "display/xe_display.h" #include "xe_bo.h" #include "xe_bo_evict.h" #include "xe_device.h" #include "xe_device_sysfs.h" -#include "xe_display.h" #include "xe_ggtt.h" #include "xe_gt.h" #include "xe_guc.h"
Signature · 1 line
2.39.2
Re: [PATCH 2/2] drm/xe: drop display/ subdir from include directories
Quoted 7 lines · Jani Nikula
There are very few places that need to include anything from under display/. Require the display/ prefix in #include directives, and drop the subdirectory from the header search path.
Sort the include lists while at it.
Signed-off-by Jani Nikula <[email protected]>
Quoted 107 lines
--- drivers/gpu/drm/xe/Makefile | 1 - drivers/gpu/drm/xe/xe_device.c | 6 +++--- drivers/gpu/drm/xe/xe_irq.c | 2 +- drivers/gpu/drm/xe/xe_pci.c | 2 +- drivers/gpu/drm/xe/xe_pm.c | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-)drivers/gpu/drm/xe/Makefile +0
-1@@ -165,7 +165,6 @@ xe-$(CONFIG_DRM_XE_KUNIT_TEST) += \ subdir-ccflags-$(CONFIG_DRM_XE_DISPLAY) += \ -I$(srctree)/$(src)/display/ext \ -I$(srctree)/$(src)/compat-i915-headers \ - -I$(srctree)/drivers/gpu/drm/xe/display/ \ -I$(srctree)/drivers/gpu/drm/i915/display/ \ -Ddrm_i915_gem_object=xe_bo \ -Ddrm_i915_private=xe_devicedrivers/gpu/drm/xe/xe_device.c +3
-3@@ -15,20 +15,21 @@#include <drm/drm_print.h> #include <drm/xe_drm.h> +#include "display/xe_display.h" #include "regs/xe_gt_regs.h" #include "regs/xe_regs.h" #include "xe_bo.h" #include "xe_debugfs.h" -#include "xe_display.h" #include "xe_dma_buf.h" #include "xe_drm_client.h" #include "xe_drv.h" -#include "xe_exec_queue.h" #include "xe_exec.h" +#include "xe_exec_queue.h" #include "xe_ggtt.h" #include "xe_gsc_proxy.h" #include "xe_gt.h" #include "xe_gt_mcr.h" +#include "xe_hwmon.h" #include "xe_irq.h" #include "xe_memirq.h" #include "xe_mmio.h" @@ -43,7 +44,6 @@#include "xe_ttm_sys_mgr.h" #include "xe_vm.h" #include "xe_wait_user_fence.h" -#include "xe_hwmon.h" #ifdef CONFIG_LOCKDEP struct lockdep_map xe_device_mem_access_lockdep_map = {drivers/gpu/drm/xe/xe_irq.c +1
-1@@ -9,10 +9,10 @@#include <drm/drm_managed.h> +#include "display/xe_display.h" #include "regs/xe_gt_regs.h" #include "regs/xe_regs.h" #include "xe_device.h" -#include "xe_display.h" #include "xe_drv.h" #include "xe_gsc_proxy.h" #include "xe_gt.h" drivers/gpu/drm/xe/xe_pci.c +1
-1@@ -15,9 +15,9 @@#include <drm/drm_drv.h> #include <drm/xe_pciids.h> +#include "display/xe_display.h" #include "regs/xe_gt_regs.h" #include "xe_device.h" -#include "xe_display.h" #include "xe_drv.h" #include "xe_gt.h" #include "xe_macros.h" drivers/gpu/drm/xe/xe_pm.c +1
-1@@ -10,11 +10,11 @@#include <drm/drm_managed.h> #include <drm/ttm/ttm_placement.h> +#include "display/xe_display.h" #include "xe_bo.h" #include "xe_bo_evict.h" #include "xe_device.h" #include "xe_device_sysfs.h" -#include "xe_display.h" #include "xe_ggtt.h" #include "xe_gt.h" #include "xe_guc.h" Signature · 1 line
2.39.2
Re: [PATCH 2/2] drm/xe: drop display/ subdir from include directories
In reply to Jani NikulaQuoted 99 lines · Jani Nikula
There are very few places that need to include anything from under display/. Require the display/ prefix in #include directives, and drop the subdirectory from the header search path.
Sort the include lists while at it.
Signed-off-by Jani Nikula <[email protected]>---
drivers/gpu/drm/xe/Makefile | 1 - drivers/gpu/drm/xe/xe_device.c | 6 +++--- drivers/gpu/drm/xe/xe_irq.c | 2 +- drivers/gpu/drm/xe/xe_pci.c | 2 +- drivers/gpu/drm/xe/xe_pm.c | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-)drivers/gpu/drm/xe/Makefile +0
-1@@ -165,7 +165,6 @@ xe-$(CONFIG_DRM_XE_KUNIT_TEST) += \ subdir-ccflags-$(CONFIG_DRM_XE_DISPLAY) += \ -I$(srctree)/$(src)/display/ext \ -I$(srctree)/$(src)/compat-i915-headers \ - -I$(srctree)/drivers/gpu/drm/xe/display/ \ -I$(srctree)/drivers/gpu/drm/i915/display/ \ -Ddrm_i915_gem_object=xe_bo \ -Ddrm_i915_private=xe_devicedrivers/gpu/drm/xe/xe_device.c +3
-3@@ -15,20 +15,21 @@#include <drm/drm_print.h> #include <drm/xe_drm.h> +#include "display/xe_display.h" #include "regs/xe_gt_regs.h" #include "regs/xe_regs.h" #include "xe_bo.h" #include "xe_debugfs.h" -#include "xe_display.h" #include "xe_dma_buf.h" #include "xe_drm_client.h" #include "xe_drv.h" -#include "xe_exec_queue.h" #include "xe_exec.h" +#include "xe_exec_queue.h" #include "xe_ggtt.h" #include "xe_gsc_proxy.h" #include "xe_gt.h" #include "xe_gt_mcr.h" +#include "xe_hwmon.h" #include "xe_irq.h" #include "xe_memirq.h" #include "xe_mmio.h" @@ -43,7 +44,6 @@#include "xe_ttm_sys_mgr.h" #include "xe_vm.h" #include "xe_wait_user_fence.h" -#include "xe_hwmon.h" #ifdef CONFIG_LOCKDEP struct lockdep_map xe_device_mem_access_lockdep_map = {drivers/gpu/drm/xe/xe_irq.c +1
-1@@ -9,10 +9,10 @@#include <drm/drm_managed.h> +#include "display/xe_display.h" #include "regs/xe_gt_regs.h" #include "regs/xe_regs.h" #include "xe_device.h" -#include "xe_display.h" #include "xe_drv.h" #include "xe_gsc_proxy.h" #include "xe_gt.h" drivers/gpu/drm/xe/xe_pci.c +1
-1@@ -15,9 +15,9 @@#include <drm/drm_drv.h> #include <drm/xe_pciids.h> +#include "display/xe_display.h" #include "regs/xe_gt_regs.h" #include "xe_device.h" -#include "xe_display.h" #include "xe_drv.h" #include "xe_gt.h" #include "xe_macros.h" drivers/gpu/drm/xe/xe_pm.c +0
-0
drivers/gpu/drm/xe/xe_pm.c line 17
Quoted 9 lines
drivers/gpu/drm/xe/xe_pm.c +1
-1@@ -10,11 +10,11 @@#include <drm/drm_managed.h> #include <drm/ttm/ttm_placement.h> +#include "display/xe_display.h" #include "xe_bo.h" #include "xe_bo_evict.h" #include "xe_device.h" #include "xe_device_sysfs.h" -#include "xe_display.h"
the downside of patch 1 is now that core xe code can include any of the display/ headers, but only xe_display.h is acceptable to keep the interface sane. Or are you thinking about changing the interface?
Lucas De Marchi
Quoted 6 lines
drivers/gpu/drm/xe/xe_pm.c +0
-0#include "xe_ggtt.h" #include "xe_gt.h" #include "xe_guc.h" Signature · 1 line
2.39.2
Re: [PATCH 2/2] drm/xe: drop display/ subdir from include directories
Quoted 3 lines · Lucas De Marchi
the downside of patch 1 is now that core xe code can include any of the display/ headers, but only
xe_display.his acceptable to keep the interface sane.
I'd say xe_display.h remains the only interface towards xe core, I don't think this patch changes that, and its location doesn't really give any guarantees. It's been a matter of sticking display/ in the include anyway, and enforcing that is a matter of maintainer vigilance.
Quoted 1 line
Or are you thinking about changing the interface?
I agree the interface should be in one file only, but changing the interface is an orthogonal matter (I have no plans atm).
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel
Re: Re: [PATCH 2/2] drm/xe: drop display/ subdir from include directories
Quoted 9 lines · Jani Nikula
Quoted 3 lines · Lucas De Marchi
the downside of patch 1 is now that core xe code can include any of the display/ headers, but only
xe_display.his acceptable to keep the interface sane.I'd say
xe_display.hremains the only interface towards xe core, I don't think this patch changes that, and its location doesn't really give any guarantees. It's been a matter of sticking display/ in the include anyway, and enforcing that is a matter of maintainer vigilance.
I just thought the previous split was slightly better: No code in xe should include display/ and should rather use the xe_display.[hc] interface.
Now with #include "display/xe_display.h" spread throughout the code, this could serve as example for people to start including stuff they shouldn't.
I'm not entirely opposed, so if you and others agree, please go ahead.
Lucas De Mrachi
Quoted 12 lines
Quoted 2 lines
Or are you thinking about changing the interface?
I agree the interface should be in one file only, but changing the interface is an orthogonal matter (I have no plans atm).
BR,
Jani.Signature · 1 line
Jani Nikula, Intel
Re: Re: [PATCH 2/2] drm/xe: drop display/ subdir from include directories
Quoted 15 lines · Lucas De Marchi
Quoted 9 lines · Jani Nikula
Quoted 3 lines · Lucas De Marchi
the downside of patch 1 is now that core xe code can include any of the display/ headers, but only
xe_display.his acceptable to keep the interface sane.I'd say
xe_display.hremains the only interface towards xe core, I don't think this patch changes that, and its location doesn't really give any guarantees. It's been a matter of sticking display/ in the include anyway, and enforcing that is a matter of maintainer vigilance.I just thought the previous split was slightly better: No code in xe should include display/ and should rather use the xe_display.[hc] interface.
Quoted 5 lines
Now with #include "
display/xe_display.h" spread throughout the code, this could serve as example for people to start including stuff they shouldn't.I'm not entirely opposed, so if you and others agree, please go ahead.
Well, at the moment you can include *anything* from under display/ *without* the prefix, because it's all in the include path. (Although that will fail for DRM_XE_DISPLAY=n, but does CI even build that combo regularly?)
I'm fine with dropping this too. I just think it makes it easier to check that nothing outside of display/ does any displayish things.
Your call.
BR,
Jani.
Quoted 15 lines
Lucas De Mrachi
Quoted 12 lines
Quoted 2 lines
Or are you thinking about changing the interface?
I agree the interface should be in one file only, but changing the interface is an orthogonal matter (I have no plans atm).
BR,
Jani.Signature · 1 line
Jani Nikula, Intel
Signature · 1 line
Jani Nikula, Intel
Re: Re: [PATCH 2/2] drm/xe: drop display/ subdir from include directories
Quoted 27 lines · Jani Nikula
Quoted 15 lines · Lucas De Marchi
Quoted 9 lines · Jani Nikula
Quoted 3 lines · Lucas De Marchi
the downside of patch 1 is now that core xe code can include any of the display/ headers, but only
xe_display.his acceptable to keep the interface sane.I'd say
xe_display.hremains the only interface towards xe core, I don't think this patch changes that, and its location doesn't really give any guarantees. It's been a matter of sticking display/ in the include anyway, and enforcing that is a matter of maintainer vigilance.I just thought the previous split was slightly better: No code in xe should include display/ and should rather use the xe_display.[hc] interface.
Quoted 5 lines
Now with #include "
display/xe_display.h" spread throughout the code, this could serve as example for people to start including stuff they shouldn't.I'm not entirely opposed, so if you and others agree, please go ahead.
Well, at the moment you can include *anything* from under display/ *without* the prefix, because it's all in the include path. (Although that will fail for DRM_XE_DISPLAY=n, but does CI even build that combo regularly?)
Quoted 4 lines
I'm fine with dropping this too. I just think it makes it easier to check that nothing outside of display/ does any displayish things.
Your call.
I've held off on pushing this. What's the verdict?
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel
Lucas De Marchi
Acked-byRe: Re: Re: [PATCH 2/2] drm/xe: drop display/ subdir from include directories
Quoted 28 lines · Jani Nikula
Quoted 27 lines · Jani Nikula
Quoted 15 lines · Lucas De Marchi
Quoted 9 lines · Jani Nikula
Quoted 3 lines · Lucas De Marchi
the downside of patch 1 is now that core xe code can include any of the display/ headers, but only
xe_display.his acceptable to keep the interface sane.I'd say
xe_display.hremains the only interface towards xe core, I don't think this patch changes that, and its location doesn't really give any guarantees. It's been a matter of sticking display/ in the include anyway, and enforcing that is a matter of maintainer vigilance.I just thought the previous split was slightly better: No code in xe should include display/ and should rather use the xe_display.[hc] interface.
Quoted 5 lines
Now with #include "
display/xe_display.h" spread throughout the code, this could serve as example for people to start including stuff they shouldn't.I'm not entirely opposed, so if you and others agree, please go ahead.
Well, at the moment you can include *anything* from under display/ *without* the prefix, because it's all in the include path. (Although that will fail for DRM_XE_DISPLAY=n, but does CI even build that combo regularly?)
Quoted 6 lines
Quoted 4 lines
I'm fine with dropping this too. I just think it makes it easier to check that nothing outside of display/ does any displayish things.
Your call.
I've held off on pushing this. What's the verdict?
Let's push this. If it doesn't work out due to people including other headers, we may think of a way to block that without reverting.
Lucas De Marchi
Quoted 7 lines
BR,
Jani.Signature · 1 line
Jani Nikula, Intel
Re: Re: Re: [PATCH 2/2] drm/xe: drop display/ subdir from include directories
Quoted 4 lines · Lucas De Marchi
Let's push this. If it doesn't work out due to people including other headers, we may think of a way to block that without reverting.
Acked-by Lucas De Marchi <[email protected]>
Thanks, pushed.
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel
Quoted 6 lines · Jani Nikula
All the other display related files are under display/ subdirectory, also move xe_display.[ch] there.
Sort the build list while at it.
Signed-off-by Jani Nikula <[email protected]>
Quoted 50 lines
--- drivers/gpu/drm/xe/Makefile | 18 +++++++++--------- drivers/gpu/drm/xe/{ => display}/xe_display.c | 0 drivers/gpu/drm/xe/{ => display}/xe_display.h | 0 3 files changed, 9 insertions(+), 9 deletions(-) rename drivers/gpu/drm/xe/{ => display}/xe_display.c (100%) rename drivers/gpu/drm/xe/{ => display}/xe_display.h (100%)drivers/gpu/drm/xe/Makefile +9
-9@@ -185,17 +185,17 @@ $(obj)/i915-display/%.o: $(srctree)/drivers/gpu/drm/i915/display/%.c FORCE # Display code specific to xe xe-$(CONFIG_DRM_XE_DISPLAY) += \ - xe_display.o \ - display/xe_fb_pin.o \ - display/xe_hdcp_gsc.o \ - display/xe_plane_initial.o \ - display/xe_display_rps.o \ + display/ext/i915_irq.o \ + display/ext/i915_utils.o \ + display/intel_fb_bo.o \ + display/intel_fbdev_fb.o \ + display/xe_display.o \ display/xe_display_misc.o \ + display/xe_display_rps.o \ display/xe_dsb_buffer.o \ - display/intel_fbdev_fb.o \ - display/intel_fb_bo.o \ - display/ext/i915_irq.o \ - display/ext/i915_utils.o + display/xe_fb_pin.o \ + display/xe_hdcp_gsc.o \ + display/xe_plane_initial.o # SOC code shared with i915 xe-$(CONFIG_DRM_XE_DISPLAY) += \drivers/gpu/drm/xe/display/xe_display.c renamed from drivers/gpu/drm/xe/xe_display.c +0
-0drivers/gpu/drm/xe/display/xe_display.h renamed from drivers/gpu/drm/xe/xe_display.h +0
-0Signature · 1 line
2.39.2