diff options
| author | Paolo Abeni <[email protected]> | 2024-10-21 07:14:18 +0000 |
|---|---|---|
| committer | Paolo Abeni <[email protected]> | 2024-10-21 07:14:18 +0000 |
| commit | 91afa49a3eda8ebf902ce68f02cb16b48c879b6a (patch) | |
| tree | 3ceca7290ee7358c8e647b27f992604ce9c7ec20 /drivers/gpu/drm/v3d/v3d_perfmon.c | |
| parent | net: ftgmac100: correct the phy interface of NC-SI mode (diff) | |
| parent | Merge tag 'net-6.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/net... (diff) | |
| download | kernel-91afa49a3eda8ebf902ce68f02cb16b48c879b6a.tar.gz kernel-91afa49a3eda8ebf902ce68f02cb16b48c879b6a.zip | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR (net-6.12-rc4).
Conflicts:
107a034d5c1e ("net/mlx5: qos: Store rate groups in a qos domain")
1da9cfd6c41c ("net/mlx5: Unregister notifier on eswitch init failure")
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/v3d/v3d_perfmon.c')
| -rw-r--r-- | drivers/gpu/drm/v3d/v3d_perfmon.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/v3d/v3d_perfmon.c b/drivers/gpu/drm/v3d/v3d_perfmon.c index cd7f1eedf17f..00cd081d7873 100644 --- a/drivers/gpu/drm/v3d/v3d_perfmon.c +++ b/drivers/gpu/drm/v3d/v3d_perfmon.c @@ -306,6 +306,11 @@ void v3d_perfmon_open_file(struct v3d_file_priv *v3d_priv) static int v3d_perfmon_idr_del(int id, void *elem, void *data) { struct v3d_perfmon *perfmon = elem; + struct v3d_dev *v3d = (struct v3d_dev *)data; + + /* If the active perfmon is being destroyed, stop it first */ + if (perfmon == v3d->active_perfmon) + v3d_perfmon_stop(v3d, perfmon, false); v3d_perfmon_put(perfmon); @@ -314,8 +319,10 @@ static int v3d_perfmon_idr_del(int id, void *elem, void *data) void v3d_perfmon_close_file(struct v3d_file_priv *v3d_priv) { + struct v3d_dev *v3d = v3d_priv->v3d; + mutex_lock(&v3d_priv->perfmon.lock); - idr_for_each(&v3d_priv->perfmon.idr, v3d_perfmon_idr_del, NULL); + idr_for_each(&v3d_priv->perfmon.idr, v3d_perfmon_idr_del, v3d); idr_destroy(&v3d_priv->perfmon.idr); mutex_unlock(&v3d_priv->perfmon.lock); mutex_destroy(&v3d_priv->perfmon.lock); |
