Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: skip SDMA autoload copy if not initialized

Skip SDMA firmware copy for rlc autoload if SDMA not enabled.

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Likun Gao and committed by
Alex Deucher
e5fc897b 3e227861

+9 -7
+9 -7
drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
··· 994 994 uint32_t fw_size; 995 995 const struct sdma_firmware_header_v3_0 *sdma_hdr; 996 996 997 - sdma_hdr = (const struct sdma_firmware_header_v3_0 *) 998 - adev->sdma.instance[0].fw->data; 999 - fw_data = (const __le32 *) (adev->sdma.instance[0].fw->data + 1000 - le32_to_cpu(sdma_hdr->ucode_offset_bytes)); 1001 - fw_size = le32_to_cpu(sdma_hdr->ucode_size_bytes); 997 + if (adev->sdma.instance[0].fw) { 998 + sdma_hdr = (const struct sdma_firmware_header_v3_0 *) 999 + adev->sdma.instance[0].fw->data; 1000 + fw_data = (const __le32 *) (adev->sdma.instance[0].fw->data + 1001 + le32_to_cpu(sdma_hdr->ucode_offset_bytes)); 1002 + fw_size = le32_to_cpu(sdma_hdr->ucode_size_bytes); 1002 1003 1003 - gfx_v12_1_rlc_backdoor_autoload_copy_ucode(adev, SOC24_FIRMWARE_ID_SDMA_UCODE_TH0, 1004 - fw_data, fw_size); 1004 + gfx_v12_1_rlc_backdoor_autoload_copy_ucode(adev, SOC24_FIRMWARE_ID_SDMA_UCODE_TH0, 1005 + fw_data, fw_size); 1006 + } 1005 1007 } 1006 1008 1007 1009 static void