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

Daniel Vetter daniel.vetter at ffwll.ch
Sun Nov 3 06:14:16 PST 2013


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'll fix the fumble with the list_head init, thanks for spotting that.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the dri-devel mailing list