config MALI_MIDGARD_RT_PM
bool "Enable Runtime power management"
depends on MALI_MIDGARD
- depends on PM_RUNTIME
+ depends on PM
default y
help
Choose this option to enable runtime power management in the Mali Midgard DDK.
*/
struct kbase_platform_funcs_conf {
/**
- * platform_init_func
- * - platform specific init function pointer
+ * platform_init_func - platform specific init function pointer
* @kbdev - kbase_device pointer
*
- * Returns 0 on success,
- * negative error code otherwise.
+ * Returns 0 on success, negative error code otherwise.
*
* Function pointer for platform specific initialization or NULL if no
* initialization function is required. At the point this the GPU is
* not active and its power and clocks are in unknown (platform specific
* state) as kbase doesn't yet have control of power and clocks.
*
- * The platform specific private pointer kbase_device::platform_context
- * can be accessed (and possibly initialized) in here.
+ * The platform specific private pointer kbase_device::platform_context
+ * can be accessed (and possibly initialized) in here.
*/
int (*platform_init_func)(struct kbase_device *kbdev);
/**
*
*/
-
+#define ENABLE_DEBUG_LOG
+#include "platform/rk/custom_log.h"
#include <mali_kbase.h>
#include <mali_kbase_hwaccess_gpuprops.h>
#include <linux/syscalls.h>
#endif /* CONFIG_KDS */
+#include <linux/pm_runtime.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/poll.h>
*/
#else
debugfs_create_bool("infinite_cache", 0644, kctx->kctx_dentry,
- &kctx->infinite_cache_active);
+ (bool*)&(kctx->infinite_cache_active));
#endif /* CONFIG_MALI_COH_USER */
mutex_init(&kctx->mem_profile_lock);
#ifndef CONFIG_MALI_COH_USER
debugfs_create_bool("infinite_cache", 0644,
debugfs_ctx_defaults_directory,
- &kbdev->infinite_cache_active_default);
+ (bool*)&(kbdev->infinite_cache_active_default));
#endif /* CONFIG_MALI_COH_USER */
debugfs_create_size_t("mem_pool_max_size", 0644,
int err = 0;
int i;
- printk(KERN_INFO "arm_release_ver of this mali_ko is '%s', rk_ko_ver is '%d', built at '%s', on '%s'.",
- MALI_RELEASE_NAME,
- ROCKCHIP_VERSION,
- __TIME__,
- __DATE__);
-
#ifdef CONFIG_OF
err = kbase_platform_early_init();
if (err) {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0)) && defined(CONFIG_OF) \
&& defined(CONFIG_PM_OPP)
/* Register the OPPs if they are available in device tree */
- if (of_init_opp_table(kbdev->dev) < 0)
+ if (dev_pm_opp_of_add_table(kbdev->dev) < 0)
dev_dbg(kbdev->dev, "OPP table not found\n");
#endif
kbase_common_device_remove(kbdev);
out_common_init:
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
- of_free_opp_table(kbdev->dev);
+ dev_pm_opp_of_remove_table(kbdev->dev);
#endif
clk_disable_unprepare(kbdev->clock);
out_clock_prepare:
#include <linux/clk.h>
#include <linux/regulator/consumer.h>
-#if defined(CONFIG_PM_RUNTIME) || \
- (defined(CONFIG_PM) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
+#if defined(CONFIG_PM)
#define KBASE_PM_RUNTIME 1
#endif
kbdev = list_entry(entry, struct kbase_device, entry);
/* output the total memory usage and cap for this device */
- ret = seq_printf(sfile, "%-16s %10u\n",
+ seq_printf(sfile, "%-16s %10u\n",
kbdev->devname,
atomic_read(&(kbdev->memdev.used_pages)));
mutex_lock(&kbdev->kctx_list_lock);
list_for_each_entry(element, &kbdev->kctx_list, link) {
/* output the memory usage and cap for each kctx
* opened on this device */
- ret = seq_printf(sfile, " %s-0x%p %10u\n",
+ seq_printf(sfile, " %s-0x%p %10u\n",
"kctx",
element->kctx,
atomic_read(&(element->kctx->used_pages)));
err = seq_write(sfile, kctx->mem_profile_data, kctx->mem_profile_size);
if (!err)
- err = seq_putc(sfile, '\n');
+ seq_putc(sfile, '\n');
mutex_unlock(&kctx->mem_profile_lock);