lkml.org 
[lkml]   [2014]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 40/83] hsa/radeon: Adding max clock speeds to topology
Date
From: Evgeny Pinchuk <evgeny.pinchuk@amd.com>

Adding support for CPU and GPU max clock speeds in node properties.

Signed-off-by: Evgeny Pinchuk <evgeny.pinchuk@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
---
drivers/gpu/hsa/radeon/kfd_topology.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/hsa/radeon/kfd_topology.c b/drivers/gpu/hsa/radeon/kfd_topology.c
index 2ee5444..21bb66e 100644
--- a/drivers/gpu/hsa/radeon/kfd_topology.c
+++ b/drivers/gpu/hsa/radeon/kfd_topology.c
@@ -26,6 +26,7 @@
#include <linux/errno.h>
#include <linux/acpi.h>
#include <linux/hash.h>
+#include <linux/cpufreq.h>

#include "kfd_priv.h"
#include "kfd_crat.h"
@@ -712,9 +713,10 @@ static ssize_t node_show(struct kobject *kobj, struct attribute *attr,
sysfs_show_32bit_prop(buffer, "location_id",
dev->node_props.location_id);
sysfs_show_32bit_prop(buffer, "max_engine_clk_fcompute",
- dev->node_props.max_engine_clk_fcompute);
+ kfd2kgd->get_max_engine_clock_in_mhz(
+ dev->gpu->kgd));
ret = sysfs_show_32bit_prop(buffer, "max_engine_clk_ccompute",
- dev->node_props.max_engine_clk_ccompute);
+ cpufreq_quick_get_max(0)/1000);
}

return ret;
--
1.9.1


\
 
 \ /
  Last update: 2014-07-11 00:41    [W:0.323 / U:1.404 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site