Re: [PATCH 17/20] drm: add driver->set_busid() callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 29, 2014 at 03:01:00PM +0200, Daniel Vetter wrote:
> On Fri, Aug 29, 2014 at 12:12:43PM +0200, David Herrmann wrote:
> > One step closer to dropping all the drm_bus_* code:
> > Add a driver->set_busid() callback and make all drivers use the generic
> > helpers. Nouveau is the only driver that uses two different bus-types with
> > the same drm_driver. This is totally broken if both buses are available on
> > the same machine (unlikely, but lets be safe). Therefore, we create two
> > different drivers for each platform during module_init() and set the
> > set_busid() callback respectively.
> > 
> > Signed-off-by: David Herrmann <dh.herrmann@xxxxxxxxx>
> 
> This has a bit a midlayer smell to it tbh, we don't really need a
> set_busid callback I think. Instead there's just two cases:
> - The crazy implementation for pci devices. But we already have dev->pdev,
>   so the core can figure this out itself.
> - Everyone else just sets a static name. For those I think we should just
>   add a drm_dev_set_busid function which they can call in their
>   driver-load function. Well maybe different versions for platform drivers
>   and stuff.

We already have drm_dev_set_unique() for exactly this purpose. I think
drivers can just be converted to use that one at a time and when no
users are left we can drop drm_*_set_busid().

Thierry

Attachment: pgp6rz3lJJi_8.pgp
Description: PGP signature

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

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux