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

Commit fa55a014 authored by Lokesh Batra's avatar Lokesh Batra
Browse files

Revert "msm: kgsl: Do not set up the zap shader"



Zap shader needs to be enabled to bring GPU out of secured mode
when access-control is enabled in TZ.
This reverts commit 73acf0b6.

Change-Id: I0f3f7ec6b0541aeeead4f08ab83716c193bcfbf1
Signed-off-by: default avatarLokesh Batra <lbatra@codeaurora.org>
parent 6f545b76
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -927,6 +927,7 @@ static int a6xx_microcode_load(struct adreno_device *adreno_dev)
	struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
	struct adreno_firmware *fw = ADRENO_FW(adreno_dev, ADRENO_FW_SQE);
	uint64_t gpuaddr;
	void *zap;
	int ret = 0;

	gpuaddr = fw->memdesc.gpuaddr;
@@ -934,6 +935,19 @@ static int a6xx_microcode_load(struct adreno_device *adreno_dev)
				lower_32_bits(gpuaddr));
	kgsl_regwrite(device, A6XX_CP_SQE_INSTR_BASE_HI,
				upper_32_bits(gpuaddr));

	/* Load the zap shader firmware through PIL if its available */
	if (adreno_dev->gpucore->zap_name && !adreno_dev->zap_loaded) {
		zap = subsystem_get(adreno_dev->gpucore->zap_name);

		/* Return error if the zap shader cannot be loaded */
		if (IS_ERR_OR_NULL(zap)) {
			ret = (zap == NULL) ? -ENODEV : PTR_ERR(zap);
			zap = NULL;
		} else
			adreno_dev->zap_loaded = 1;
	}

	return ret;
}