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: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240424140319.61651-1-jose.souza@intel.com
parent 49f853c7
...@@ -791,7 +791,7 @@ xe_hw_engine_snapshot_capture(struct xe_hw_engine *hwe) ...@@ -791,7 +791,7 @@ xe_hw_engine_snapshot_capture(struct xe_hw_engine *hwe)
return NULL; return NULL;
snapshot->name = kstrdup(hwe->name, GFP_ATOMIC); snapshot->name = kstrdup(hwe->name, GFP_ATOMIC);
snapshot->class = hwe->class; snapshot->hwe = hwe;
snapshot->logical_instance = hwe->logical_instance; snapshot->logical_instance = hwe->logical_instance;
snapshot->forcewake.domain = hwe->domain; snapshot->forcewake.domain = hwe->domain;
snapshot->forcewake.ref = xe_force_wake_ref(gt_to_fw(hwe->gt), snapshot->forcewake.ref = xe_force_wake_ref(gt_to_fw(hwe->gt),
...@@ -842,7 +842,7 @@ xe_hw_engine_snapshot_capture(struct xe_hw_engine *hwe) ...@@ -842,7 +842,7 @@ xe_hw_engine_snapshot_capture(struct xe_hw_engine *hwe)
snapshot->reg.ring_eir = hw_engine_mmio_read32(hwe, RING_EIR(0)); snapshot->reg.ring_eir = hw_engine_mmio_read32(hwe, RING_EIR(0));
snapshot->reg.ipehr = hw_engine_mmio_read32(hwe, RING_IPEHR(0)); snapshot->reg.ipehr = hw_engine_mmio_read32(hwe, RING_IPEHR(0));
if (snapshot->class == XE_ENGINE_CLASS_COMPUTE) if (snapshot->hwe->class == XE_ENGINE_CLASS_COMPUTE)
snapshot->reg.rcu_mode = xe_mmio_read32(hwe->gt, RCU_MODE); snapshot->reg.rcu_mode = xe_mmio_read32(hwe->gt, RCU_MODE);
return snapshot; return snapshot;
...@@ -887,7 +887,7 @@ void xe_hw_engine_snapshot_print(struct xe_hw_engine_snapshot *snapshot, ...@@ -887,7 +887,7 @@ void xe_hw_engine_snapshot_print(struct xe_hw_engine_snapshot *snapshot,
drm_printf(p, "\tBBADDR: 0x%016llx\n", snapshot->reg.ring_bbaddr); drm_printf(p, "\tBBADDR: 0x%016llx\n", snapshot->reg.ring_bbaddr);
drm_printf(p, "\tDMA_FADDR: 0x%016llx\n", snapshot->reg.ring_dma_fadd); drm_printf(p, "\tDMA_FADDR: 0x%016llx\n", snapshot->reg.ring_dma_fadd);
drm_printf(p, "\tIPEHR: 0x%08x\n", snapshot->reg.ipehr); drm_printf(p, "\tIPEHR: 0x%08x\n", snapshot->reg.ipehr);
if (snapshot->class == XE_ENGINE_CLASS_COMPUTE) if (snapshot->hwe->class == XE_ENGINE_CLASS_COMPUTE)
drm_printf(p, "\tRCU_MODE: 0x%08x\n", drm_printf(p, "\tRCU_MODE: 0x%08x\n",
snapshot->reg.rcu_mode); snapshot->reg.rcu_mode);
} }
......
...@@ -158,8 +158,8 @@ struct xe_hw_engine { ...@@ -158,8 +158,8 @@ struct xe_hw_engine {
struct xe_hw_engine_snapshot { struct xe_hw_engine_snapshot {
/** @name: name of the hw engine */ /** @name: name of the hw engine */
char *name; char *name;
/** @class: class of this hw engine */ /** @hwe: hw engine */
enum xe_engine_class class; struct xe_hw_engine *hwe;
/** @logical_instance: logical instance of this hw engine */ /** @logical_instance: logical instance of this hw engine */
u16 logical_instance; u16 logical_instance;
/** @forcewake: Force Wake information snapshot */ /** @forcewake: Force Wake information snapshot */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment