Skip to content

Commit 8f32ddd

Browse files
lukaszluba-armrobclark
authored andcommitted
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: 7c0ffcd ("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>
1 parent 394679f commit 8f32ddd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/gpu/drm/msm/msm_gpu_devfreq.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ void msm_devfreq_init(struct msm_gpu *gpu)
140140
{
141141
struct msm_gpu_devfreq *df = &gpu->devfreq;
142142
struct msm_drm_private *priv = gpu->dev->dev_private;
143+
int ret;
143144

144145
/* We need target support to do devfreq */
145146
if (!gpu->funcs->gpu_busy)
@@ -156,8 +157,12 @@ void msm_devfreq_init(struct msm_gpu *gpu)
156157

157158
mutex_init(&df->lock);
158159

159-
dev_pm_qos_add_request(&gpu->pdev->dev, &df->boost_freq,
160-
DEV_PM_QOS_MIN_FREQUENCY, 0);
160+
ret = dev_pm_qos_add_request(&gpu->pdev->dev, &df->boost_freq,
161+
DEV_PM_QOS_MIN_FREQUENCY, 0);
162+
if (ret < 0) {
163+
DRM_DEV_ERROR(&gpu->pdev->dev, "Couldn't initialize QoS\n");
164+
return;
165+
}
161166

162167
msm_devfreq_profile.initial_freq = gpu->fast_rate;
163168

0 commit comments

Comments
 (0)