Exemple #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;

}
Exemple #2
0
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;

}