aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2843-drm-amdgpu-properly-guard-the-generic-discovery-code.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2843-drm-amdgpu-properly-guard-the-generic-discovery-code.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2843-drm-amdgpu-properly-guard-the-generic-discovery-code.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2843-drm-amdgpu-properly-guard-the-generic-discovery-code.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2843-drm-amdgpu-properly-guard-the-generic-discovery-code.patch
new file mode 100644
index 00000000..00ff11df
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2843-drm-amdgpu-properly-guard-the-generic-discovery-code.patch
@@ -0,0 +1,39 @@
+From 6da2c77bb08d4306dd01f0f26b1a5c958d021d7f Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Mon, 8 Jul 2019 13:44:59 -0500
+Subject: [PATCH 2843/2940] drm/amdgpu: properly guard the generic discovery
+ code
+
+It's only available on navi and newer.
+
+Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+index 93fe40989f80..6edc9d623148 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+@@ -2616,7 +2616,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
+ if (amdgpu_mes && adev->asic_type >= CHIP_NAVI10)
+ adev->enable_mes = true;
+
+- if (amdgpu_discovery) {
++ if (amdgpu_discovery && adev->asic_type >= CHIP_NAVI10) {
+ r = amdgpu_discovery_init(adev);
+ if (r) {
+ dev_err(adev->dev, "amdgpu_discovery_init failed\n");
+@@ -2894,7 +2894,7 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
+ if (IS_ENABLED(CONFIG_PERF_EVENTS))
+ amdgpu_pmu_fini(adev);
+ amdgpu_debugfs_preempt_cleanup(adev);
+- if (amdgpu_discovery)
++ if (amdgpu_discovery && adev->asic_type >= CHIP_NAVI10)
+ amdgpu_discovery_fini(adev);
+ }
+
+--
+2.17.1
+