[Intel-xe] [PATCH 8/8] drm/xe: drop top level i915 from include path

Lucas De Marchi lucas.demarchi at intel.com
Fri Mar 3 06:30:18 UTC 2023


On Thu, Mar 02, 2023 at 10:21:13PM -0800, Lucas De Marchi wrote:
>On Thu, Mar 02, 2023 at 04:12:30PM +0200, Jani Nikula wrote:
>>Add stub headers under compat-headers/ to be explicit about which
>>headers are needed from i915. These also act as a TODO list of what to
>>fix. Remove top level i915 from include path.
>>
>>Signed-off-by: Jani Nikula <jani.nikula at intel.com>
>>---
>>drivers/gpu/drm/xe/Makefile                           | 7 +++----
>>drivers/gpu/drm/xe/compat-headers/i915_fixed.h        | 1 +
>>drivers/gpu/drm/xe/compat-headers/i915_reg.h          | 1 +
>>drivers/gpu/drm/xe/compat-headers/i915_reg_defs.h     | 1 +
>>drivers/gpu/drm/xe/compat-headers/i915_utils.h        | 1 +
>>drivers/gpu/drm/xe/compat-headers/intel_mchbar_regs.h | 1 +
>>drivers/gpu/drm/xe/compat-headers/intel_pci_config.h  | 1 +
>>drivers/gpu/drm/xe/display/intel_display_core.h       | 2 ++
>>drivers/gpu/drm/xe/regs/xe_reg_defs.h                 | 2 +-
>>9 files changed, 12 insertions(+), 5 deletions(-)
>>create mode 100644 drivers/gpu/drm/xe/compat-headers/i915_fixed.h
>>create mode 100644 drivers/gpu/drm/xe/compat-headers/i915_reg.h
>>create mode 100644 drivers/gpu/drm/xe/compat-headers/i915_reg_defs.h
>>create mode 100644 drivers/gpu/drm/xe/compat-headers/i915_utils.h
>>create mode 100644 drivers/gpu/drm/xe/compat-headers/intel_mchbar_regs.h
>>create mode 100644 drivers/gpu/drm/xe/compat-headers/intel_pci_config.h
>>create mode 100644 drivers/gpu/drm/xe/display/intel_display_core.h
>>
>>diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
>>index 42a34597f16c..166f47324377 100644
>>--- a/drivers/gpu/drm/xe/Makefile
>>+++ b/drivers/gpu/drm/xe/Makefile
>>@@ -101,16 +101,15 @@ xe-y += xe_bb.o \
>># i915 Display compat #defines and #includes
>>subdir-ccflags-$(CONFIG_DRM_XE_DISPLAY) += \
>>	-I$(srctree)/$(src)/display/ext \
>>-	-I$(srctree)/$(src)/compat-headers \
>>	-I$(srctree)/drivers/gpu/drm/xe/display/ \
>>	-I$(srctree)/drivers/gpu/drm/i915/display/ \
>>-	-I$(srctree)/drivers/gpu/drm/i915/ \
>>	-DBUILD_FOR_XE=1 \
>>	-Ddrm_i915_gem_object=xe_bo \
>>	-Ddrm_i915_private=xe_device
>>
>>-# XXX: Needed for i915 register definitions. Will be removed after xe-regs.
>>-subdir-ccflags-y += -I$(srctree)/drivers/gpu/drm/i915/
>>+# XXX: Needed for #include "display/intel_display_core.h" in xe_device_types.h
>>+subdir-ccflags-y += \
>>+	-I$(srctree)/$(src)/compat-headers
>
>
>I don't think this can be removed now with the "Encapsulate display"
>series applied... we should rather not drop it from the block
>above.
>
>Lucas De Marchi
>
>>
>>CFLAGS_display/intel_fbdev.o = $(call cc-disable-warning, override-init)
>>
>>diff --git a/drivers/gpu/drm/xe/compat-headers/i915_fixed.h b/drivers/gpu/drm/xe/compat-headers/i915_fixed.h
>>new file mode 100644
>>index 000000000000..e55fed3cbe9e
>>--- /dev/null
>>+++ b/drivers/gpu/drm/xe/compat-headers/i915_fixed.h
>>@@ -0,0 +1 @@
>>+#include "../../i915/i915_fixed.h"
>>diff --git a/drivers/gpu/drm/xe/compat-headers/i915_reg.h b/drivers/gpu/drm/xe/compat-headers/i915_reg.h
>>new file mode 100644
>>index 000000000000..36d863f4848b
>>--- /dev/null
>>+++ b/drivers/gpu/drm/xe/compat-headers/i915_reg.h
>>@@ -0,0 +1 @@
>>+#include "../../i915/i915_reg.h"
>>diff --git a/drivers/gpu/drm/xe/compat-headers/i915_reg_defs.h b/drivers/gpu/drm/xe/compat-headers/i915_reg_defs.h
>>new file mode 100644
>>index 000000000000..128a9a330c13
>>--- /dev/null
>>+++ b/drivers/gpu/drm/xe/compat-headers/i915_reg_defs.h
>>@@ -0,0 +1 @@
>>+#include "../../i915/i915_reg_defs.h"
>>diff --git a/drivers/gpu/drm/xe/compat-headers/i915_utils.h b/drivers/gpu/drm/xe/compat-headers/i915_utils.h
>>new file mode 100644
>>index 000000000000..a88a5196c79d
>>--- /dev/null
>>+++ b/drivers/gpu/drm/xe/compat-headers/i915_utils.h
>>@@ -0,0 +1 @@
>>+#include "../../i915/i915_utils.h"
>>diff --git a/drivers/gpu/drm/xe/compat-headers/intel_mchbar_regs.h b/drivers/gpu/drm/xe/compat-headers/intel_mchbar_regs.h
>>new file mode 100644
>>index 000000000000..f7c0585f277b
>>--- /dev/null
>>+++ b/drivers/gpu/drm/xe/compat-headers/intel_mchbar_regs.h
>>@@ -0,0 +1 @@
>>+#include "../../i915/intel_mchbar_regs.h"
>>diff --git a/drivers/gpu/drm/xe/compat-headers/intel_pci_config.h b/drivers/gpu/drm/xe/compat-headers/intel_pci_config.h
>>new file mode 100644
>>index 000000000000..741ef99dc0e4
>>--- /dev/null
>>+++ b/drivers/gpu/drm/xe/compat-headers/intel_pci_config.h
>>@@ -0,0 +1 @@
>>+#include "../../i915/intel_pci_config.h"
>>diff --git a/drivers/gpu/drm/xe/display/intel_display_core.h b/drivers/gpu/drm/xe/display/intel_display_core.h
>>new file mode 100644
>>index 000000000000..5be8d246ee27
>>--- /dev/null
>>+++ b/drivers/gpu/drm/xe/display/intel_display_core.h
>>@@ -0,0 +1,2 @@
>>+/* FIXME: Remove once xe_device_types.h does not need this for CONFIG_DRM_XE_DISPLAY=n */
>>+#include "../../i915/display/intel_display_core.h"

this comment is not very accurate. This can only be removed when/if we
get to remove completely the display headers from xe_device_types.h. If
you remove this now, it will break with CONFIG_DRM_XE_DISPLAY=y

Lucas De Marchi

>>diff --git a/drivers/gpu/drm/xe/regs/xe_reg_defs.h b/drivers/gpu/drm/xe/regs/xe_reg_defs.h
>>index 5f6735697d9c..631cd6d1ffa6 100644
>>--- a/drivers/gpu/drm/xe/regs/xe_reg_defs.h
>>+++ b/drivers/gpu/drm/xe/regs/xe_reg_defs.h
>>@@ -6,6 +6,6 @@
>>#ifndef _XE_REG_DEFS_H_
>>#define _XE_REG_DEFS_H_
>>
>>-#include "../../i915/i915_reg_defs.h"
>>+#include "compat-headers/i915_reg_defs.h"
>>
>>#endif
>>-- 
>>2.39.1
>>


More information about the Intel-xe mailing list