drm/debugfs: remove dev->debugfs_list and debugfs_mutex v2
authorChristian König <ckoenig.leichtzumerken@gmail.com>
Tue, 29 Aug 2023 11:01:14 +0000 (13:01 +0200)
committerChristian König <christian.koenig@amd.com>
Fri, 1 Sep 2023 06:53:05 +0000 (08:53 +0200)
commitec9c7073bb082412a49466059053ace537c1a30d
tree2a24e3269e0e16f52a562cd5fa180a36a59294ff
parent0b30d57acafcaa5374756d314ee54f80d0bcc860
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>
drivers/gpu/drm/drm_debugfs.c
drivers/gpu/drm/drm_drv.c
drivers/gpu/drm/drm_internal.h
drivers/gpu/drm/drm_mode_config.c
include/drm/drm_device.h