mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
rockchip:midgard:1,keep gpu clock when runtime resume 2,version to 0x07
This commit is contained in:
@@ -86,7 +86,7 @@ EXPORT_SYMBOL(shared_kernel_test_data);
|
||||
#endif /* MALI_UNIT_TEST */
|
||||
|
||||
#define KBASE_DRV_NAME "mali"
|
||||
#define ROCKCHIP_VERSION 6
|
||||
#define ROCKCHIP_VERSION 7
|
||||
static const char kbase_drv_name[] = KBASE_DRV_NAME;
|
||||
|
||||
static int kbase_dev_nr;
|
||||
|
||||
@@ -223,7 +223,7 @@ static int pm_callback_runtime_on(kbase_device *kbdev)
|
||||
if (platform->dvfs_enabled) {
|
||||
/*if (kbase_platform_dvfs_enable(true, MALI_DVFS_START_FREQ)!= MALI_TRUE)*/
|
||||
/*printk("%s\n",__func__);*/
|
||||
if (kbase_platform_dvfs_enable(true, p_mali_dvfs_infotbl[MALI_DVFS_STEP-1].clock)!= MALI_TRUE)
|
||||
if (kbase_platform_dvfs_enable(true, MALI_DVFS_CURRENT_FREQ)!= MALI_TRUE)
|
||||
return -EPERM;
|
||||
} else {
|
||||
if (kbase_platform_dvfs_enable(false, MALI_DVFS_CURRENT_FREQ)!= MALI_TRUE)
|
||||
|
||||
@@ -573,18 +573,26 @@ static ssize_t set_dtlb(struct device *dev, struct device_attribute *attr, const
|
||||
static ssize_t show_dvfs(struct device *dev, struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct kbase_device *kbdev;
|
||||
struct rk_context *platform;
|
||||
ssize_t ret = 0;
|
||||
unsigned int clkrate;
|
||||
|
||||
kbdev = dev_get_drvdata(dev);
|
||||
|
||||
if (!kbdev)
|
||||
return -ENODEV;
|
||||
|
||||
platform = (struct rk_context *)kbdev->platform_context;
|
||||
if (!platform)
|
||||
return -ENODEV;
|
||||
|
||||
clkrate = dvfs_clk_get_rate(platform->mali_clk_node);
|
||||
|
||||
#ifdef CONFIG_MALI_MIDGARD_DVFS
|
||||
if (kbase_platform_dvfs_get_enable_status())
|
||||
ret += snprintf(buf + ret, PAGE_SIZE - ret, "mali DVFS is on\nutilisation:%d", kbase_platform_dvfs_get_utilisation());
|
||||
ret += snprintf(buf + ret, PAGE_SIZE - ret, "mali DVFS is on\nutilisation:%d\ncurrent clock:%dMhz", kbase_platform_dvfs_get_utilisation(),clkrate/1000000);
|
||||
else
|
||||
ret += snprintf(buf + ret, PAGE_SIZE - ret, "mali DVFS is off");
|
||||
ret += snprintf(buf + ret, PAGE_SIZE - ret, "mali DVFS is off,clock:%dMhz",clkrate/1000000);
|
||||
#else
|
||||
ret += snprintf(buf + ret, PAGE_SIZE - ret, "mali DVFS is disabled");
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user