On Tue, Jun 18, 2019 at 05:19:38PM +0200, Greg Kroah-Hartman wrote: > On Fri, Jun 14, 2019 at 10:36:14PM +0200, Daniel Vetter wrote: > > Greg is busy already, but maybe he won't do everything ... > > > > Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> > > Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx> > > --- > > Documentation/gpu/todo.rst | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst > > index 9717540ee28f..026e55c517e1 100644 > > --- a/Documentation/gpu/todo.rst > > +++ b/Documentation/gpu/todo.rst > > @@ -375,6 +375,9 @@ There's a bunch of issues with it: > > this (together with the drm_minor->drm_device move) would allow us to remove > > debugfs_init. > > > > +- Drop the return code and error checking from all debugfs functions. Greg KH is > > + working on this already. > > > Part of this work was to try to delete drm_debugfs_remove_files(). > > There are only 4 files that currently still call this function: > drivers/gpu/drm/tegra/dc.c > drivers/gpu/drm/tegra/dsi.c > drivers/gpu/drm/tegra/hdmi.c > drivers/gpu/drm/tegra/sor.c > > For dc.c, the driver wants to add debugfs files to the struct drm_crtc > debugfs directory. Which is fine, but it has to do some special memory > allocation to get the debugfs callback to point not to the struct > drm_minor pointer, but rather the drm_crtc structure. Actually the reason why the memory allocation is done is because there can be multiple instances of the display controller. In fact, there's always at least two (and up to four in later Tegra generations). The DRM debugfs infrastructure, however, doesn't automatically duplicate the data for each drm_debugfs_create_files() call and at the same time it does not allow you to specify driver-private data other than by embedding it in the drm_info_list structure. So rather than manually create the drm_info_list for each display controller instance, the code creates a template that is then duplicated and for which the driver- private is then set. That way multiple invocations end up with different data. This is because of the extra indirection that the DRM debugfs infrastructure introduces. It's in fact much easier to do this with just plain debugfs function calls. The only downside is the boilerplate required to make that happen. Thierry
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx