[PATCH] drm: Provide drm_set_busid() fallback

2014-04-11 Thread David Herrmann
Hi On Fri, Apr 11, 2014 at 7:43 PM, Daniel Vetter wrote: > Hm, my plan was actually to just provide a drm_dev_setunique to drivers so > that they can set whatever their userspace wants, and then have no > set_busid implementation here at all for !pci. Some userspace at least > uses the unique thi

[PATCH] drm: Provide drm_set_busid() fallback

2014-04-11 Thread Daniel Vetter
On Fri, Apr 11, 2014 at 8:30 PM, Thierry Reding wrote: > 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; >

[PATCH] drm: Provide drm_set_busid() fallback

2014-04-11 Thread Thierry Reding
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) { >

[PATCH] drm: Provide drm_set_busid() fallback

2014-04-11 Thread Daniel Vetter
On Fri, Apr 11, 2014 at 03:28:56PM +0200, Thierry Reding wrote: > From: Thierry Reding > > The only reason why struct drm_bus is still around is because the > SETVERSION IOCTL calls a bus specific .set_busid() function. This commit > provides a fallback implementation if a device either doesn't h

[PATCH] drm: Provide drm_set_busid() fallback

2014-04-11 Thread Thierry Reding
From: Thierry Reding The only reason why struct drm_bus is still around is because the SETVERSION IOCTL calls a bus specific .set_busid() function. This commit provides a fallback implementation if a device either doesn't have a bus associated with it or if it doesn't implement .set_busid(). The