Re: [PATCH] drm/panel-edp: Allow querying the detected panel via sysfs

From: Doug Anderson
Date: Tue Feb 01 2022 - 12:23:12 EST


Hi,

On Tue, Feb 1, 2022 at 9:02 AM Daniel Vetter <daniel@xxxxxxxx> wrote:
>
> On Tue, Feb 1, 2022 at 5:42 PM Doug Anderson <dianders@xxxxxxxxxxxx> wrote:
> >
> > Hi,
> >
> > On Wed, Jan 26, 2022 at 12:25 AM Javier Martinez Canillas
> > <javierm@xxxxxxxxxx> wrote:
> > >
> > > On 1/26/22 00:25, Doug Anderson wrote:
> > > > On Tue, Jan 25, 2022 at 2:55 PM Javier Martinez Canillas
> > > > <javierm@xxxxxxxxxx> wrote:
> > >
> > > [snip]
> > >
> > > >> Should this new sysfs entry be documented in Documentation/ABI/ ?
> > > >
> > > > I'm not sure what the policy is here. I actually don't know that I'm
> > > > too worried about this being an ABI. For the purposes of our tests
> > > > then if something about this file changed (path changed or something
> > > > like that) it wouldn't be a huge deal. Presumably the test itself
> > > > would just "fail" in this case and that would clue us in that the ABI
> > > > changed and we could adapt to whatever new way was needed to discover
> > > > this.
> > > >
> > > > That being said, if the policy is that everything in sysfs is supposed
> > > > to be ABI then I can add documentation for this...
> > > >
> > >
> > > I also don't know the policy, hence the question. But in any case, I
> > > think that it could even be done as a follow-up if is needed.
> >
> > Sounds good. Since it's been pretty silent and I had your review I
> > pushed this to drm-misc-next. If there are comments or someone has an
> > opinion documenting this as a stable ABI then please yell.
> >
> > 363c4c3811db drm/panel-edp: Allow querying the detected panel via sysfs
>
> Generally stuff for tests should be put into debugfs. We print
> everything there in various files.
>
> sysfs is uapi, and so come with the full baggage of you need open
> userspace (which for some sysfs stuff might just be a script), and
> explicitly not for tests (because that just opens the door to merge
> anything binary blobs might want and just slide it all in). So please
> retcon at least some plausible deniability here :-)

OK, fair enough. It really is just for a test. Let me post a revert
then while we discuss more. If someone can add a Reviewed-by to the
revert then I'll push that just so we're not in an awkward situation.

https://lore.kernel.org/r/20220201092152.1.Ibc65ec6fa05017e9856ba9ef557310268429c3ce@changeid


> But if it's really only for a test then maybe dumping this into a
> debugfs file (we do have connector directories already) would be much
> better. That doable?

I did spend a little time looking at how to do this in debugfs and it
wasn't at all obvious to me without plumbing in a lot of extra code,
but I can spend more time on it if it's a requirement. If you think
this is something that should just be easy, I certainly wouldn't say
no to a pointer to what I should look at! ;-)

-Doug