linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	linux-tegra@vger.kernel.org,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: drm connectors, tegra,  and the web they weave (was Re: [PATCH 58/59] drm/todo: Add new debugfs todo)
Date: Thu, 20 Jun 2019 16:57:23 +0200	[thread overview]
Message-ID: <20190620145723.GC15501@ulmo> (raw)
In-Reply-To: <20190618151938.GA2567@kroah.com>


[-- Attachment #1.1: Type: text/plain, Size: 2429 bytes --]

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@linuxfoundation.org>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> >  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 #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      parent reply	other threads:[~2019-06-20 14:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190614203615.12639-1-daniel.vetter@ffwll.ch>
     [not found] ` <20190614203615.12639-1-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
2019-06-14 20:35   ` [PATCH 06/59] drm/prime: Actually remove DRIVER_PRIME everywhere Daniel Vetter
     [not found]     ` <20190614203615.12639-7-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
2019-06-14 21:36       ` Sam Ravnborg
2019-06-17 15:39       ` [PATCH] " Daniel Vetter
2019-06-17 17:56     ` [PATCH 06/59] " Emil Velikov
2019-06-14 20:35   ` [PATCH 09/59] drm/prime: Align gem_prime_export with obj_funcs.export Daniel Vetter
     [not found]     ` <20190614203615.12639-10-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
2019-06-17  9:32       ` Koenig, Christian
2019-06-17  9:53       ` Thierry Reding
2019-06-21 10:37       ` Daniel Vetter
     [not found] ` <20190614203615.12639-59-daniel.vetter@ffwll.ch>
2019-06-18 15:19   ` drm connectors, tegra, and the web they weave (was Re: [PATCH 58/59] drm/todo: Add new debugfs todo) Greg Kroah-Hartman
2019-06-18 15:25     ` Greg Kroah-Hartman
2019-06-18 17:32       ` Daniel Vetter
2019-06-18 18:01         ` Greg Kroah-Hartman
2019-06-18 21:46           ` Daniel Vetter
2019-06-20 14:50             ` Thierry Reding
2019-06-20 15:11         ` Thierry Reding
2019-06-18 15:37     ` Jon Hunter
2019-06-20 15:16       ` Thierry Reding
2019-06-20 14:57     ` Thierry Reding [this message]

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=20190620145723.GC15501@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-tegra@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).