Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50e706ca authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Enable BCL only after first boot is done"

parents 582043ac cb016394
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -2231,9 +2231,6 @@ static int a6xx_gmu_first_boot(struct adreno_device *adreno_dev)

	device->gmu_fault = false;

	if (ADRENO_FEATURE(adreno_dev, ADRENO_BCL))
		adreno_dev->bcl_enabled = true;

	trace_kgsl_pwr_set_state(device, KGSL_STATE_AWARE);

	return 0;
@@ -3022,6 +3019,17 @@ static int a6xx_first_boot(struct adreno_device *adreno_dev)
	set_bit(GMU_PRIV_FIRST_BOOT_DONE, &gmu->flags);
	set_bit(GMU_PRIV_GPU_STARTED, &gmu->flags);

	/*
	 * BCL needs respective Central Broadcast register to
	 * be programed from TZ. This programing happens only
	 * when zap shader firmware load is successful. Zap firmware
	 * load can fail in boot up path hence enable BCL only after we
	 * successfully complete first boot to ensure that Central
	 * Broadcast register was programed before enabling BCL.
	 */
	if (ADRENO_FEATURE(adreno_dev, ADRENO_BCL))
		adreno_dev->bcl_enabled = true;

	device->pwrctrl.last_stat_updated = ktime_get();
	device->state = KGSL_STATE_ACTIVE;