Skip to contentSkip to conversation

drm/amdgpu/vcn: port mmsch ctx table size fix from jpeg v4

PATCH In review Jane Jian 2 participants 2 messages Jun 11, 2024 – Jun 14, 2024

Subsystems (2)
lore
Share & tools
lore

Jane Jian

author
#0 lore raw

PATCH 1/1 drm/amdgpu/vcn: port mmsch ctx table size fix from jpeg v4

add jpeg table size to ctx table size rather than override it

---
 drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c +1 -1
index 04d8966423de..0edfb7754768 100644
@@ -202,7 +202,7 @@ static int jpeg_v4_0_3_start_sriov(struct amdgpu_device *adev)
 
 		memset(&header, 0, sizeof(struct mmsch_v4_0_3_init_header));
 		header.version = MMSCH_VERSION;
-		header.total_size = sizeof(struct mmsch_v4_0_3_init_header) >> 2;
+		header.total_size = RREG32_SOC15(VCN, 0, regMMSCH_VF_CTX_SIZE);
 
 		table_loc = (uint32_t *)table->cpu_addr;
 		table_loc += header.total_size;
Signature · 1 line
2.34.1
maintainer Acked-by on v1 1/1
#1 lore raw

[Public]

________________________________
From: amd-gfx <[email protected]> on behalf of Jane Jian <[email protected]>
Sent: Tuesday, June 11, 2024 6:06 AM
To: Chen, JingWen (Wayne) <[email protected]>
Cc: [email protected] <[email protected]>; Jian, Jane <[email protected]>
Subject: [PATCH] drm/amdgpu/vcn: port mmsch ctx table size fix from jpeg v4

add jpeg table size to ctx table size rather than override it

---
 drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c +1 -1
index 04d8966423de..0edfb7754768 100644
@@ -202,7 +202,7 @@ static int jpeg_v4_0_3_start_sriov(struct amdgpu_device *adev)
 
                 memset(&header, 0, sizeof(struct mmsch_v4_0_3_init_header));
                 header.version = MMSCH_VERSION;
-               header.total_size = sizeof(struct mmsch_v4_0_3_init_header) >> 2;
+               header.total_size = RREG32_SOC15(VCN, 0, regMMSCH_VF_CTX_SIZE);
 
                 table_loc = (uint32_t *)table->cpu_addr;
                 table_loc += header.total_size;

--
2.34.1