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

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

Merge "msm: kgsl: Don't enable GPU 64bit when kernel is in 32bit configuration"

parents ecb6a5ce 0dc6c371
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1079,7 +1079,7 @@ static int adreno_probe(struct platform_device *pdev)
	* that we cannot use 64 bit virtual addresses on a 32 bit kernel even
	* though the hardware and the rest of the KGSL driver supports it.
	*/
	if ((BITS_PER_LONG == 64) && ADRENO_FEATURE(adreno_dev, ADRENO_64BIT))
	if (adreno_support_64bit(adreno_dev))
		device->mmu.features |= KGSL_MMU_64BIT;

	status = kgsl_device_platform_probe(device);
@@ -1447,7 +1447,7 @@ static int _adreno_start(struct adreno_device *adreno_dev)

	/* Enable 64 bit gpu addr if feature is set */
	if (gpudev->enable_64bit &&
			ADRENO_FEATURE(adreno_dev, ADRENO_64BIT))
			adreno_support_64bit(adreno_dev))
		gpudev->enable_64bit(adreno_dev);

	if (adreno_dev->perfctr_pwr_lo == 0) {
@@ -2140,7 +2140,7 @@ static int adreno_soft_reset(struct kgsl_device *device)

	/* Enable 64 bit gpu addr if feature is set */
	if (gpudev->enable_64bit &&
			ADRENO_FEATURE(adreno_dev, ADRENO_64BIT))
			adreno_support_64bit(adreno_dev))
		gpudev->enable_64bit(adreno_dev);

	/* Restore physical performance counter values after soft reset */
+17 −0
Original line number Diff line number Diff line
@@ -1396,4 +1396,21 @@ static inline bool adreno_long_ib_detect(struct adreno_device *adreno_dev)
		!test_bit(ADRENO_DEVICE_ISDB_ENABLED, &adreno_dev->priv);
}

/*
 * adreno_support_64bit() - Check the feature flag only if it is in
 * 64bit kernel otherwise return false
 * adreno_dev: The adreno device
 */
#if BITS_PER_LONG == 64
static inline bool adreno_support_64bit(struct adreno_device *adreno_dev)
{
	return ADRENO_FEATURE(adreno_dev, ADRENO_64BIT);
}
#else
static inline bool adreno_support_64bit(struct adreno_device *adreno_dev)
{
	return false;
}
#endif /*BITS_PER_LONG*/

#endif /*__ADRENO_H */