aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0199-drm-amdgpu-add-a-cgs-interface-to-fetch-cg-and-pg-fl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0199-drm-amdgpu-add-a-cgs-interface-to-fetch-cg-and-pg-fl.patch')
-rw-r--r--common/recipes-kernel/linux/files/0199-drm-amdgpu-add-a-cgs-interface-to-fetch-cg-and-pg-fl.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0199-drm-amdgpu-add-a-cgs-interface-to-fetch-cg-and-pg-fl.patch b/common/recipes-kernel/linux/files/0199-drm-amdgpu-add-a-cgs-interface-to-fetch-cg-and-pg-fl.patch
new file mode 100644
index 00000000..3cf097ce
--- /dev/null
+++ b/common/recipes-kernel/linux/files/0199-drm-amdgpu-add-a-cgs-interface-to-fetch-cg-and-pg-fl.patch
@@ -0,0 +1,48 @@
+From 0561bbe3a5e3dc6c7c99933dbd6f5e12781a2a1b Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Fri, 5 Feb 2016 10:34:28 -0500
+Subject: [PATCH 0199/1110] drm/amdgpu: add a cgs interface to fetch cg and pg
+ flags
+
+Needed to pass the cg and pg info to powerplay.
+
+Reviewed-by: Eric Huang <JinHuiEric.Huang@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 6 ++++++
+ drivers/gpu/drm/amd/include/cgs_common.h | 2 ++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
+index a081dda..7a4b101 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
+@@ -795,6 +795,12 @@ static int amdgpu_cgs_query_system_info(void *cgs_device,
+ case CGS_SYSTEM_INFO_PCIE_MLW:
+ sys_info->value = adev->pm.pcie_mlw_mask;
+ break;
++ case CGS_SYSTEM_INFO_CG_FLAGS:
++ sys_info->value = adev->cg_flags;
++ break;
++ case CGS_SYSTEM_INFO_PG_FLAGS:
++ sys_info->value = adev->pg_flags;
++ break;
+ default:
+ return -ENODEV;
+ }
+diff --git a/drivers/gpu/drm/amd/include/cgs_common.h b/drivers/gpu/drm/amd/include/cgs_common.h
+index 713aec9..aec38fc 100644
+--- a/drivers/gpu/drm/amd/include/cgs_common.h
++++ b/drivers/gpu/drm/amd/include/cgs_common.h
+@@ -109,6 +109,8 @@ enum cgs_system_info_id {
+ CGS_SYSTEM_INFO_ADAPTER_BDF_ID = 1,
+ CGS_SYSTEM_INFO_PCIE_GEN_INFO,
+ CGS_SYSTEM_INFO_PCIE_MLW,
++ CGS_SYSTEM_INFO_CG_FLAGS,
++ CGS_SYSTEM_INFO_PG_FLAGS,
+ CGS_SYSTEM_INFO_ID_MAXIMUM,
+ };
+
+--
+2.7.4
+