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_tile definition to own file

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

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patch.msgid.link/20260203211240.745-4-michal.wajdeczko@intel.com

+142 -128
+1 -128
drivers/gpu/drm/xe/xe_device_types.h
··· 15 15 #include "xe_devcoredump_types.h" 16 16 #include "xe_heci_gsc.h" 17 17 #include "xe_late_bind_fw_types.h" 18 - #include "xe_lmtt_types.h" 19 - #include "xe_memirq_types.h" 20 - #include "xe_mert.h" 21 - #include "xe_mmio_types.h" 22 18 #include "xe_oa_types.h" 23 19 #include "xe_pagefault_types.h" 24 20 #include "xe_platform_types.h" ··· 26 30 #include "xe_sriov_vf_ccs_types.h" 27 31 #include "xe_step_types.h" 28 32 #include "xe_survivability_mode_types.h" 29 - #include "xe_tile_sriov_vf_types.h" 33 + #include "xe_tile_types.h" 30 34 #include "xe_validation.h" 31 35 32 36 #if IS_ENABLED(CONFIG_DRM_XE_DEBUG) ··· 91 95 (_xe)->info.subplatform == (sub) && \ 92 96 (_xe)->info.step.graphics >= (min_step) && \ 93 97 (_xe)->info.step.graphics < (max_step)) 94 - 95 - #define tile_to_xe(tile__) \ 96 - _Generic(tile__, \ 97 - const struct xe_tile * : (const struct xe_device *)((tile__)->xe), \ 98 - struct xe_tile * : (tile__)->xe) 99 - 100 - /** 101 - * struct xe_tile - hardware tile structure 102 - * 103 - * From a driver perspective, a "tile" is effectively a complete GPU, containing 104 - * an SGunit, 1-2 GTs, and (for discrete platforms) VRAM. 105 - * 106 - * Multi-tile platforms effectively bundle multiple GPUs behind a single PCI 107 - * device and designate one "root" tile as being responsible for external PCI 108 - * communication. PCI BAR0 exposes the GGTT and MMIO register space for each 109 - * tile in a stacked layout, and PCI BAR2 exposes the local memory associated 110 - * with each tile similarly. Device-wide interrupts can be enabled/disabled 111 - * at the root tile, and the MSTR_TILE_INTR register will report which tiles 112 - * have interrupts that need servicing. 113 - */ 114 - struct xe_tile { 115 - /** @xe: Backpointer to tile's PCI device */ 116 - struct xe_device *xe; 117 - 118 - /** @id: ID of the tile */ 119 - u8 id; 120 - 121 - /** 122 - * @primary_gt: Primary GT 123 - */ 124 - struct xe_gt *primary_gt; 125 - 126 - /** 127 - * @media_gt: Media GT 128 - * 129 - * Only present on devices with media version >= 13. 130 - */ 131 - struct xe_gt *media_gt; 132 - 133 - /** 134 - * @mmio: MMIO info for a tile. 135 - * 136 - * Each tile has its own 16MB space in BAR0, laid out as: 137 - * * 0-4MB: registers 138 - * * 4MB-8MB: reserved 139 - * * 8MB-16MB: global GTT 140 - */ 141 - struct xe_mmio mmio; 142 - 143 - /** @mem: memory management info for tile */ 144 - struct { 145 - /** 146 - * @mem.kernel_vram: kernel-dedicated VRAM info for tile. 147 - * 148 - * Although VRAM is associated with a specific tile, it can 149 - * still be accessed by all tiles' GTs. 150 - */ 151 - struct xe_vram_region *kernel_vram; 152 - 153 - /** 154 - * @mem.vram: general purpose VRAM info for tile. 155 - * 156 - * Although VRAM is associated with a specific tile, it can 157 - * still be accessed by all tiles' GTs. 158 - */ 159 - struct xe_vram_region *vram; 160 - 161 - /** @mem.ggtt: Global graphics translation table */ 162 - struct xe_ggtt *ggtt; 163 - 164 - /** 165 - * @mem.kernel_bb_pool: Pool from which batchbuffers are allocated. 166 - * 167 - * Media GT shares a pool with its primary GT. 168 - */ 169 - struct xe_sa_manager *kernel_bb_pool; 170 - 171 - /** 172 - * @mem.reclaim_pool: Pool for PRLs allocated. 173 - * 174 - * Only main GT has page reclaim list allocations. 175 - */ 176 - struct xe_sa_manager *reclaim_pool; 177 - } mem; 178 - 179 - /** @sriov: tile level virtualization data */ 180 - union { 181 - struct { 182 - /** @sriov.pf.lmtt: Local Memory Translation Table. */ 183 - struct xe_lmtt lmtt; 184 - } pf; 185 - struct { 186 - /** @sriov.vf.ggtt_balloon: GGTT regions excluded from use. */ 187 - struct xe_ggtt_node *ggtt_balloon[2]; 188 - /** @sriov.vf.self_config: VF configuration data */ 189 - struct xe_tile_sriov_vf_selfconfig self_config; 190 - } vf; 191 - } sriov; 192 - 193 - /** @memirq: Memory Based Interrupts. */ 194 - struct xe_memirq memirq; 195 - 196 - /** @csc_hw_error_work: worker to report CSC HW errors */ 197 - struct work_struct csc_hw_error_work; 198 - 199 - /** @pcode: tile's PCODE */ 200 - struct { 201 - /** @pcode.lock: protecting tile's PCODE mailbox data */ 202 - struct mutex lock; 203 - } pcode; 204 - 205 - /** @migrate: Migration helper for vram blits and clearing */ 206 - struct xe_migrate *migrate; 207 - 208 - /** @sysfs: sysfs' kobj used by xe_tile_sysfs */ 209 - struct kobject *sysfs; 210 - 211 - /** @debugfs: debugfs directory associated with this tile */ 212 - struct dentry *debugfs; 213 - 214 - /** @mert: MERT-related data */ 215 - struct xe_mert mert; 216 - }; 217 98 218 99 /** 219 100 * struct xe_device - Top level struct of Xe device
+141
drivers/gpu/drm/xe/xe_tile_types.h
··· 1 + /* SPDX-License-Identifier: MIT */ 2 + /* 3 + * Copyright © 2022-2026 Intel Corporation 4 + */ 5 + 6 + #ifndef _XE_TILE_TYPES_H_ 7 + #define _XE_TILE_TYPES_H_ 8 + 9 + #include <linux/mutex_types.h> 10 + #include <linux/workqueue_types.h> 11 + 12 + #include "xe_lmtt_types.h" 13 + #include "xe_memirq_types.h" 14 + #include "xe_mert.h" 15 + #include "xe_mmio_types.h" 16 + #include "xe_tile_sriov_vf_types.h" 17 + 18 + #define tile_to_xe(tile__) \ 19 + _Generic(tile__, \ 20 + const struct xe_tile * : (const struct xe_device *)((tile__)->xe), \ 21 + struct xe_tile * : (tile__)->xe) 22 + 23 + /** 24 + * struct xe_tile - hardware tile structure 25 + * 26 + * From a driver perspective, a "tile" is effectively a complete GPU, containing 27 + * an SGunit, 1-2 GTs, and (for discrete platforms) VRAM. 28 + * 29 + * Multi-tile platforms effectively bundle multiple GPUs behind a single PCI 30 + * device and designate one "root" tile as being responsible for external PCI 31 + * communication. PCI BAR0 exposes the GGTT and MMIO register space for each 32 + * tile in a stacked layout, and PCI BAR2 exposes the local memory associated 33 + * with each tile similarly. Device-wide interrupts can be enabled/disabled 34 + * at the root tile, and the MSTR_TILE_INTR register will report which tiles 35 + * have interrupts that need servicing. 36 + */ 37 + struct xe_tile { 38 + /** @xe: Backpointer to tile's PCI device */ 39 + struct xe_device *xe; 40 + 41 + /** @id: ID of the tile */ 42 + u8 id; 43 + 44 + /** 45 + * @primary_gt: Primary GT 46 + */ 47 + struct xe_gt *primary_gt; 48 + 49 + /** 50 + * @media_gt: Media GT 51 + * 52 + * Only present on devices with media version >= 13. 53 + */ 54 + struct xe_gt *media_gt; 55 + 56 + /** 57 + * @mmio: MMIO info for a tile. 58 + * 59 + * Each tile has its own 16MB space in BAR0, laid out as: 60 + * * 0-4MB: registers 61 + * * 4MB-8MB: reserved 62 + * * 8MB-16MB: global GTT 63 + */ 64 + struct xe_mmio mmio; 65 + 66 + /** @mem: memory management info for tile */ 67 + struct { 68 + /** 69 + * @mem.kernel_vram: kernel-dedicated VRAM info for tile. 70 + * 71 + * Although VRAM is associated with a specific tile, it can 72 + * still be accessed by all tiles' GTs. 73 + */ 74 + struct xe_vram_region *kernel_vram; 75 + 76 + /** 77 + * @mem.vram: general purpose VRAM info for tile. 78 + * 79 + * Although VRAM is associated with a specific tile, it can 80 + * still be accessed by all tiles' GTs. 81 + */ 82 + struct xe_vram_region *vram; 83 + 84 + /** @mem.ggtt: Global graphics translation table */ 85 + struct xe_ggtt *ggtt; 86 + 87 + /** 88 + * @mem.kernel_bb_pool: Pool from which batchbuffers are allocated. 89 + * 90 + * Media GT shares a pool with its primary GT. 91 + */ 92 + struct xe_sa_manager *kernel_bb_pool; 93 + 94 + /** 95 + * @mem.reclaim_pool: Pool for PRLs allocated. 96 + * 97 + * Only main GT has page reclaim list allocations. 98 + */ 99 + struct xe_sa_manager *reclaim_pool; 100 + } mem; 101 + 102 + /** @sriov: tile level virtualization data */ 103 + union { 104 + struct { 105 + /** @sriov.pf.lmtt: Local Memory Translation Table. */ 106 + struct xe_lmtt lmtt; 107 + } pf; 108 + struct { 109 + /** @sriov.vf.ggtt_balloon: GGTT regions excluded from use. */ 110 + struct xe_ggtt_node *ggtt_balloon[2]; 111 + /** @sriov.vf.self_config: VF configuration data */ 112 + struct xe_tile_sriov_vf_selfconfig self_config; 113 + } vf; 114 + } sriov; 115 + 116 + /** @memirq: Memory Based Interrupts. */ 117 + struct xe_memirq memirq; 118 + 119 + /** @csc_hw_error_work: worker to report CSC HW errors */ 120 + struct work_struct csc_hw_error_work; 121 + 122 + /** @pcode: tile's PCODE */ 123 + struct { 124 + /** @pcode.lock: protecting tile's PCODE mailbox data */ 125 + struct mutex lock; 126 + } pcode; 127 + 128 + /** @migrate: Migration helper for vram blits and clearing */ 129 + struct xe_migrate *migrate; 130 + 131 + /** @sysfs: sysfs' kobj used by xe_tile_sysfs */ 132 + struct kobject *sysfs; 133 + 134 + /** @debugfs: debugfs directory associated with this tile */ 135 + struct dentry *debugfs; 136 + 137 + /** @mert: MERT-related data */ 138 + struct xe_mert mert; 139 + }; 140 + 141 + #endif