mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 05:17:10 +09:00
update early suspend
This commit is contained in:
@@ -726,8 +726,11 @@ static void drv_exit(void)
|
||||
unregister_chrdev(major, DRV_NAME);
|
||||
#endif
|
||||
|
||||
mdelay(50);
|
||||
gckGALDEVICE_Stop(galDevice);
|
||||
mdelay(50);
|
||||
gckGALDEVICE_Destroy(galDevice);
|
||||
mdelay(50);
|
||||
|
||||
#if ENABLE_GPU_CLOCK_BY_DRIVER && LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
|
||||
printk("gpu: %s clk_disable... ", __func__);
|
||||
@@ -765,6 +768,8 @@ static void gpu_early_suspend(struct early_suspend *h)
|
||||
|
||||
printk("Enter %s \n", __func__);
|
||||
|
||||
mdelay(50); //Wait for gpu finish
|
||||
|
||||
status = gckHARDWARE_SetPowerManagementState(galDevice->kernel->hardware, gcvPOWER_SUSPEND);
|
||||
|
||||
if (gcmIS_ERROR(status))
|
||||
@@ -784,6 +789,8 @@ static void gpu_early_resume(struct early_suspend *h)
|
||||
|
||||
status = gckHARDWARE_SetPowerManagementState(galDevice->kernel->hardware, gcvPOWER_IDLE);
|
||||
|
||||
mdelay(50);
|
||||
|
||||
if (gcmIS_ERROR(status))
|
||||
{
|
||||
printk("%s fail!\n", __func__);
|
||||
@@ -865,6 +872,8 @@ static int __devinit gpu_suspend(struct platform_device *dev, pm_message_t state
|
||||
|
||||
device = platform_get_drvdata(dev);
|
||||
|
||||
mdelay(50); //Wait for gpu finish
|
||||
|
||||
status = gckHARDWARE_SetPowerManagementState(device->kernel->hardware, gcvPOWER_SUSPEND);
|
||||
|
||||
if (gcmIS_ERROR(status))
|
||||
@@ -889,6 +898,8 @@ static int __devinit gpu_resume(struct platform_device *dev)
|
||||
|
||||
status = gckHARDWARE_SetPowerManagementState(device->kernel->hardware, gcvPOWER_IDLE);
|
||||
|
||||
mdelay(50);
|
||||
|
||||
if (gcmIS_ERROR(status))
|
||||
{
|
||||
printk("%s fail!\n", __func__);
|
||||
|
||||
@@ -5938,21 +5938,23 @@ gckOS_SetGPUPower(
|
||||
|
||||
if(lastclock!=Clock)
|
||||
{
|
||||
mdelay(10);
|
||||
if(Clock) {
|
||||
printk("gpu: clk_enable... ");
|
||||
clk_enable(clk_hclk_gpu);
|
||||
clk_enable(clk_gpu);
|
||||
clk_enable(clk_aclk_gpu);
|
||||
clk_enable(clk_aclk_ddr_gpu);
|
||||
clk_enable(clk_gpu);
|
||||
clk_enable(clk_hclk_gpu);
|
||||
printk("done!\n");
|
||||
} else {
|
||||
printk("gpu: clk_disable... ");
|
||||
clk_disable(clk_gpu);
|
||||
clk_disable(clk_aclk_gpu);
|
||||
clk_disable(clk_aclk_ddr_gpu);
|
||||
clk_disable(clk_hclk_gpu);
|
||||
clk_disable(clk_aclk_ddr_gpu);
|
||||
clk_disable(clk_aclk_gpu);
|
||||
clk_disable(clk_gpu);
|
||||
printk("done!\n");
|
||||
}
|
||||
mdelay(10);
|
||||
}
|
||||
lastclock = Clock;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user