MALI: midgard: rockchip: add .shutdown of GPU platform_driver
authorchenzhen <chenzhen@rock-chips.com>
Thu, 30 Jun 2016 12:01:01 +0000 (20:01 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 4 Jul 2016 07:23:01 +0000 (15:23 +0800)
Change-Id: I5af2a464db88b08530b063d90b3a7ce61e26f201
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
drivers/gpu/arm/midgard/mali_kbase_core_linux.c
drivers/gpu/arm/midgard/platform/rk/mali_kbase_config_rk.c

index 5b56e8b0693acba914165ccdc5a884c6cdfa3dd4..e27481a07a0f13039623e99952eecae76966521b 100644 (file)
@@ -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,
index df15a9a6901b13106a7f5c20c030bb74e497835b..62d477dd961e153ba469713b3b5ea4ccaaac0ac5 100644 (file)
@@ -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;