summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSeung-Woo Kim <sw0312.kim@samsung.com>2015-03-27 14:10:47 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:49:49 +0900
commitf21f4cd73e2b2ada446ed8174bec6dfc9267e9f1 (patch)
treea45ab06d797bd3a39ddb9759153de7b891f877fb /drivers
parentdd505fe928b661627a613bee5849b3c72030cb35 (diff)
gpu: arm : mali400: replace CONFIG_PM_RUNTIME to CONFIG_PM
After commit 464ed18ebdb6 ("PM: Eliminate CONFIG_PM_RUNTIME") which is applied kernel version 3.19, PM_RUNTIME is eliminated. So this patch replaces CONFIG_PM_RUNTIME to CONFIG_PM for kernel version larger than 3.19. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/arm/mali400/mali/linux/mali_kernel_linux.c9
-rw-r--r--drivers/gpu/arm/mali400/mali/linux/mali_osk_pm.c18
-rw-r--r--drivers/gpu/arm/mali400/r4p0_rel0/linux/mali_kernel_linux.c9
-rw-r--r--drivers/gpu/arm/mali400/r4p0_rel0/linux/mali_osk_pm.c21
4 files changed, 38 insertions, 19 deletions
diff --git a/drivers/gpu/arm/mali400/mali/linux/mali_kernel_linux.c b/drivers/gpu/arm/mali400/mali/linux/mali_kernel_linux.c
index 655c717e3350..d3b8d314f861 100644
--- a/drivers/gpu/arm/mali400/mali/linux/mali_kernel_linux.c
+++ b/drivers/gpu/arm/mali400/mali/linux/mali_kernel_linux.c
@@ -137,7 +137,8 @@ static int mali_remove(struct platform_device *pdev);
static int mali_driver_suspend_scheduler(struct device *dev);
static int mali_driver_resume_scheduler(struct device *dev);
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+ || defined(CONFIG_PM)
static int mali_driver_runtime_suspend(struct device *dev);
static int mali_driver_runtime_resume(struct device *dev);
static int mali_driver_runtime_idle(struct device *dev);
@@ -163,7 +164,8 @@ struct pm_ext_ops mali_dev_ext_pm_ops =
#else
static const struct dev_pm_ops mali_dev_pm_ops =
{
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+ || defined(CONFIG_PM)
.runtime_suspend = mali_driver_runtime_suspend,
.runtime_resume = mali_driver_runtime_resume,
.runtime_idle = mali_driver_runtime_idle,
@@ -396,7 +398,8 @@ static int mali_driver_resume_scheduler(struct device *dev)
return 0;
}
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+ || defined(CONFIG_PM)
static int mali_driver_runtime_suspend(struct device *dev)
{
mali_pm_runtime_suspend();
diff --git a/drivers/gpu/arm/mali400/mali/linux/mali_osk_pm.c b/drivers/gpu/arm/mali400/mali/linux/mali_osk_pm.c
index f2351bdae376..368cb1f2cce3 100644
--- a/drivers/gpu/arm/mali400/mali/linux/mali_osk_pm.c
+++ b/drivers/gpu/arm/mali400/mali/linux/mali_osk_pm.c
@@ -14,10 +14,12 @@
*/
#include <linux/sched.h>
+#include <linux/version.h>
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+ || defined(CONFIG_PM)
#include <linux/pm_runtime.h>
-#endif /* CONFIG_PM_RUNTIME */
+#endif
#include <linux/platform_device.h>
#include <linux/version.h>
#include "mali_osk.h"
@@ -39,7 +41,8 @@ void _mali_osk_pm_dev_disable(void) /* @@@@ todo: change to term of some kind */
/* Can NOT run in atomic context */
_mali_osk_errcode_t _mali_osk_pm_dev_ref_add(void)
{
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+ || defined(CONFIG_PM)
int err;
MALI_DEBUG_ASSERT_POINTER(mali_platform_device);
err = pm_runtime_get_sync(&(mali_platform_device->dev));
@@ -60,7 +63,8 @@ _mali_osk_errcode_t _mali_osk_pm_dev_ref_add(void)
/* Can run in atomic context */
void _mali_osk_pm_dev_ref_dec(void)
{
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+ || defined(CONFIG_PM)
MALI_DEBUG_ASSERT_POINTER(mali_platform_device);
_mali_osk_atomic_dec(&mali_pm_ref_count);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
@@ -76,7 +80,8 @@ void _mali_osk_pm_dev_ref_dec(void)
/* Can run in atomic context */
mali_bool _mali_osk_pm_dev_ref_add_no_power_on(void)
{
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+ || defined(CONFIG_PM)
u32 ref;
MALI_DEBUG_ASSERT_POINTER(mali_platform_device);
pm_runtime_get_noresume(&(mali_platform_device->dev));
@@ -91,7 +96,8 @@ mali_bool _mali_osk_pm_dev_ref_add_no_power_on(void)
/* Can run in atomic context */
void _mali_osk_pm_dev_ref_dec_no_power_on(void)
{
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+ || defined(CONFIG_PM)
MALI_DEBUG_ASSERT_POINTER(mali_platform_device);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
pm_runtime_put_autosuspend(&(mali_platform_device->dev));
diff --git a/drivers/gpu/arm/mali400/r4p0_rel0/linux/mali_kernel_linux.c b/drivers/gpu/arm/mali400/r4p0_rel0/linux/mali_kernel_linux.c
index 14fe56e34979..b6002449a7e2 100644
--- a/drivers/gpu/arm/mali400/r4p0_rel0/linux/mali_kernel_linux.c
+++ b/drivers/gpu/arm/mali400/r4p0_rel0/linux/mali_kernel_linux.c
@@ -140,7 +140,8 @@ static int mali_remove(struct platform_device *pdev);
static int mali_driver_suspend_scheduler(struct device *dev);
static int mali_driver_resume_scheduler(struct device *dev);
-#ifdef CONFIG_PM
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+ || defined(CONFIG_PM)
static int mali_driver_runtime_suspend(struct device *dev);
static int mali_driver_runtime_resume(struct device *dev);
static int mali_driver_runtime_idle(struct device *dev);
@@ -164,7 +165,8 @@ struct pm_ext_ops mali_dev_ext_pm_ops = {
};
#else
static const struct dev_pm_ops mali_dev_pm_ops = {
-#ifdef CONFIG_PM
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+ || defined(CONFIG_PM)
.runtime_suspend = mali_driver_runtime_suspend,
.runtime_resume = mali_driver_runtime_resume,
.runtime_idle = mali_driver_runtime_idle,
@@ -501,7 +503,8 @@ static int mali_driver_resume_scheduler(struct device *dev)
return 0;
}
-#ifdef CONFIG_PM
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+ || defined(CONFIG_PM)
static int mali_driver_runtime_suspend(struct device *dev)
{
mali_pm_runtime_suspend();
diff --git a/drivers/gpu/arm/mali400/r4p0_rel0/linux/mali_osk_pm.c b/drivers/gpu/arm/mali400/r4p0_rel0/linux/mali_osk_pm.c
index ae98fa5a469e..339fcbf5518e 100644
--- a/drivers/gpu/arm/mali400/r4p0_rel0/linux/mali_osk_pm.c
+++ b/drivers/gpu/arm/mali400/r4p0_rel0/linux/mali_osk_pm.c
@@ -15,9 +15,11 @@
#include <linux/sched.h>
-#ifdef CONFIG_PM
+#include <linux/version.h>
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+ || defined(CONFIG_PM)
#include <linux/pm_runtime.h>
-#endif /* CONFIG_PM */
+#endif
#include <linux/platform_device.h>
#include <linux/version.h>
#include "mali_osk.h"
@@ -39,7 +41,8 @@ void _mali_osk_pm_dev_disable(void)
/* Can NOT run in atomic context */
_mali_osk_errcode_t _mali_osk_pm_dev_ref_add(void)
{
-#ifdef CONFIG_PM
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+ || defined(CONFIG_PM)
int err;
MALI_DEBUG_ASSERT_POINTER(mali_platform_device);
err = pm_runtime_get_sync(&(mali_platform_device->dev));
@@ -59,7 +62,8 @@ _mali_osk_errcode_t _mali_osk_pm_dev_ref_add(void)
/* Can run in atomic context */
void _mali_osk_pm_dev_ref_dec(void)
{
-#ifdef CONFIG_PM
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+ || defined(CONFIG_PM)
MALI_DEBUG_ASSERT_POINTER(mali_platform_device);
_mali_osk_atomic_dec(&mali_pm_ref_count);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
@@ -75,7 +79,8 @@ void _mali_osk_pm_dev_ref_dec(void)
/* Can run in atomic context */
mali_bool _mali_osk_pm_dev_ref_add_no_power_on(void)
{
-#ifdef CONFIG_PM
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+ || defined(CONFIG_PM)
u32 ref;
MALI_DEBUG_ASSERT_POINTER(mali_platform_device);
pm_runtime_get_noresume(&(mali_platform_device->dev));
@@ -90,7 +95,8 @@ mali_bool _mali_osk_pm_dev_ref_add_no_power_on(void)
/* Can run in atomic context */
void _mali_osk_pm_dev_ref_dec_no_power_on(void)
{
-#ifdef CONFIG_PM
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+ || defined(CONFIG_PM)
MALI_DEBUG_ASSERT_POINTER(mali_platform_device);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
pm_runtime_put_autosuspend(&(mali_platform_device->dev));
@@ -103,7 +109,8 @@ void _mali_osk_pm_dev_ref_dec_no_power_on(void)
void _mali_osk_pm_dev_barrier(void)
{
-#ifdef CONFIG_PM
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+ || defined(CONFIG_PM)
pm_runtime_barrier(&(mali_platform_device->dev));
#endif
}