[PATCH 2/2] drm/xe: drop display/ subdir from include directories

Lucas De Marchi lucas.demarchi at intel.com
Mon Jan 22 17:19:30 UTC 2024


On Mon, Jan 22, 2024 at 12:14:28PM +0200, Jani Nikula wrote:
>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 <jani.nikula at intel.com>
>---
> 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(-)
>
>diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
>index e06f99def559..789d310cb5bc 100644
>--- a/drivers/gpu/drm/xe/Makefile
>+++ b/drivers/gpu/drm/xe/Makefile
>@@ -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
>diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
>index ab417f4f7d2a..eea0b259ae85 100644
>--- a/drivers/gpu/drm/xe/xe_device.c
>+++ b/drivers/gpu/drm/xe/xe_device.c
>@@ -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 = {
>diff --git a/drivers/gpu/drm/xe/xe_irq.c b/drivers/gpu/drm/xe/xe_irq.c
>index 2fd8cc26fc9f..d31e87de5a1c 100644
>--- a/drivers/gpu/drm/xe/xe_irq.c
>+++ b/drivers/gpu/drm/xe/xe_irq.c
>@@ -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"
>diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
>index df6b3b31f419..09c50471331c 100644
>--- a/drivers/gpu/drm/xe/xe_pci.c
>+++ b/drivers/gpu/drm/xe/xe_pci.c
>@@ -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"
>diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
>index d5f219796d7e..4d3984ae4ff1 100644
>--- a/drivers/gpu/drm/xe/xe_pm.c
>+++ b/drivers/gpu/drm/xe/xe_pm.c
>@@ -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

> #include "xe_ggtt.h"
> #include "xe_gt.h"
> #include "xe_guc.h"
>-- 
>2.39.2
>


More information about the Intel-xe mailing list