Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/xe: Promote struct xe_mmio definition to own file

We already have separate .c and .h files for xe_mmio functions,
time to introduce _types.h to follow what other components do.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Stuart Summers <stuart.summers@intel.com> #v1
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patch.msgid.link/20260203211240.745-3-michal.wajdeczko@intel.com

+66 -45
+1 -39
drivers/gpu/drm/xe/xe_device_types.h
··· 18 18 #include "xe_lmtt_types.h" 19 19 #include "xe_memirq_types.h" 20 20 #include "xe_mert.h" 21 + #include "xe_mmio_types.h" 21 22 #include "xe_oa_types.h" 22 23 #include "xe_pagefault_types.h" 23 24 #include "xe_platform_types.h" ··· 100 99 _Generic(tile__, \ 101 100 const struct xe_tile * : (const struct xe_device *)((tile__)->xe), \ 102 101 struct xe_tile * : (tile__)->xe) 103 - 104 - /** 105 - * struct xe_mmio - register mmio structure 106 - * 107 - * Represents an MMIO region that the CPU may use to access registers. A 108 - * region may share its IO map with other regions (e.g., all GTs within a 109 - * tile share the same map with their parent tile, but represent different 110 - * subregions of the overall IO space). 111 - */ 112 - struct xe_mmio { 113 - /** @tile: Backpointer to tile, used for tracing */ 114 - struct xe_tile *tile; 115 - 116 - /** @regs: Map used to access registers. */ 117 - void __iomem *regs; 118 - 119 - /** 120 - * @sriov_vf_gt: Backpointer to GT. 121 - * 122 - * This pointer is only set for GT MMIO regions and only when running 123 - * as an SRIOV VF structure 124 - */ 125 - struct xe_gt *sriov_vf_gt; 126 - 127 - /** 128 - * @regs_size: Length of the register region within the map. 129 - * 130 - * The size of the iomap set in *regs is generally larger than the 131 - * register mmio space since it includes unused regions and/or 132 - * non-register regions such as the GGTT PTEs. 133 - */ 134 - size_t regs_size; 135 - 136 - /** @adj_limit: adjust MMIO address if address is below this value */ 137 - u32 adj_limit; 138 - 139 - /** @adj_offset: offset to add to MMIO address when adjusting */ 140 - u32 adj_offset; 141 - }; 142 102 143 103 /** 144 104 * struct xe_tile - hardware tile structure
-5
drivers/gpu/drm/xe/xe_gt_types.h
··· 45 45 typedef unsigned long xe_eu_mask_t[BITS_TO_LONGS(XE_MAX_EU_FUSE_BITS)]; 46 46 typedef unsigned long xe_l3_bank_mask_t[BITS_TO_LONGS(XE_MAX_L3_BANK_MASK_BITS)]; 47 47 48 - struct xe_mmio_range { 49 - u32 start; 50 - u32 end; 51 - }; 52 - 53 48 /* 54 49 * The hardware has multiple kinds of multicast register ranges that need 55 50 * special register steering (and future platforms are expected to add
+1 -1
drivers/gpu/drm/xe/xe_mmio.h
··· 6 6 #ifndef _XE_MMIO_H_ 7 7 #define _XE_MMIO_H_ 8 8 9 - #include "xe_gt_types.h" 9 + #include "xe_mmio_types.h" 10 10 11 11 struct xe_device; 12 12 struct xe_reg;
+64
drivers/gpu/drm/xe/xe_mmio_types.h
··· 1 + /* SPDX-License-Identifier: MIT */ 2 + /* 3 + * Copyright © 2022-2026 Intel Corporation 4 + */ 5 + 6 + #ifndef _XE_MMIO_TYPES_H_ 7 + #define _XE_MMIO_TYPES_H_ 8 + 9 + #include <linux/types.h> 10 + 11 + struct xe_gt; 12 + struct xe_tile; 13 + 14 + /** 15 + * struct xe_mmio - register mmio structure 16 + * 17 + * Represents an MMIO region that the CPU may use to access registers. A 18 + * region may share its IO map with other regions (e.g., all GTs within a 19 + * tile share the same map with their parent tile, but represent different 20 + * subregions of the overall IO space). 21 + */ 22 + struct xe_mmio { 23 + /** @tile: Backpointer to tile, used for tracing */ 24 + struct xe_tile *tile; 25 + 26 + /** @regs: Map used to access registers. */ 27 + void __iomem *regs; 28 + 29 + /** 30 + * @sriov_vf_gt: Backpointer to GT. 31 + * 32 + * This pointer is only set for GT MMIO regions and only when running 33 + * as an SRIOV VF structure 34 + */ 35 + struct xe_gt *sriov_vf_gt; 36 + 37 + /** 38 + * @regs_size: Length of the register region within the map. 39 + * 40 + * The size of the iomap set in *regs is generally larger than the 41 + * register mmio space since it includes unused regions and/or 42 + * non-register regions such as the GGTT PTEs. 43 + */ 44 + size_t regs_size; 45 + 46 + /** @adj_limit: adjust MMIO address if address is below this value */ 47 + u32 adj_limit; 48 + 49 + /** @adj_offset: offset to add to MMIO address when adjusting */ 50 + u32 adj_offset; 51 + }; 52 + 53 + /** 54 + * struct xe_mmio_range - register range structure 55 + * 56 + * @start: first register offset in the range. 57 + * @end: last register offset in the range. 58 + */ 59 + struct xe_mmio_range { 60 + u32 start; 61 + u32 end; 62 + }; 63 + 64 + #endif