From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Andi Shyti <andi.shyti@linux.intel.com>,
Dave Airlie <airlied@redhat.com>,
"Vetter, Daniel" <daniel.vetter@intel.com>
Cc: ogabbay@kernel.org, ttayar@habana.ai, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/5] drm/debugfs: disallow debugfs access when device isn't registered
Date: Wed, 30 Aug 2023 09:57:21 +0200 [thread overview]
Message-ID: <3679a4e7-918f-dde4-46a7-5613d734d13a@gmail.com> (raw)
In-Reply-To: <ef05cacc-8a3c-b3e2-b07b-f0d38cd5e7ad@gmail.com>
Am 29.08.23 um 14:31 schrieb Christian König:
> Am 29.08.23 um 13:38 schrieb Andi Shyti:
>>>>> During device bringup it might be that we can't access the debugfs
>>>>> files.
>>>>> Return -ENODEV until the registration is completed on access.
>>>> just wondering, if the device is not registered, how do we get
>>>> there?
>>> The workflow is:
>>> 1. Creation (DRM)
>>> 2. Initialization (Driver)
>>> 3. Registration (DRM)
>>> ...
>>> 4. Unregistration (DRM)
>>> 5. Deinitialization (Driver)
>>> 6. Destruction (DRM)
>>>
>>> It is possible that debugfs files are created during driver
>>> initialization,
>>> but Daniel insisted that they should not be accessible until the
>>> registration is done (which makes the other UAPI accessible as well).
>> makes sense, but then why not -EAGAIN, or -EBUSY?
>
> Good question.
>
> I think the main use case for this is between 4 and 6. E.g. a device
> which is hot removed and now in the process of being torn down.
>
> In this situation we might still have references from userspace
> (memory mapping etc...), so the drm file and with it the debugfs
> directory is still there but the physical device is gone. For the
> IOCTL UAPI we then also return -ENODEV as well, so this makes sense.
>
> The time between 1 and 3 is interesting as well, but here it's more
> like we couldn't get the device initialized and are now stuck. This
> happens sometimes during early hardware bringup and I still disagree
> with Daniel that we should block that (well on the other hand it's
> trivial for a developer to comment those checks out).
Could I get an rb for this series or at least this patch from you?
I would really like to push that now as long as neither Dave nor Daniel
have any objections (last time I checked the Intel CI was happy as well,
but we could re-submit that once more of course).
Thanks,
Christian.
>
> Regards,
> Christian.
>
>>
>> Thanks,
>> Andi
>
next prev parent reply other threads:[~2023-08-30 7:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-29 11:01 DRM debugfs cleanup take 6 Christian König
2023-08-29 11:01 ` [PATCH 1/5] drm/debugfs: drop debugfs_init() for the render and accel node v2 Christian König
2023-08-30 8:19 ` Andi Shyti
2023-08-30 14:22 ` Christian König
2023-09-01 8:00 ` Tomer Tayar
2023-08-29 11:01 ` [PATCH 2/5] drm/debugfs: disallow debugfs access when device isn't registered Christian König
2023-08-29 11:31 ` Andi Shyti
2023-08-29 11:35 ` Christian König
2023-08-29 11:38 ` Andi Shyti
2023-08-29 12:31 ` Christian König
2023-08-30 7:57 ` Christian König [this message]
2023-08-30 8:48 ` Andi Shyti
2023-08-29 11:01 ` [PATCH 3/5] drm/debugfs: rework debugfs directory creation v5 Christian König
2023-08-31 21:49 ` Andi Shyti
2023-08-29 11:01 ` [PATCH 4/5] drm/debugfs: remove dev->debugfs_list and debugfs_mutex v2 Christian König
2023-08-31 21:56 ` Andi Shyti
2023-08-29 11:01 ` [PATCH 5/5] drm/debugfs: rework drm_debugfs_create_files implementation v2 Christian König
2023-08-31 22:06 ` Andi Shyti
-- strict thread matches above, loose matches on Subject: below --
2023-07-11 14:04 DRM debugfs cleanup take 5 (resend) Christian König
2023-07-11 14:04 ` [PATCH 2/5] drm/debugfs: disallow debugfs access when device isn't registered Christian König
2023-04-24 12:30 [PATCH 1/5] drm/debugfs: drop debugfs_init() for the render and accel node v2 Christian König
2023-04-24 12:30 ` [PATCH 2/5] drm/debugfs: disallow debugfs access when device isn't registered Christian König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3679a4e7-918f-dde4-46a7-5613d734d13a@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=airlied@redhat.com \
--cc=andi.shyti@linux.intel.com \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ogabbay@kernel.org \
--cc=ttayar@habana.ai \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.