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

Commit c7fdd108 authored by Harshdeep Dhatt's avatar Harshdeep Dhatt
Browse files

msm: kgsl: Enable preemption for hwscheduling enabled devices



Send the HFI feature control packet to the GMU in order to enable
preemption.

Change-Id: Ic00e3943bceb29feb28740dbadd3fb7c6fdc562b
Signed-off-by: default avatarHarshdeep Dhatt <hdhatt@codeaurora.org>
parent a9205665
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -987,18 +987,23 @@ static int a6xx_hwsched_bind(struct device *dev, struct device *master,
	void *data)
{
	struct kgsl_device *device = dev_get_drvdata(master);
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
	int ret;

	ret = a6xx_gmu_probe(device, to_platform_device(dev));
	if (ret)
		goto error;

	ret = a6xx_hwsched_hfi_probe(ADRENO_DEVICE(device));
	ret = a6xx_hwsched_hfi_probe(adreno_dev);
	if (ret)
		goto error;

	if (!ret) {
	set_bit(GMU_DISPATCH, &device->gmu_core.flags);

	if (ADRENO_FEATURE(adreno_dev, ADRENO_PREEMPTION))
		set_bit(ADRENO_DEVICE_PREEMPTION, &adreno_dev->priv);

	return 0;
	}

error:
	a6xx_gmu_remove(device);
+8 −1
Original line number Diff line number Diff line
@@ -769,7 +769,14 @@ int a6xx_hwsched_hfi_start(struct adreno_device *adreno_dev)

	ret = a6xx_hfi_send_feature_ctrl(adreno_dev, HFI_FEATURE_KPROF, 1, 0);
	if (ret)
		return ret;
		goto err;

	if (adreno_is_preemption_enabled(adreno_dev)) {
		ret = a6xx_hfi_send_feature_ctrl(adreno_dev,
			HFI_FEATURE_PREEMPTION, 1, 0);
		if (ret)
			goto err;
	}

	ret = a6xx_hfi_send_core_fw_start(adreno_dev);
	if (ret)