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

Commit e9bdf0f8 authored by Mohammed Mirza Mandayappurath Manzoor's avatar Mohammed Mirza Mandayappurath Manzoor
Browse files

msm: kgsl: Enable Battery Current Limiting feature for A660



Battery Current Limiting (BCL) prevents voltage droops and peak currents
on battery packs preventing under voltage lockout and over current. Send
the feature enable hfi only after the first boot so that the feature
configuration in trustzone goes through.

Change-Id: I113f1b6e505fd67f8b0c6bab7279731efcc6054a
Signed-off-by: default avatarMohammed Mirza Mandayappurath Manzoor <mmandaya@codeaurora.org>
parent 76a04e42
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1585,7 +1585,8 @@ static const struct adreno_a6xx_core adreno_gpu_core_a660v2 = {
		DEFINE_ADRENO_REV(ADRENO_REV_A660, 6, 6, 0, ANY_ID),
		.features = ADRENO_RPMH | ADRENO_GPMU | ADRENO_APRIV |
				ADRENO_IOCOHERENT | ADRENO_CONTENT_PROTECTION |
				ADRENO_IFPC | ADRENO_PREEMPTION | ADRENO_ACD,
				ADRENO_IFPC | ADRENO_PREEMPTION | ADRENO_ACD |
				ADRENO_BCL,
		.gpudev = &adreno_a6xx_gmu_gpudev,
		.gmem_base = 0,
		.gmem_size = SZ_1M + SZ_512K,
+3 −3
Original line number Diff line number Diff line
@@ -2244,6 +2244,9 @@ 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;
@@ -2679,9 +2682,6 @@ int a6xx_gmu_probe(struct kgsl_device *device,
	else
		gmu->idle_level = GPU_HW_ACTIVE;

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

	a6xx_gmu_acd_probe(device, gmu, pdev->dev.of_node);

	set_bit(GMU_ENABLED, &device->gmu_core.flags);