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

drm/xe: Store xe_hw_engine in xe_hw_engine_snapshot

A future patch will require gt and xe device structs, so here
replacing class by hwe.

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Zhanjun Dong <zhanjun.dong@intel.com>
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240424140319.61651-1-jose.souza@intel.com

+5 -5
+3 -3
drivers/gpu/drm/xe/xe_hw_engine.c
··· 791 791 return NULL; 792 792 793 793 snapshot->name = kstrdup(hwe->name, GFP_ATOMIC); 794 - snapshot->class = hwe->class; 794 + snapshot->hwe = hwe; 795 795 snapshot->logical_instance = hwe->logical_instance; 796 796 snapshot->forcewake.domain = hwe->domain; 797 797 snapshot->forcewake.ref = xe_force_wake_ref(gt_to_fw(hwe->gt), ··· 842 842 snapshot->reg.ring_eir = hw_engine_mmio_read32(hwe, RING_EIR(0)); 843 843 snapshot->reg.ipehr = hw_engine_mmio_read32(hwe, RING_IPEHR(0)); 844 844 845 - if (snapshot->class == XE_ENGINE_CLASS_COMPUTE) 845 + if (snapshot->hwe->class == XE_ENGINE_CLASS_COMPUTE) 846 846 snapshot->reg.rcu_mode = xe_mmio_read32(hwe->gt, RCU_MODE); 847 847 848 848 return snapshot; ··· 887 887 drm_printf(p, "\tBBADDR: 0x%016llx\n", snapshot->reg.ring_bbaddr); 888 888 drm_printf(p, "\tDMA_FADDR: 0x%016llx\n", snapshot->reg.ring_dma_fadd); 889 889 drm_printf(p, "\tIPEHR: 0x%08x\n", snapshot->reg.ipehr); 890 - if (snapshot->class == XE_ENGINE_CLASS_COMPUTE) 890 + if (snapshot->hwe->class == XE_ENGINE_CLASS_COMPUTE) 891 891 drm_printf(p, "\tRCU_MODE: 0x%08x\n", 892 892 snapshot->reg.rcu_mode); 893 893 }
+2 -2
drivers/gpu/drm/xe/xe_hw_engine_types.h
··· 158 158 struct xe_hw_engine_snapshot { 159 159 /** @name: name of the hw engine */ 160 160 char *name; 161 - /** @class: class of this hw engine */ 162 - enum xe_engine_class class; 161 + /** @hwe: hw engine */ 162 + struct xe_hw_engine *hwe; 163 163 /** @logical_instance: logical instance of this hw engine */ 164 164 u16 logical_instance; 165 165 /** @forcewake: Force Wake information snapshot */