[PATCH 2/5] drm/debugfs: rework debugfs directory creation v3
Christian König
ckoenig.leichtzumerken at gmail.com
Mon Apr 24 12:17:46 UTC 2023
Am 17.04.23 um 12:26 schrieb Stanislaw Gruszka:
> On Mon, Apr 17, 2023 at 09:18:31AM +0200, Christian König wrote:
>>
>> Am 16.04.23 um 18:03 schrieb Tomer Tayar:
>>> On 12/04/2023 17:52, Christian König wrote:
>>>> /**
>>>> - * accel_debugfs_init() - Initialize debugfs for accel minor
>>>> + * accel_debugfs_init() - Register debugfs for accel minor
>>>> + * @dev: Pointer to the device instance.
>>>> + *
>>>> + * This function creates a root directory for the device in debugfs.
>>>> + */
>>>> +void accel_debugfs_init(struct drm_device *dev)
>>>> +{
>>>> + drm_debugfs_dev_init(dev, accel_debugfs_root);
>>>> +}
>>>> +
>>>> +/**
>>>> + * accel_debugfs_register() - Register debugfs for device
>>>> * @minor: Pointer to the drm_minor instance.
>>>> * @minor_id: The minor's id
>>>> *
>>>> - * This function initializes the drm minor's debugfs members and creates
>>>> - * a root directory for the minor in debugfs. It also creates common files
>>>> - * for accelerators and calls the driver's debugfs init callback.
>>>> + * Creates common files for accelerators.
>>>> */
>>>> -void accel_debugfs_init(struct drm_minor *minor, int minor_id)
>>>> +void accel_debugfs_register(struct drm_device *dev)
>>>> {
> I wonder if we need this and can not use drm_debugfs_dev_register() ?
> In drm there are two additional files "clients" and "gem_names" which are
> appropriate to accel as well and so far we do not have any accel
> specific files.
I was wondering the same thing while going over this, but then decided
to leave it as it is for now.
My primary concern is to remove the mid layering with the driver
callback because that is blocking functionality from working correctly,
cleanup and re-joining of functionality can then come later on.
Regards,
Christian.
>
> Regards
> Stanislaw
More information about the dri-devel
mailing list