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: Harshdeep Dhatt <hdhatt@codeaurora.org>
This commit is contained in:
Harshdeep Dhatt 2020-09-24 15:35:14 -06:00
commit c7fdd108da
2 changed files with 18 additions and 6 deletions

View file

@ -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);
return 0;
}
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);

View file

@ -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)