[Intel-xe] [PATCH 4/6] fixup! drm/xe/display: Implement display support

Lucas De Marchi lucas.demarchi at intel.com
Thu Oct 12 16:59:21 UTC 2023


On Thu, Oct 12, 2023 at 06:24:08PM +0530, Chaitanya Kumar Borah wrote:
>Add compatibility header with helpers to get display step name. This
>is needed to maintain compatibility with intel_dmc code.
>
>Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah at intel.com>
>---
> .../gpu/drm/xe/compat-i915-headers/i915_drv.h |  1 +
> .../drm/xe/compat-i915-headers/intel_step.h   | 20 +++++++++++++++++++
> 2 files changed, 21 insertions(+)
> create mode 100644 drivers/gpu/drm/xe/compat-i915-headers/intel_step.h
>
>diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
>index 8f55f63ff28b..ed7c39b4f770 100644
>--- a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
>+++ b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
>@@ -20,6 +20,7 @@
> #include "i915_reg_defs.h"
> #include "i915_utils.h"
> #include "intel_gt_types.h"
>+#include "intel_step.h"
> #include "intel_uncore.h"
> #include "intel_runtime_pm.h"
> #include <linux/pm_runtime.h>
>diff --git a/drivers/gpu/drm/xe/compat-i915-headers/intel_step.h b/drivers/gpu/drm/xe/compat-i915-headers/intel_step.h
>new file mode 100644
>index 000000000000..0006ef812346
>--- /dev/null
>+++ b/drivers/gpu/drm/xe/compat-i915-headers/intel_step.h
>@@ -0,0 +1,20 @@
>+/* SPDX-License-Identifier: MIT */
>+/*
>+ * Copyright © 2023 Intel Corporation
>+ */
>+
>+#ifndef __INTEL_STEP_H__
>+#define __INTEL_STEP_H__

in xe we keep it consistent at using 1 underscore:

$ git grep "#ifndef _.*H__" drivers/gpu/drm/xe/*.h
$

in compat-i915-headers there is a mix and match between 1 (used by xe)
and 2 (used by i915). Maybe we should normalize compat-i915-headers to
user either i915 or xe style.

$ git grep "#ifndef __.*H__" drivers/gpu/drm/xe/compat-i915-headers/*.h
drivers/gpu/drm/xe/compat-i915-headers/i915_config.h:#ifndef __I915_CONFIG_H__
drivers/gpu/drm/xe/compat-i915-headers/i915_debugfs.h:#ifndef __I915_DEBUGFS_H__
drivers/gpu/drm/xe/compat-i915-headers/i915_gem.h:#ifndef __I915_GEM_H__
drivers/gpu/drm/xe/compat-i915-headers/intel_pcode.h:#ifndef __INTEL_PCODE_H__
drivers/gpu/drm/xe/compat-i915-headers/intel_uncore.h:#ifndef __INTEL_UNCORE_H__
$ git grep "#ifndef _[^_].*H_" drivers/gpu/drm/xe/compat-i915-headers/*.h
drivers/gpu/drm/xe/compat-i915-headers/i915_active.h:#ifndef _I915_ACTIVE_H_
drivers/gpu/drm/xe/compat-i915-headers/i915_active_types.h:#ifndef _I915_ACTIVE_TYPES_H_
drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h:#ifndef _XE_I915_DRV_H_
drivers/gpu/drm/xe/compat-i915-headers/i915_gem_stolen.h:#ifndef _I915_GEM_OBJECT_H_
drivers/gpu/drm/xe/compat-i915-headers/i915_vgpu.h:#ifndef _I915_VGPU_H_
drivers/gpu/drm/xe/compat-i915-headers/vlv_sideband.h:#ifndef _VLV_SIDEBAND_H_

Lucas De Marchi


>+
>+#include "xe_device_types.h"
>+#include "xe_step.h"
>+
>+#define intel_display_step_name xe_display_step_name
>+
>+static inline
>+const char *xe_display_step_name(struct xe_device *xe)
>+{
>+	return xe_step_name(xe->info.step.display);
>+}
>+
>+#endif /* __INTEL_STEP_H__ */
>-- 
>2.25.1
>


More information about the Intel-xe mailing list