[PATCH 11/19] drm: restrict the device list for shadow attached drivers

Thierry Reding thierry.reding at gmail.com
Mon Nov 4 01:20:42 PST 2013


On Sun, Nov 03, 2013 at 03:14:16PM +0100, Daniel Vetter wrote:
> On Sun, Nov 3, 2013 at 3:05 PM, David Herrmann <dh.herrmann at gmail.com> wrote:
> > On Sun, Nov 3, 2013 at 2:31 PM, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> >> There's really no need for the drm core to keep a list of all
> >> devices of a given driver - the linux device model keeps perfect
> >> track of this already for us.
> >>
> >> The exception is old legacy ums drivers using pci shadow attaching.
> >> So rename the lists to make the use case clearer and rip out everything
> >> else.
> >>
> >> v2: Rebase on top of David Herrmann's drm device register changes.
> >> Also drop the bogus dev_set_drvdata for platform drivers that somehow
> >> crept into the original version - drivers really should be in full
> >> control of that field.
> >
> > You didn't really change any dev_set_drvdata, did you? And I guess you
> > mean pci_set_drvdata()? I had to keep it in place in drm_pci.c as it
> > has been there before my device-registration changes. However, with
> > your series you added the pci_set_drvdata() everywhere yourself, so
> > yes, please remove it.
> 
> That was a bogus hunk in v1 of this patch, which iirc I've never
> posted onto the list anywhere. I added a platfrom_set_drvdata call,
> but with the previous series to make sure that each driver has that
> it's a bit redundant.
> 
> Long term, when we split up the drm init code I think the drvdata
> assignment should be the driver's job.

I remember submitting a patch for that a while ago. It was applied about
a year ago, see commit a16d4f86019a ('drm: platform: Don't initialize
driver-private data'). The issue at the time was that I needed the
drvdata for other purposes and drm_platform_init() kept overwriting it,
which had me confused for days.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20131104/2a2e85cb/attachment.pgp>


More information about the dri-devel mailing list