Re: [RFC PATCH v2 3/3] drm: initialize accel framework

From: Oded Gabbay
Date: Sun Nov 06 2022 - 05:56:28 EST


On Wed, Nov 2, 2022 at 11:30 PM Jeffrey Hugo <quic_jhugo@xxxxxxxxxxx> wrote:
>
> On 11/2/2022 2:34 PM, Oded Gabbay wrote:
> > @@ -163,7 +174,11 @@ static int drm_minor_register(struct drm_device *dev, unsigned int type)
> >
> > ret = drm_debugfs_init(minor, minor->index, drm_debugfs_root);
> > if (ret) {
> > - DRM_ERROR("DRM: Failed to initialize /sys/kernel/debug/dri.\n");
> > + if (minor->type == DRM_MINOR_ACCEL)
> > + DRM_ERROR("DRM: Failed to initialize /sys/kernel/debug/accel.\n");
> > + else
> > + DRM_ERROR("DRM: Failed to initialize /sys/kernel/debug/dri.\n");
> > +
> > goto err_debugfs;
> > }
> >
>
> This doesn't look right. Don't you need to call drm_debugfs_init() with
> accel_debugfs_root for the case - minor->type == DRM_MINOR_ACCEL?
> Unless I fail to understand something, this will put all the accel
> devices under /sys/kernel/debug/dri
ofc, you are correct.
Will be fixed in v3.
Thanks,
Oded