aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/1507-drm-amdgpu-add-module-parameters-for-ras.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/1507-drm-amdgpu-add-module-parameters-for-ras.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/1507-drm-amdgpu-add-module-parameters-for-ras.patch66
1 files changed, 66 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/1507-drm-amdgpu-add-module-parameters-for-ras.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/1507-drm-amdgpu-add-module-parameters-for-ras.patch
new file mode 100644
index 00000000..d7697583
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/1507-drm-amdgpu-add-module-parameters-for-ras.patch
@@ -0,0 +1,66 @@
+From e8f36d1aeddb2a0f112359caa144a6a19aeb3993 Mon Sep 17 00:00:00 2001
+From: xinhui pan <xinhui.pan@amd.com>
+Date: Thu, 25 Oct 2018 14:35:13 +0800
+Subject: [PATCH 1507/2940] drm/amdgpu: add module parameters for ras
+
+Allow RAS feature enable/disable via boot parameter.
+
+Signed-off-by: xinhui pan <xinhui.pan@amd.com>
+Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++
+ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 17 +++++++++++++++++
+ 2 files changed, 19 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+index 760df8975c2a..d907736cc74e 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+@@ -160,6 +160,8 @@ extern int amdgpu_emu_mode;
+ extern uint amdgpu_smu_memory_pool_size;
+ extern uint amdgpu_dc_feature_mask;
+ extern struct amdgpu_mgpu_info mgpu_info;
++extern int amdgpu_ras_enable;
++extern uint amdgpu_ras_mask;
+
+ #ifdef CONFIG_DRM_AMDGPU_SI
+ extern int amdgpu_si_support;
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+index bc5a0ce7d989..ff925a225d4c 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+@@ -141,6 +141,8 @@ uint amdgpu_dc_feature_mask = 0;
+ struct amdgpu_mgpu_info mgpu_info = {
+ .mutex = __MUTEX_INITIALIZER(mgpu_info.mutex),
+ };
++int amdgpu_ras_enable = -1;
++uint amdgpu_ras_mask = 0xffffffff;
+
+ /**
+ * DOC: vramlimit (int)
+@@ -508,6 +510,21 @@ module_param_named(gpu_recovery, amdgpu_gpu_recovery, int, 0444);
+ MODULE_PARM_DESC(emu_mode, "Emulation mode, (1 = enable, 0 = disable)");
+ module_param_named(emu_mode, amdgpu_emu_mode, int, 0444);
+
++/**
++ * DOC: amdgpu_ras_enable (int)
++ * Enable RAS features on the GPU (0 = disable, 1 = enable, -1 = auto (default))
++ */
++MODULE_PARM_DESC(amdgpu_ras_enable, "Enable RAS features on the GPU (0 = disable, 1 = enable, -1 = auto (default))");
++module_param_named(ras_enable, amdgpu_ras_enable, int, 0444);
++
++/**
++ * DOC: amdgpu_ras_mask (uint)
++ * Mask of RAS features to enable (default 0xffffffff), only valid when ras_enable == 1
++ * See the flags in drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
++ */
++MODULE_PARM_DESC(amdgpu_ras_mask, "Mask of RAS features to enable (default 0xffffffff), only valid when ras_enable == 1");
++module_param_named(ras_mask, amdgpu_ras_mask, uint, 0444);
++
+ /**
+ * DOC: si_support (int)
+ * Set SI support driver. This parameter works after set config CONFIG_DRM_AMDGPU_SI. For SI asic, when radeon driver is enabled,
+--
+2.17.1
+