summaryrefslogtreecommitdiff
path: root/include/linux/input/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorMatt Roper <matthew.d.roper@intel.com>2025-10-13 13:09:50 -0700
committerMatt Roper <matthew.d.roper@intel.com>2025-10-14 07:44:57 -0700
commitff1d2b5e3d28a62e79c89d2b2ab28ef5eaab84d8 (patch)
treeb86752fed14db1d635e5d46ba9fee4bfa835c1f7 /include/linux/input/git@git.tavy.me:linux.git
parent1a28651c0627add7928c47407d6a9b18a1a81c37 (diff)
drm/xe: Read VF GMD_ID with a specifically-allocated dummy GT
SRIOV VF initialization has a bit of a chicken and egg design problem. Determining the IP version of the graphics and media IPs can't be done via direct register reads as it is on PF or native and instead requires querying the GuC. However initialization of the GT, including its GuC, needs to wait until after we know the IP versions so that the proper initialization steps for the platform/IP are followed. Currently the (somewhat hacky) solution is to manually fill out just enough fields in tile 0's primary GT structure to make it look as if the GT has been initialized so that the GuC can be partially initialized and queried to obtain the GMD_ID values. When the GT gets properly initialized during the regular flows, the hacked-up values will get overwritten as part of the general initialization flows. Rather than using tile 0's primary GT structure to hold the hacked up values for querying every GT on every tile, instead allocate a dedicated dummy structure. This will allow us to move the tile->primary_gt's allocation to a more consistent place later in the initialization flow in future patches (i.e., we shouldn't even allocate this GT structure if the GT is disabled/unavailable). It also helps ensure there can't be any accidental leakage of initialization or state between the dummy initialization for GMD_ID and the real driver initialization of the GT. v2: - Initialize gt->tile for temporary GT. (CI, Michal) - Use scope-based cleanup handler to free temp GT. (Michal) - Propagate actual error code from xe_gt_sriov_vf_bootstrap() rather than just setting IP version to 0.0 now that read_gmdid() can return an error. (Michal) v3: - Explicitly initialize gt to NULL, just in case something else gets inserted before the kzalloc() in the future. (Lucas) Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://lore.kernel.org/r/20251013200944.2499947-32-matthew.d.roper@intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Diffstat (limited to 'include/linux/input/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions