[Intel-xe] [PATCH v2 7/9] fixup! drm/xe/display: Implement display support

Jani Nikula jani.nikula at intel.com
Wed Aug 9 19:04:51 UTC 2023


While it would be preferrable to get rid of the file altogether, in the
mean time rename ext/intel_device_info.c to ext/i915_utils.c to better
reflect what it's about.

v2: Rebase, retain __i915_inject_probe_error()

Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com> # v1
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
 drivers/gpu/drm/xe/Makefile                   |  4 +-
 drivers/gpu/drm/xe/display/ext/i915_utils.c   | 22 +++++++++
 .../drm/xe/display/ext/intel_device_info.c    | 46 -------------------
 3 files changed, 24 insertions(+), 48 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/display/ext/i915_utils.c
 delete mode 100644 drivers/gpu/drm/xe/display/ext/intel_device_info.c

diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
index c91bb7ddcf1d..1353d65fee5c 100644
--- a/drivers/gpu/drm/xe/Makefile
+++ b/drivers/gpu/drm/xe/Makefile
@@ -147,8 +147,8 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \
 	display/xe_plane_initial.o \
 	display/xe_display_rps.o \
 	display/ext/i915_irq.o \
-	display/ext/intel_clock_gating.o \
-	display/ext/intel_device_info.o
+	display/ext/i915_utils.o \
+	display/ext/intel_clock_gating.o
 
 # SOC code shared with i915
 xe-$(CONFIG_DRM_XE_DISPLAY) += \
diff --git a/drivers/gpu/drm/xe/display/ext/i915_utils.c b/drivers/gpu/drm/xe/display/ext/i915_utils.c
new file mode 100644
index 000000000000..981edc2788bc
--- /dev/null
+++ b/drivers/gpu/drm/xe/display/ext/i915_utils.c
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+#include "i915_drv.h"
+
+bool i915_vtd_active(struct drm_i915_private *i915)
+{
+	if (device_iommu_mapped(i915->drm.dev))
+		return true;
+
+	/* Running as a guest, we assume the host is enforcing VT'd */
+	return i915_run_as_guest();
+}
+
+/* i915 specific, just put here for shutting it up */
+int __i915_inject_probe_error(struct drm_i915_private *i915, int err,
+			      const char *func, int line)
+{
+	return 0;
+}
diff --git a/drivers/gpu/drm/xe/display/ext/intel_device_info.c b/drivers/gpu/drm/xe/display/ext/intel_device_info.c
deleted file mode 100644
index fcea9cd93aba..000000000000
--- a/drivers/gpu/drm/xe/display/ext/intel_device_info.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright © 2016 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- *
- */
-
-#include "intel_cdclk.h"
-#include "intel_de.h"
-#include "intel_display.h"
-#include "i915_drv.h"
-#include "i915_reg.h"
-#include <drm/drm_drv.h>
-
-bool i915_vtd_active(struct drm_i915_private *i915)
-{
-	if (device_iommu_mapped(i915->drm.dev))
-		return true;
-
-	/* Running as a guest, we assume the host is enforcing VT'd */
-	return i915_run_as_guest();
-}
-
-/* i915 specific, just put here for shutting it up */
-int __i915_inject_probe_error(struct drm_i915_private *i915, int err,
-							  const char *func, int line)
-{
-	return 0;
-}
-- 
2.39.2



More information about the Intel-xe mailing list