From 54543b877da4e41843fce80fe11fc366699d86eb Mon Sep 17 00:00:00 2001 From: chenzhen Date: Thu, 30 Jun 2016 20:01:01 +0800 Subject: [PATCH] MALI: midgard: rockchip: add .shutdown of GPU platform_driver Change-Id: I5af2a464db88b08530b063d90b3a7ce61e26f201 Signed-off-by: chenzhen --- drivers/gpu/arm/midgard/mali_kbase_core_linux.c | 9 +++++++++ .../gpu/arm/midgard/platform/rk/mali_kbase_config_rk.c | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c index 5b56e8b0693a..e27481a07a0f 100644 --- a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c +++ b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c @@ -3813,6 +3813,14 @@ static int kbase_platform_device_remove(struct platform_device *pdev) return 0; } +extern void kbase_platform_rk_shutdown(struct kbase_device *kbdev); +static void kbase_platform_device_shutdown(struct platform_device *pdev) +{ + struct kbase_device *kbdev = to_kbase_device(&pdev->dev); + + kbase_platform_rk_shutdown(kbdev); +} + static int kbase_platform_device_probe(struct platform_device *pdev) { struct kbase_device *kbdev; @@ -4214,6 +4222,7 @@ MODULE_DEVICE_TABLE(of, kbase_dt_ids); static struct platform_driver kbase_platform_driver = { .probe = kbase_platform_device_probe, .remove = kbase_platform_device_remove, + .shutdown = kbase_platform_device_shutdown, .driver = { .name = kbase_drv_name, .owner = THIS_MODULE, diff --git a/drivers/gpu/arm/midgard/platform/rk/mali_kbase_config_rk.c b/drivers/gpu/arm/midgard/platform/rk/mali_kbase_config_rk.c index df15a9a6901b..62d477dd961e 100644 --- a/drivers/gpu/arm/midgard/platform/rk/mali_kbase_config_rk.c +++ b/drivers/gpu/arm/midgard/platform/rk/mali_kbase_config_rk.c @@ -227,6 +227,14 @@ int kbase_platform_early_init(void) /*---------------------------------------------------------------------------*/ +void kbase_platform_rk_shutdown(struct kbase_device *kbdev) +{ + I("to make vdd_gpu enabled for turning off pd_gpu in pm_framework."); + rk_pm_enable_regulator(kbdev); +} + +/*---------------------------------------------------------------------------*/ + static int rk_pm_enable_regulator(struct kbase_device *kbdev) { int ret = 0; -- 2.34.1