gcmkFOOTER_NO();
return gcvSTATUS_OK;
}
+ else if(gcvPOWER_IDLE==State) // dkm add 110330
+ {
+ /* Bail out on idle broadcast with other process is setting power. */
+ gcmkFOOTER_NO();
+ return gcvSTATUS_OK;
+ }
else
{
/* Acquire the power mutex. */
if ((flag == 0) || (Hardware->settingPowerState))
{
/* Release the power mutex. */
+ Hardware->powerProcess = 0;
+ Hardware->powerThread = 0;
gcmkONERROR(gckOS_ReleaseMutex(os, Hardware->powerMutex));
/* No need to do anything. */
)
{
/* Release the power mutex. */
+ Hardware->powerProcess = 0;
+ Hardware->powerThread = 0;
gcmkONERROR(gckOS_ReleaseMutex(os, Hardware->powerMutex));
/* No broadcast while GPU is forced power off. */
Hardware->settingPowerState = gcvFALSE;
/* Release the power mutex. */
+ Hardware->powerProcess = 0;
+ Hardware->powerThread = 0;
gcmkONERROR(gckOS_ReleaseMutex(os, Hardware->powerMutex));
/* Success. */
{
Hardware->settingPowerState = gcvFALSE;
+ Hardware->powerProcess = 0;
+ Hardware->powerThread = 0;
gcmkVERIFY_OK(gckOS_ReleaseMutex(Hardware->os, Hardware->powerMutex));
}
if (powerAcquired)
{
/* Release the power mutex. */
+ hardware->powerProcess = 0;
+ hardware->powerThread = 0;
gcmkONERROR(gckOS_ReleaseMutex(Command->os, hardware->powerMutex));
powerAcquired = gcvFALSE;
}
if (powerAcquired)
{
/* Release the power mutex. */
+ hardware->powerProcess = 0;
+ hardware->powerThread = 0;
gcmkONERROR(gckOS_ReleaseMutex(Command->os, hardware->powerMutex));
}
if (powerAcquired)
{
/* Release the power mutex. */
+ hardware->powerProcess = 0;
+ hardware->powerThread = 0;
gcmkONERROR(gckOS_ReleaseMutex(Command->os,
Command->kernel->hardware->powerMutex));
powerAcquired = gcvFALSE;
if (powerAcquired)
{
/* Release the power mutex. */
+ hardware->powerProcess = 0;
+ hardware->powerThread = 0;
gcmkONERROR(gckOS_ReleaseMutex(Command->os,
Command->kernel->hardware->powerMutex));
}
gcmkTRACE_ZONE(gcvLEVEL_VERBOSE, gcvZONE_DRIVER,
"[galcore] Entering drv_exit\n");
-#if 1
+#if 0
misc_deregister(&miscdev);
#else
static void gpu_early_suspend(struct early_suspend *h)
{
gceSTATUS status;
-
- //printk("Enter %s \n", __func__);
-
- msleep(50); //Wait for gpu finish
status = gckHARDWARE_SetPowerManagementState(galDevice->kernel->hardware, gcvPOWER_OFF);
printk("%s fail!\n", __func__);
return;
}
-
- //printk("Exit %s \n", __func__);
}
static void gpu_early_resume(struct early_suspend *h)
{
gceSTATUS status;
- //printk("Enter %s \n", __func__);
-
status = gckHARDWARE_SetPowerManagementState(galDevice->kernel->hardware, gcvPOWER_IDLE);
- msleep(50);
-
if (gcmIS_ERROR(status))
{
printk("%s fail!\n", __func__);
return;
}
-
- //printk("Exit %s \n", __func__);
}
struct early_suspend gpu_early_suspend_info = {
{
gceSTATUS status;
gckGALDEVICE device;
-
- //printk("Enter %s \n", __func__);
device = platform_get_drvdata(dev);
- msleep(50); //Wait for gpu finish
-
status = gckHARDWARE_SetPowerManagementState(device->kernel->hardware, gcvPOWER_OFF);
if (gcmIS_ERROR(status))
return -1;
}
- //printk("Exit %s \n", __func__);
-
return 0;
}
{
gceSTATUS status;
gckGALDEVICE device;
-
- //printk("Enter %s \n", __func__);
device = platform_get_drvdata(dev);
status = gckHARDWARE_SetPowerManagementState(device->kernel->hardware, gcvPOWER_IDLE);
- msleep(50);
-
if (gcmIS_ERROR(status))
{
printk("%s fail!\n", __func__);
return -1;
}
-
- //printk("Exit %s \n", __func__);
return 0;
}
static void __devinit gpu_shutdown(struct platform_device *dev)
{
- printk("Enter %s \n", __func__);
drv_exit();
- printk("Exit %s \n", __func__);
}
#else
size = mdl->numPages * PAGE_SIZE;
order = get_order(size);
- page = alloc_pages(GFP_KERNEL | GFP_DMA, order);
+ //page = alloc_pages(GFP_KERNEL | GFP_DMA, order);
+ page = alloc_pages(GFP_KERNEL , order); // dkm modify 110330 ½«GFP_DMAÈ¥µô,±ÜÃâ·ÖÅä²»µ½DMAÄÚ´æ
if (page == gcvNULL)
{