From: chenzhen Date: Thu, 30 Jun 2016 12:01:01 +0000 (+0800) Subject: MALI: midgard: rockchip: add .shutdown of GPU platform_driver X-Git-Tag: firefly_0821_release~2247 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=54543b877da4e41843fce80fe11fc366699d86eb;p=firefly-linux-kernel-4.4.55.git MALI: midgard: rockchip: add .shutdown of GPU platform_driver Change-Id: I5af2a464db88b08530b063d90b3a7ce61e26f201 Signed-off-by: chenzhen --- 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;