Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/msm/gpu: Check the status of registration to PM QoS

There is a need to check the returned value of the registration function.
In case of returned error, print that and stop the init process.

Fixes: 7c0ffcd40b16 ("drm/msm/gpu: Respect PM QoS constraints")
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Patchwork: https://patchwork.freedesktop.org/patch/620336/
Signed-off-by: Rob Clark <robdclark@chromium.org>

authored by

Lukasz Luba and committed by
Rob Clark
8f32ddd8 394679f3

+7 -2
+7 -2
drivers/gpu/drm/msm/msm_gpu_devfreq.c
··· 140 140 { 141 141 struct msm_gpu_devfreq *df = &gpu->devfreq; 142 142 struct msm_drm_private *priv = gpu->dev->dev_private; 143 + int ret; 143 144 144 145 /* We need target support to do devfreq */ 145 146 if (!gpu->funcs->gpu_busy) ··· 157 156 158 157 mutex_init(&df->lock); 159 158 160 - dev_pm_qos_add_request(&gpu->pdev->dev, &df->boost_freq, 161 - DEV_PM_QOS_MIN_FREQUENCY, 0); 159 + ret = dev_pm_qos_add_request(&gpu->pdev->dev, &df->boost_freq, 160 + DEV_PM_QOS_MIN_FREQUENCY, 0); 161 + if (ret < 0) { 162 + DRM_DEV_ERROR(&gpu->pdev->dev, "Couldn't initialize QoS\n"); 163 + return; 164 + } 162 165 163 166 msm_devfreq_profile.initial_freq = gpu->fast_rate; 164 167