MALI: mali400: force gpu enter runtime suspend before system suspend

Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I17c3c883774de97f2e09c56184ed98baf1ce5a07
This commit is contained in:
Liang Chen
2023-04-04 20:27:12 +08:00
committed by Tao Huang
parent f08095c70c
commit 5302628c0d

View File

@@ -31,6 +31,7 @@
#include <linux/clk.h>
#include <linux/regulator/consumer.h>
#include <linux/mali/mali_utgard.h>
#include <linux/pm_runtime.h>
#include <soc/rockchip/rockchip_opp_select.h>
#include "mali_kernel_common.h"
@@ -745,6 +746,7 @@ static int mali_driver_suspend_scheduler(struct device *dev)
return -ENODEV;
#endif
pm_runtime_force_suspend(dev);
#if defined(CONFIG_MALI_DEVFREQ) && \
(LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
devfreq_suspend_device(mdev->devfreq);
@@ -789,6 +791,7 @@ static int mali_driver_resume_scheduler(struct device *dev)
(LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
devfreq_resume_device(mdev->devfreq);
#endif
pm_runtime_force_resume(dev);
return 0;
}