Skip to content

Commit

Permalink
drm/msm/gpu: Check the status of registration to PM QoS
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lukasz Luba authored and Rob Clark committed Oct 27, 2024
1 parent 394679f commit 8f32ddd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/gpu/drm/msm/msm_gpu_devfreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ void msm_devfreq_init(struct msm_gpu *gpu)
{
struct msm_gpu_devfreq *df = &gpu->devfreq;
struct msm_drm_private *priv = gpu->dev->dev_private;
int ret;

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

mutex_init(&df->lock);

dev_pm_qos_add_request(&gpu->pdev->dev, &df->boost_freq,
DEV_PM_QOS_MIN_FREQUENCY, 0);
ret = dev_pm_qos_add_request(&gpu->pdev->dev, &df->boost_freq,
DEV_PM_QOS_MIN_FREQUENCY, 0);
if (ret < 0) {
DRM_DEV_ERROR(&gpu->pdev->dev, "Couldn't initialize QoS\n");
return;
}

msm_devfreq_profile.initial_freq = gpu->fast_rate;

Expand Down

0 comments on commit 8f32ddd

Please sign in to comment.