From: Jiyu Yang Date: Sun, 28 Jun 2015 07:03:00 +0000 (+0800) Subject: PD#108096 add pm ops X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=589fca7f6ce6a8856c39de3b2edb1abed40c6926;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_mali-driver.git PD#108096 add pm ops suspend/resume issues Change-Id: I4f8818a0b4594d0026524a8f1b417de29b04f62c Signed-off-by: Jiyu Yang --- diff --git a/mali/platform/meson_bu/mali_clock.c b/mali/platform/meson_bu/mali_clock.c index cae2173..fbda6b5 100644 --- a/mali/platform/meson_bu/mali_clock.c +++ b/mali/platform/meson_bu/mali_clock.c @@ -136,8 +136,8 @@ void disable_clock(void) return ; } - clk_prepare_enable(clk_mali_0); - clk_prepare_enable(clk_mali_1); + clk_disable_unprepare(clk_mali_0); + clk_disable_unprepare(clk_mali_1); } void enable_clock(void) @@ -154,8 +154,8 @@ void enable_clock(void) return ; } - clk_disable_unprepare(clk_mali_0); - clk_disable_unprepare(clk_mali_1); + clk_prepare_enable(clk_mali_0); + clk_prepare_enable(clk_mali_1); } u32 get_mali_freq(u32 idx) diff --git a/mali/platform/meson_bu/meson_main2.c b/mali/platform/meson_bu/meson_main2.c index 6bcbf49..bca9175 100644 --- a/mali/platform/meson_bu/meson_main2.c +++ b/mali/platform/meson_bu/meson_main2.c @@ -70,12 +70,14 @@ int mali_platform_device_init(struct platform_device *device) err = platform_device_add_data(device, &mali_gpu_data, sizeof(mali_gpu_data)); if (0 == err) { + device->dev.type = &mali_pm_device; /* We should probably use the pm_domain instead of type on newer kernels */ #ifdef CONFIG_PM_RUNTIME #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) - pm_runtime_set_autosuspend_delay(&(device->dev), 1000); - pm_runtime_use_autosuspend(&(device->dev)); + pm_runtime_set_autosuspend_delay(&device->dev, 1000); + pm_runtime_use_autosuspend(&device->dev); #endif pm_runtime_enable(&(device->dev)); + pm_runtime_enable(&device->dev); #endif mali_meson_init_finish(device); }