drm/panfrost: Fix incorrect updating of current device frequency
authorAdrián Larumbe <adrian.larumbe@collabora.com>
Sat, 25 Nov 2023 20:52:03 +0000 (20:52 +0000)
committerSteven Price <steven.price@arm.com>
Thu, 30 Nov 2023 10:53:42 +0000 (10:53 +0000)
commit64111a0e22a9d4e0de7a5d04e7d5c21d0af4b900
tree0be157fea5b84c929867e64d9564dbc7404d0a4e
parent7701ce26c747322de1f1a87f8e32792582f33249
drm/panfrost: Fix incorrect updating of current device frequency

It was noticed when setting the Panfrost's DVFS device to the performant
governor, GPU frequency as reported by fdinfo had dropped to 0 permamently.

There are two separate issues causing this behaviour:
 - Not initialising the device's current_frequency variable to its original
 value during device probe().
 - Updating said variable in Panfrost devfreq's get_dev_status() rather
 than after the new OPP's frequency had been retrieved in target(), which
 meant the old frequency would be assigned instead.

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>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231125205438.375407-3-adrian.larumbe@collabora.com
drivers/gpu/drm/panfrost/panfrost_devfreq.c