aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/1551-drm-amdgpu-fix-NULL-pointer-when-ta-is-missing.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/1551-drm-amdgpu-fix-NULL-pointer-when-ta-is-missing.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/1551-drm-amdgpu-fix-NULL-pointer-when-ta-is-missing.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/1551-drm-amdgpu-fix-NULL-pointer-when-ta-is-missing.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/1551-drm-amdgpu-fix-NULL-pointer-when-ta-is-missing.patch
new file mode 100644
index 00000000..504c7b5e
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/1551-drm-amdgpu-fix-NULL-pointer-when-ta-is-missing.patch
@@ -0,0 +1,39 @@
+From 3b62a8fdf05c2f7c280fbbb17d7480aa920ef2ea Mon Sep 17 00:00:00 2001
+From: xinhui pan <xinhui.pan@amd.com>
+Date: Fri, 1 Mar 2019 13:35:59 +0800
+Subject: [PATCH 1551/2940] drm/amdgpu: fix NULL pointer when ta is missing
+
+Signed-off-by: xinhui pan <xinhui.pan@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
+index 4ba93fa5c7af..b84075687f41 100644
+--- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
+@@ -123,14 +123,14 @@ static int psp_v11_0_init_microcode(struct psp_context *psp)
+ adev->psp.ta_xgmi_ucode_size = le32_to_cpu(ta_hdr->ta_xgmi_size_bytes);
+ adev->psp.ta_xgmi_start_addr = (uint8_t *)ta_hdr +
+ le32_to_cpu(ta_hdr->header.ucode_array_offset_bytes);
+- }
+
+- adev->psp.ta_fw_version = le32_to_cpu(ta_hdr->header.ucode_version);
++ adev->psp.ta_fw_version = le32_to_cpu(ta_hdr->header.ucode_version);
+
+- adev->psp.ta_ras_ucode_version = le32_to_cpu(ta_hdr->ta_ras_ucode_version);
+- adev->psp.ta_ras_ucode_size = le32_to_cpu(ta_hdr->ta_ras_size_bytes);
+- adev->psp.ta_ras_start_addr = (uint8_t *)adev->psp.ta_xgmi_start_addr +
+- le32_to_cpu(ta_hdr->ta_ras_offset_bytes);
++ adev->psp.ta_ras_ucode_version = le32_to_cpu(ta_hdr->ta_ras_ucode_version);
++ adev->psp.ta_ras_ucode_size = le32_to_cpu(ta_hdr->ta_ras_size_bytes);
++ adev->psp.ta_ras_start_addr = (uint8_t *)adev->psp.ta_xgmi_start_addr +
++ le32_to_cpu(ta_hdr->ta_ras_offset_bytes);
++ }
+
+ return 0;
+
+--
+2.17.1
+