From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: devicetree@vger.kernel.org,
Maxime Ripard <maxime.ripard@bootlin.com>,
dri-devel <dri-devel@lists.freedesktop.org>,
David Airlie <airlied@linux.ie>, Sean Paul <sean@poorly.run>
Subject: Re: [PATCH] drm: support gpu aliases defined in DT data
Date: Wed, 6 Mar 2019 09:49:46 +0200 [thread overview]
Message-ID: <b92edfd8-3ebd-8e8e-f5b5-edfee39eb59a@ti.com> (raw)
In-Reply-To: <20190306014124.GC30262@pendragon.ideasonboard.com>
On 06/03/2019 03:41, Laurent Pinchart wrote:
> Hi Tomi,
>
> On Fri, Jan 18, 2019 at 10:29:33AM +0200, Tomi Valkeinen wrote:
>> On 18/01/19 00:04, Rob Herring wrote:
>>
>>> Mesa/libdrm already has lots of code to open the correct devices and
>>> not care about minor numbers. What's the problem here?
>>
>> Well, maybe the problem is that I don't know how to do this =).
>>
>> So, if we have multiple DRM devices, how does one manage those?
>> Iterating over them and looking for kms-capable ones is easy enough. But
>> if there are multiple kms-capable ones, how should the userspace choose
>> between those?
>>
>> I see that udev creates /dev/dri/by-path/ links to the cards, should the
>> userspace use those to have a persistent link to the card? E.g. first
>> time the app is ran, it'll collect all the kms-capable cards, and store
>> the by-path names somewhere, and in subsequent runs it will instead use
>> the by-path names to keep the order the same.
>>
>> If I have a product with two display controllers, and one of them has
>> the main display connected, how does my custom app know which card to
>> use? Hardcoding the by-path in the app?
>
> I think it depends on how you define "main display". We have a similar
> problem with cameras where a system such as a phone or tablet with a
> front camera and a back camera has no good way to convey the role of
> each camera all the way to applications. The information belongs to
> system firmware in my opinion (and thus DT in this case), but probably
> not in the form of aliases. It would make sense to tag connector and
> panels with some kind of role (such as main display, various kind of
> auxiliary displays, ...), parse that information in drivers, and report
> it to userspace (ideally through standard APIs).
I agree. I did have "label" in the omapdrm-style panels and connectors,
but that's not used anywhere.
But this patch is not really about what you describe above, The target
was really just to have card0 to be a modesetting card, making simple
apps that use card0 for display working. So, obviously a work-around or
even a hack, but solves the issue without changing the userspace.
Tomi
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-03-06 7:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-17 11:19 [PATCH] drm: support gpu aliases defined in DT data Tomi Valkeinen
2019-01-17 11:35 ` Maxime Ripard
2019-01-17 12:33 ` Daniel Vetter
2019-01-17 13:04 ` Tomi Valkeinen
2019-01-17 13:26 ` Daniel Vetter
2019-01-17 13:56 ` Tomi Valkeinen
2019-01-17 22:04 ` Rob Herring
2019-01-18 8:29 ` Tomi Valkeinen
2019-03-06 1:41 ` Laurent Pinchart
2019-03-06 7:49 ` Tomi Valkeinen [this message]
2019-04-17 17:42 ` Emil Velikov
2019-04-26 11:23 ` Tomi Valkeinen
2019-01-17 21:38 ` Eric Anholt
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=b92edfd8-3ebd-8e8e-f5b5-edfee39eb59a@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=airlied@linux.ie \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=maxime.ripard@bootlin.com \
--cc=sean@poorly.run \
/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).