]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe: Move GSI offset adjustment fields into 'struct xe_mmio'
authorMatt Roper <matthew.d.roper@intel.com>
Tue, 10 Sep 2024 23:47:24 +0000 (16:47 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Wed, 11 Sep 2024 22:17:31 +0000 (15:17 -0700)
By moving the GSI adjustment fields into 'struct xe_mmio' we can replace
the GT's MMIO substructure with another instance of xe_mmio.  At the
moment this means MMIO operations wind up pulling information from two
different places (the tile's xe_mmio for the iomap and the GT's xe_mmio
for the adjustment), but we'll address that in future patches.

The type headers change a bit with this change, meaning that various
files should be including xe_device_types.h instead of (or in addition
to) xe_gt_types.h.

v2:
 - Fix pre-existing kerneldoc typo while moving the fields (Lucas)
v3:
 - Add missing '@' in kerneldoc.  (Rodrigo)

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240910234719.3335472-49-matthew.d.roper@intel.com
drivers/gpu/drm/xe/xe_assert.h
drivers/gpu/drm/xe/xe_device.h
drivers/gpu/drm/xe/xe_device_types.h
drivers/gpu/drm/xe/xe_gt_freq.c
drivers/gpu/drm/xe/xe_gt_printk.h
drivers/gpu/drm/xe/xe_gt_types.h

index e22bbf57fca75a41803b4863fad1d283459366ed..04d6b95c6d8787db2f29512407234db80bec3df6 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <drm/drm_print.h>
 
-#include "xe_device_types.h"
+#include "xe_gt_types.h"
 #include "xe_step.h"
 
 /**
index ec726dcd5f99f479f055c48b697d5f4e4d37645f..ca8d8ef6342b8b5bb1939e0c9e6d52c8842adf6c 100644 (file)
@@ -9,6 +9,7 @@
 #include <drm/drm_util.h>
 
 #include "xe_device_types.h"
+#include "xe_gt_types.h"
 
 static inline struct xe_device *to_xe_device(const struct drm_device *dev)
 {
index ecf95801743d4f8982977da95b49393c062e4c65..347fc5ec55e1ce52405e418fb6029af08844528e 100644 (file)
@@ -14,7 +14,6 @@
 
 #include "xe_devcoredump_types.h"
 #include "xe_heci_gsc.h"
-#include "xe_gt_types.h"
 #include "xe_lmtt_types.h"
 #include "xe_memirq_types.h"
 #include "xe_oa.h"
@@ -127,6 +126,12 @@ struct xe_mmio {
         * non-register regions such as the GGTT PTEs.
         */
        size_t regs_size;
+
+       /** @adj_limit: adjust MMIO address if address is below this value */
+       u32 adj_limit;
+
+       /** @adj_offset: offset to add to MMIO address when adjusting */
+       u32 adj_offset;
 };
 
 /**
index 68a5778b4319fde12cb1b520c95b64f2a89c1792..552435951f1131550ca76560c9acb5a8dbca9a5b 100644 (file)
@@ -11,9 +11,9 @@
 #include <drm/drm_managed.h>
 #include <drm/drm_print.h>
 
-#include "xe_device_types.h"
 #include "xe_gt_sysfs.h"
 #include "xe_gt_throttle.h"
+#include "xe_gt_types.h"
 #include "xe_guc_pc.h"
 #include "xe_pm.h"
 
index d6228baaff1ef5e7deb7d7a891a03830e4dcb782..5dc71394372d63db4d7a8c7937078056c2fbc0fc 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <drm/drm_print.h>
 
-#include "xe_device_types.h"
+#include "xe_gt_types.h"
 
 #define xe_gt_printk(_gt, _level, _fmt, ...) \
        drm_##_level(&gt_to_xe(_gt)->drm, "GT%u: " _fmt, (_gt)->info.id, ##__VA_ARGS__)
index dd6bbef0bbcd8d23294d89f9b0f13c684941ca80..a287b98ee70b418a89fa7d81291e03359ce98e4f 100644 (file)
@@ -6,6 +6,7 @@
 #ifndef _XE_GT_TYPES_H_
 #define _XE_GT_TYPES_H_
 
+#include "xe_device_types.h"
 #include "xe_force_wake_types.h"
 #include "xe_gt_idle_types.h"
 #include "xe_gt_sriov_pf_types.h"
@@ -147,15 +148,7 @@ struct xe_gt {
         * register space, but have their own copy of GSI registers at a
         * specific offset.
         */
-       struct {
-               /**
-                * @mmio.adj_limit: adjust MMIO address if address is below this
-                * value
-                */
-               u32 adj_limit;
-               /** @mmio.adj_offset: offect to add to MMIO address when adjusting */
-               u32 adj_offset;
-       } mmio;
+       struct xe_mmio mmio;
 
        /**
         * @pm: power management info for GT.  The driver uses the GT's