diff options
author | Christian König <ckoenig.leichtzumerken@gmail.com> | 2023-08-29 13:01:14 +0200 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2023-09-01 08:53:05 +0200 |
commit | ec9c7073bb082412a49466059053ace537c1a30d (patch) | |
tree | 2a24e3269e0e16f52a562cd5fa180a36a59294ff /drivers/gpu/drm/drm_drv.c | |
parent | 0b30d57acafcaa5374756d314ee54f80d0bcc860 (diff) | |
download | linux-ec9c7073bb082412a49466059053ace537c1a30d.tar.gz linux-ec9c7073bb082412a49466059053ace537c1a30d.tar.bz2 linux-ec9c7073bb082412a49466059053ace537c1a30d.zip |
drm/debugfs: remove dev->debugfs_list and debugfs_mutex v2
The mutex was completely pointless in the first place since any
parallel adding of files to this list would result in random
behavior since the list is filled and consumed multiple times.
Completely drop that approach and just create the files directly but
return -ENODEV while opening the file when the minors are not
registered yet.
v2: rebase on debugfs directory rework, limit access before minors are
registered.
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230829110115.3442-5-christian.koenig@amd.com
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/drm_drv.c')
-rw-r--r-- | drivers/gpu/drm/drm_drv.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index d28f415cd733..45053f3371ca 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -597,7 +597,6 @@ static void drm_dev_init_release(struct drm_device *dev, void *res) mutex_destroy(&dev->clientlist_mutex); mutex_destroy(&dev->filelist_mutex); mutex_destroy(&dev->struct_mutex); - mutex_destroy(&dev->debugfs_mutex); drm_legacy_destroy_members(dev); } @@ -638,14 +637,12 @@ static int drm_dev_init(struct drm_device *dev, INIT_LIST_HEAD(&dev->filelist_internal); INIT_LIST_HEAD(&dev->clientlist); INIT_LIST_HEAD(&dev->vblank_event_list); - INIT_LIST_HEAD(&dev->debugfs_list); spin_lock_init(&dev->event_lock); mutex_init(&dev->struct_mutex); mutex_init(&dev->filelist_mutex); mutex_init(&dev->clientlist_mutex); mutex_init(&dev->master_mutex); - mutex_init(&dev->debugfs_mutex); ret = drmm_add_action_or_reset(dev, drm_dev_init_release, NULL); if (ret) |