static int kgsl_g12_first_open_locked(struct kgsl_device *device) { int result = KGSL_SUCCESS; KGSL_DRV_INFO("kgsl_g12_first_open()\n"); kgsl_driver.power_flags |= KGSL_PWRFLAGS_G12_CLK_OFF | KGSL_PWRFLAGS_G12_POWER_OFF | KGSL_PWRFLAGS_G12_IRQ_OFF; kgsl_pwrctrl(KGSL_PWRFLAGS_G12_POWER_ON); kgsl_pwrctrl(KGSL_PWRFLAGS_G12_CLK_ON); result = kgsl_g12_init(device, &kgsl_driver.g12_config); if (result != 0) goto done; result = kgsl_g12_start(device, 0); if (result != 0) goto done; kgsl_pwrctrl(KGSL_PWRFLAGS_G12_IRQ_ON); done: return result; }
int kgsl_g12_first_open_locked(void) { int result = KGSL_SUCCESS; KGSL_DRV_INFO("kgsl_g12_first_open()\n"); if (kgsl_driver.g12_device.hwaccess_blocked == KGSL_FALSE) kgsl_pwrctrl(KGSL_PWRFLAGS_G12_CLK_ON); /* init g12 */ if (kgsl_driver.g12_device.hwaccess_blocked == KGSL_FALSE) { result = kgsl_g12_init(&kgsl_driver.g12_device, &kgsl_driver.g12_config); if (result != 0) goto done; result = kgsl_g12_start(&kgsl_driver.g12_device, 0); if (result != 0) goto done; kgsl_pwrctrl(KGSL_PWRFLAGS_G12_IRQ_ON); } done: return result; }
static int kgsl_g12_last_release_locked(struct kgsl_device *device) { KGSL_DRV_INFO("kgsl_g12_last_release_locked()\n"); kgsl_g12_stop(device); kgsl_pwrctrl(KGSL_PWRFLAGS_G12_IRQ_OFF); kgsl_g12_close(device); kgsl_pwrctrl(KGSL_PWRFLAGS_G12_CLK_OFF); kgsl_pwrctrl(KGSL_PWRFLAGS_G12_POWER_OFF); return KGSL_SUCCESS; }
int kgsl_g12_last_release_locked(void) { KGSL_DRV_INFO("kgsl_g12_last_release_locked()\n"); if (kgsl_driver.g12_device.flags & KGSL_FLAGS_STARTED) { kgsl_g12_stop(&kgsl_driver.g12_device); kgsl_pwrctrl(KGSL_PWRFLAGS_G12_IRQ_OFF); kgsl_g12_close(&kgsl_driver.g12_device); kgsl_pwrctrl(KGSL_PWRFLAGS_G12_CLK_OFF); kgsl_driver.g12_device.hwaccess_blocked = KGSL_FALSE; } return KGSL_SUCCESS; }
int kgsl_g12_last_release_locked(void) { KGSL_DRV_INFO("kgsl_g12_last_release_locked()\n"); if (kgsl_driver.g12_device.hwaccess_blocked == KGSL_FALSE) kgsl_pwrctrl(KGSL_PWRFLAGS_G12_IRQ_OFF); /* close g12 */ if (kgsl_driver.g12_device.hwaccess_blocked == KGSL_FALSE) { kgsl_g12_close(&kgsl_driver.g12_device); kgsl_pwrctrl(KGSL_PWRFLAGS_G12_CLK_OFF); } return KGSL_SUCCESS; }