<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Calibri;font-size:10pt;color:#008000;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[Public]<br>
</p>
<br>
<div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Acked-by: Alex Deucher <alexander.deucher@amd.com></div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Jane Jian <Jane.Jian@amd.com><br>
<b>Sent:</b> Tuesday, June 11, 2024 6:06 AM<br>
<b>To:</b> Chen, JingWen (Wayne) <JingWen.Chen2@amd.com><br>
<b>Cc:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Jian, Jane <Jane.Jian@amd.com><br>
<b>Subject:</b> [PATCH] drm/amdgpu/vcn: port mmsch ctx table size fix from jpeg v4</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">add jpeg table size to ctx table size rather than override it<br>
<br>
Signed-off-by: Jane Jian <Jane.Jian@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 2 +-<br>
1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c<br>
index 04d8966423de..0edfb7754768 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c<br>
@@ -202,7 +202,7 @@ static int jpeg_v4_0_3_start_sriov(struct amdgpu_device *adev)<br>
<br>
memset(&header, 0, sizeof(struct mmsch_v4_0_3_init_header));<br>
header.version = MMSCH_VERSION;<br>
- header.total_size = sizeof(struct mmsch_v4_0_3_init_header) >> 2;<br>
+ header.total_size = RREG32_SOC15(VCN, 0, regMMSCH_VF_CTX_SIZE);<br>
<br>
table_loc = (uint32_t *)table->cpu_addr;<br>
table_loc += header.total_size;<br>
-- <br>
2.34.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>