From: Thierry Reding <thierry.reding@gmail.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: Provide drm_set_busid() fallback
Date: Fri, 11 Apr 2014 20:30:04 +0200 [thread overview]
Message-ID: <20140411183002.GA3673@mithrandir> (raw)
In-Reply-To: <20140411174318.GN9262@phenom.ffwll.local>
[-- Attachment #1.1: Type: text/plain, Size: 1875 bytes --]
On Fri, Apr 11, 2014 at 07:43:18PM +0200, Daniel Vetter wrote:
> On Fri, Apr 11, 2014 at 03:28:56PM +0200, Thierry Reding wrote:
[...]
> > - ret = dev->driver->bus->set_busid(dev, master);
> > - if (ret)
> > - goto err;
> > + if (dev->driver->bus && dev->driver->bus->set_busid) {
> > + ret = dev->driver->bus->set_busid(dev, master);
> > + if (ret)
> > + goto err;
> > + } else {
>
> Hm, my plan was actually to just provide a drm_dev_setunique to drivers so
> that they can set whatever their userspace wants,
So that would be going one step further and not call drm_set_busid() in
the first place, but rather just let drivers statically assign unique at
probe/load time? Yeah, that makes sense. It's not like the unique string
is going to change at runtime, is it?
> and then have no set_busid implementation here at all for !pci.
Perhaps for PCI there could simply be a common helper to initialize the
unique string in the way it's currently generated by the PCI bus'
implementation of .set_busid(). Even for PCI it's still a static string
that's fixed at probe/load time, isn't it? And it isn't specific per
device, only per drm_bus.
> Some userspace at least uses the unique thing to match for the driver,
> so we need to do the usual bending over backwards to keep it
> consistent.
For new drivers and userspace it should be okay to just match on the
driver name. Any differentiation on a per-device basis is probably
better done using a GET_PARAM ioctl than by parsing a bus ID string.
Or what is userspace doing with the bus ID in the first place?
> The approach with a drm_set_unique helper would also make conversion of
> existing platform and usb drivers easier.
Yeah, I like that better than what this patch does. Is that something
you have already queued up? If not I could take a stab at it.
Thierry
[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2014-04-11 18:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-11 13:28 [PATCH] drm: Provide drm_set_busid() fallback Thierry Reding
2014-04-11 17:43 ` Daniel Vetter
2014-04-11 18:30 ` Thierry Reding [this message]
2014-04-11 21:23 ` Daniel Vetter
2014-04-11 21:38 ` David Herrmann
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=20140411183002.GA3673@mithrandir \
--to=thierry.reding@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.