[PATCH 1/2] drm/amdgpu: decode the ctxid for SMC to host IH

Evan Quan evan.quan at amd.com
Fri May 8 10:02:52 UTC 2020


Driver needs that to tell the different events raised from SMC.

Change-Id: I0e44e22527182fbb45a2db4fc3b1cd73fb17ba33
Signed-off-by: Evan Quan <evan.quan at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h | 1 +
 drivers/gpu/drm/amd/amdgpu/navi10_ih.c  | 1 +
 drivers/gpu/drm/amd/amdgpu/vega10_ih.c  | 1 +
 3 files changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h
index 7b1762b1c595..965875b8bf93 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h
@@ -55,6 +55,7 @@ struct amdgpu_iv_entry {
 	unsigned timestamp_src;
 	unsigned pasid;
 	unsigned pasid_src;
+	unsigned ctxid; /* for SMC to Host interrupt */
 	unsigned src_data[AMDGPU_IRQ_SRC_DATA_MAX_SIZE_DW];
 	const uint32_t *iv_entry;
 };
diff --git a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
index f97857ed3c7e..932dc3eabbe2 100644
--- a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
@@ -470,6 +470,7 @@ static void navi10_ih_decode_iv(struct amdgpu_device *adev,
 	entry->timestamp_src = dw[2] >> 31;
 	entry->pasid = dw[3] & 0xffff;
 	entry->pasid_src = dw[3] >> 31;
+	entry->ctxid = dw[4];
 	entry->src_data[0] = dw[4];
 	entry->src_data[1] = dw[5];
 	entry->src_data[2] = dw[6];
diff --git a/drivers/gpu/drm/amd/amdgpu/vega10_ih.c b/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
index 407c6093c2ec..e46d1f9f62ca 100644
--- a/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
@@ -460,6 +460,7 @@ static void vega10_ih_decode_iv(struct amdgpu_device *adev,
 	entry->timestamp_src = dw[2] >> 31;
 	entry->pasid = dw[3] & 0xffff;
 	entry->pasid_src = dw[3] >> 31;
+	entry->ctxid = dw[4];
 	entry->src_data[0] = dw[4];
 	entry->src_data[1] = dw[5];
 	entry->src_data[2] = dw[6];
-- 
2.26.2



More information about the amd-gfx mailing list