예제 #1
0
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;

}
예제 #2
0
파일: kgsl_g12.c 프로젝트: Sikyou/s7_kernel
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;

}
예제 #3
0
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;
}
예제 #4
0
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;
}
예제 #5
0
파일: kgsl_g12.c 프로젝트: Sikyou/s7_kernel
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;
}