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

Commit fdd4d7e3 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge changes I84c3cf61,I0afd2033 into msm-4.14

* changes:
  msm: kgsl: Remove SPTP headswitch controls for new targets
  msm: kgsl: Use proper permissions for read-only files
parents 9c2f13e3 bfa7e0ba
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1877,6 +1877,14 @@ static inline void adreno_perfcntr_active_oob_put(
	kgsl_active_count_put(KGSL_DEVICE(adreno_dev));
}

static inline bool adreno_has_sptprac_gdsc(struct adreno_device *adreno_dev)
{
	if (adreno_is_a615(adreno_dev) || adreno_is_a630(adreno_dev))
		return true;
	else
		return false;
}

static inline bool adreno_has_gbif(struct adreno_device *adreno_dev)
{
	if (adreno_is_a615(adreno_dev) || adreno_is_a640(adreno_dev))
+4 −2
Original line number Diff line number Diff line
@@ -1656,6 +1656,8 @@ static int a6xx_sptprac_enable(struct adreno_device *adreno_dev)

	if (!gmu->pdev)
		return -EINVAL;
	if (!adreno_has_sptprac_gdsc(adreno_dev))
		return 0;

	kgsl_gmu_regwrite(device, A6XX_GMU_GX_SPTPRAC_POWER_CONTROL,
			SPTPRAC_POWERON_CTRL_MASK);
@@ -1681,7 +1683,7 @@ static void a6xx_sptprac_disable(struct adreno_device *adreno_dev)
	struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
	struct gmu_device *gmu = &device->gmu;

	if (!gmu->pdev)
	if (!gmu->pdev || !adreno_has_sptprac_gdsc(adreno_dev))
		return;

	/* Ensure that retention is on */
@@ -1733,7 +1735,7 @@ static bool a6xx_sptprac_is_on(struct adreno_device *adreno_dev)
	struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
	unsigned int val;

	if (!kgsl_gmu_isenabled(device))
	if (!kgsl_gmu_isenabled(device) || !adreno_has_sptprac_gdsc(adreno_dev))
		return true;

	kgsl_gmu_regread(device, A6XX_GMU_SPTPRAC_PWR_CLK_STATUS, &val);