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/panfrost: Add missing OPP table refcnt decremental

Commit f11b0417eec2 ("drm/panfrost: Add fdinfo support GPU load metrics")
retrieves the OPP for the maximum device clock frequency, but forgets to
keep the reference count balanced by putting the returned OPP object. This
eventually leads to an OPP core warning when removing the device.

Fix it by putting OPP objects as many times as they're retrieved.

Also remove an unnecessary whitespace.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Fixes: f11b0417eec2 ("drm/panfrost: Add fdinfo support GPU load metrics")
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241105205458.1318989-1-adrian.larumbe@collabora.com

authored by

Adrián Larumbe and committed by
Steven Price
043e8afe aadcf584

+2 -1
+2 -1
drivers/gpu/drm/panfrost/panfrost_devfreq.c
··· 38 38 return PTR_ERR(opp); 39 39 dev_pm_opp_put(opp); 40 40 41 - err = dev_pm_opp_set_rate(dev, *freq); 41 + err = dev_pm_opp_set_rate(dev, *freq); 42 42 if (!err) 43 43 ptdev->pfdevfreq.current_frequency = *freq; 44 44 ··· 182 182 * if any and will avoid a switch off by regulator_late_cleanup() 183 183 */ 184 184 ret = dev_pm_opp_set_opp(dev, opp); 185 + dev_pm_opp_put(opp); 185 186 if (ret) { 186 187 DRM_DEV_ERROR(dev, "Couldn't set recommended OPP\n"); 187 188 return ret;