]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amdgpu: save VCN instances init info before jpeg init
authorLin.Cao <lincao12@amd.com>
Tue, 10 Oct 2023 08:58:31 +0000 (16:58 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Oct 2023 15:32:34 +0000 (11:32 -0400)
JPEG init header will overwirte vcn init header info which will loss
some debug information

Signed-off-by: Lin.Cao <lincao12@amd.com>
Reviewed-by: Jingwen Chen <Jingwen.Chen2@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c

index a3768aefb6b6244b6277726a0e70e7c58dfe0744..bc38b90f8cf88e8fee393e8e52214ac72f0aa8a6 100644 (file)
@@ -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);