]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/v3d: Stop active perfmon if it is being destroyed
authorChristian Gmeiner <cgmeiner@igalia.com>
Mon, 18 Nov 2024 22:19:47 +0000 (23:19 +0100)
committerMaíra Canal <mcanal@igalia.com>
Fri, 22 Nov 2024 11:33:58 +0000 (08:33 -0300)
commit21f1435b1e6b012a07c42f36b206d2b66fc8f13b
tree05ea9fe24aedfe46b698501c7da9d3ed25b2824c
parent12e755103f2404fa87bd1d7af93100ec45b43feb
drm/v3d: Stop active perfmon if it is being destroyed

If the active performance monitor (`v3d->active_perfmon`) is being
destroyed, stop it first. Currently, the active perfmon is not
stopped during destruction, leaving the `v3d->active_perfmon` pointer
stale. This can lead to undefined behavior and instability.

This patch ensures that the active perfmon is stopped before being
destroyed, aligning with the behavior introduced in commit
7d1fd3638ee3 ("drm/v3d: Stop the active perfmon before being destroyed").

Cc: stable@vger.kernel.org # v5.15+
Fixes: 26a4dc29b74a ("drm/v3d: Expose performance counters to userspace")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241118221948.1758130-1-christian.gmeiner@gmail.com
drivers/gpu/drm/v3d/v3d_perfmon.c