aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3443-drm-amdkfd-Export-microcode-version-of-sDMA.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3443-drm-amdkfd-Export-microcode-version-of-sDMA.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3443-drm-amdkfd-Export-microcode-version-of-sDMA.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3443-drm-amdkfd-Export-microcode-version-of-sDMA.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3443-drm-amdkfd-Export-microcode-version-of-sDMA.patch
new file mode 100644
index 00000000..9f60caf6
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3443-drm-amdkfd-Export-microcode-version-of-sDMA.patch
@@ -0,0 +1,60 @@
+From 8cb3a6c01d1f3e4d1a999585d588540a70726be2 Mon Sep 17 00:00:00 2001
+From: Philip Yang <Philip.Yang@amd.com>
+Date: Fri, 9 Mar 2018 15:37:52 -0500
+Subject: [PATCH 3443/4131] drm/amdkfd: Export microcode version of sDMA
+
+BUG: SWDEV-147571
+
+Change-Id: I348f9d4313f12894d57f82d03f76203648a532c6
+Signed-off-by: Philip Yang <Philip.Yang@amd.com>
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_device.c | 3 ++-
+ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 3 ++-
+ drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 ++
+ 3 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+index 74fd3b2..47dfce9 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+@@ -417,7 +417,8 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
+
+ kfd->mec_fw_version = kfd->kfd2kgd->get_fw_version(kfd->kgd,
+ KGD_ENGINE_MEC1);
+-
++ kfd->sdma_fw_version = kfd->kfd2kgd->get_fw_version(kfd->kgd,
++ KGD_ENGINE_SDMA1);
+ kfd->shared_resources = *gpu_resources;
+
+ /* Usually first_vmid_kfd = 8, last_vmid_kfd = 15 */
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
+index 121be0c..b2ef0f5 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
+@@ -280,8 +280,9 @@ struct kfd_dev {
+ /* Debug manager */
+ struct kfd_dbgmgr *dbgmgr;
+
+- /* MEC firmware version*/
++ /* Firmware versions*/
+ uint16_t mec_fw_version;
++ uint16_t sdma_fw_version;
+
+ /* Maximum process number mapped to HW scheduler */
+ unsigned int max_proc_per_quantum;
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+index 47bcca0..320c8d3 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+@@ -515,6 +515,8 @@ static ssize_t node_show(struct kobject *kobj, struct attribute *attr,
+ dev->gpu->mec_fw_version);
+ sysfs_show_32bit_prop(buffer, "capability",
+ dev->node_props.capability);
++ sysfs_show_32bit_prop(buffer, "sdma_fw_version",
++ dev->gpu->sdma_fw_version);
+ }
+
+ return sysfs_show_32bit_prop(buffer, "max_engine_clk_ccompute",
+--
+2.7.4
+