From: Lin.Cao Date: Tue, 10 Oct 2023 08:58:31 +0000 (+0800) Subject: drm/amdgpu: save VCN instances init info before jpeg init X-Git-Tag: v6.7-rc1~145^2~10^2~20 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f74f19c4407f4ebd2a98a1d23eb75c7c4b05f272;p=users%2Fdwmw2%2Flinux.git drm/amdgpu: save VCN instances init info before jpeg init JPEG init header will overwirte vcn init header info which will loss some debug information Signed-off-by: Lin.Cao Reviewed-by: Jingwen Chen Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c index a3768aefb6b62..bc38b90f8cf88 100644 --- a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c +++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c @@ -431,6 +431,10 @@ static int jpeg_v4_0_start_sriov(struct amdgpu_device *adev) end.cmd_header.command_type = MMSCH_COMMAND__END; + size = sizeof(struct mmsch_v4_0_init_header); + table_loc = (uint32_t *)table->cpu_addr; + memcpy(&header, (void *)table_loc, size); + header.version = MMSCH_VERSION; header.total_size = RREG32_SOC15(VCN, 0, regMMSCH_VF_CTX_SIZE);