mbox series

[v2,0/3] drm: Store USB device in struct drm_device

Message ID 20201103103656.17768-1-tzimmermann@suse.de (mailing list archive)
Headers show
Series drm: Store USB device in struct drm_device | expand

Message

Thomas Zimmermann Nov. 3, 2020, 10:36 a.m. UTC
The drivers gm12u320 and udl operate on USB devices. They leave the PCI
device in struct drm_device empty and store the USB device in their own
driver structure. It's expected that DRM core and helpers only touch the
PCI-device field for actual PCI devices.

Fix this special case by upcasting struct drm_device.dev to the USB
device. The drivers' udev variables are being removed.

v2:
	* upcast USB device from struct drm_device.dev (Daniel)

Thomas Zimmermann (3):
  drm: Add USB helpers
  drm/tiny/gm12u320: Retrieve USB device from struct drm_device.dev
  drm/udl: Retrieve USB device from struct drm_device.dev

 Documentation/gpu/drm-internals.rst |  5 +++
 drivers/gpu/drm/tiny/gm12u320.c     | 52 +++++++++++++----------------
 drivers/gpu/drm/udl/udl_connector.c |  9 ++---
 drivers/gpu/drm/udl/udl_drv.c       |  3 --
 drivers/gpu/drm/udl/udl_drv.h       |  1 -
 drivers/gpu/drm/udl/udl_main.c      | 25 ++++++++------
 include/drm/drm_usb_helper.h        | 25 ++++++++++++++
 7 files changed, 73 insertions(+), 47 deletions(-)
 create mode 100644 include/drm/drm_usb_helper.h

--
2.29.0

Comments

Hans de Goede Nov. 3, 2020, 11:09 a.m. UTC | #1
Hi,

On 11/3/20 11:36 AM, Thomas Zimmermann wrote:
> The drivers gm12u320 and udl operate on USB devices. They leave the PCI
> device in struct drm_device empty and store the USB device in their own
> driver structure. It's expected that DRM core and helpers only touch the
> PCI-device field for actual PCI devices.
> 
> Fix this special case by upcasting struct drm_device.dev to the USB
> device. The drivers' udev variables are being removed.
> 
> v2:
> 	* upcast USB device from struct drm_device.dev (Daniel)
> 
> Thomas Zimmermann (3):
>   drm: Add USB helpers
>   drm/tiny/gm12u320: Retrieve USB device from struct drm_device.dev
>   drm/udl: Retrieve USB device from struct drm_device.dev

Thanks.

The entire series looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Note you may want to wait with pushing this to drm-misc until the
first patch gets at least one other review.

Or at least give others some time to possibly react :)

Regards,

Hans




> 
>  Documentation/gpu/drm-internals.rst |  5 +++
>  drivers/gpu/drm/tiny/gm12u320.c     | 52 +++++++++++++----------------
>  drivers/gpu/drm/udl/udl_connector.c |  9 ++---
>  drivers/gpu/drm/udl/udl_drv.c       |  3 --
>  drivers/gpu/drm/udl/udl_drv.h       |  1 -
>  drivers/gpu/drm/udl/udl_main.c      | 25 ++++++++------
>  include/drm/drm_usb_helper.h        | 25 ++++++++++++++
>  7 files changed, 73 insertions(+), 47 deletions(-)
>  create mode 100644 include/drm/drm_usb_helper.h
> 
> --
> 2.29.0
>
Thomas Zimmermann Nov. 3, 2020, 11:30 a.m. UTC | #2
Hi

Am 03.11.20 um 12:09 schrieb Hans de Goede:
> Hi,
> 
> On 11/3/20 11:36 AM, Thomas Zimmermann wrote:
>> The drivers gm12u320 and udl operate on USB devices. They leave the PCI
>> device in struct drm_device empty and store the USB device in their own
>> driver structure. It's expected that DRM core and helpers only touch the
>> PCI-device field for actual PCI devices.
>>
>> Fix this special case by upcasting struct drm_device.dev to the USB
>> device. The drivers' udev variables are being removed.
>>
>> v2:
>> 	* upcast USB device from struct drm_device.dev (Daniel)
>>
>> Thomas Zimmermann (3):
>>   drm: Add USB helpers
>>   drm/tiny/gm12u320: Retrieve USB device from struct drm_device.dev
>>   drm/udl: Retrieve USB device from struct drm_device.dev
> 
> Thanks.
> 
> The entire series looks good to me:
> 
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Thanks!

> 
> Note you may want to wait with pushing this to drm-misc until the
> first patch gets at least one other review.

Following Daniel's request, I'll drop the first patch and put the helper
into the drivers.

> 
> Or at least give others some time to possibly react :)

Sure, I'll merge it later this week.

Best regards
Thomas

> 
> Regards,
> 
> Hans
> 
> 
> 
> 
>>
>>  Documentation/gpu/drm-internals.rst |  5 +++
>>  drivers/gpu/drm/tiny/gm12u320.c     | 52 +++++++++++++----------------
>>  drivers/gpu/drm/udl/udl_connector.c |  9 ++---
>>  drivers/gpu/drm/udl/udl_drv.c       |  3 --
>>  drivers/gpu/drm/udl/udl_drv.h       |  1 -
>>  drivers/gpu/drm/udl/udl_main.c      | 25 ++++++++------
>>  include/drm/drm_usb_helper.h        | 25 ++++++++++++++
>>  7 files changed, 73 insertions(+), 47 deletions(-)
>>  create mode 100644 include/drm/drm_usb_helper.h
>>
>> --
>> 2.29.0
>>
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
Hans de Goede Nov. 3, 2020, 11:45 a.m. UTC | #3
Hi,

On 11/3/20 12:30 PM, Thomas Zimmermann wrote:
> Hi
> 
> Am 03.11.20 um 12:09 schrieb Hans de Goede:
>> Hi,
>>
>> On 11/3/20 11:36 AM, Thomas Zimmermann wrote:
>>> The drivers gm12u320 and udl operate on USB devices. They leave the PCI
>>> device in struct drm_device empty and store the USB device in their own
>>> driver structure. It's expected that DRM core and helpers only touch the
>>> PCI-device field for actual PCI devices.
>>>
>>> Fix this special case by upcasting struct drm_device.dev to the USB
>>> device. The drivers' udev variables are being removed.
>>>
>>> v2:
>>> 	* upcast USB device from struct drm_device.dev (Daniel)
>>>
>>> Thomas Zimmermann (3):
>>>   drm: Add USB helpers
>>>   drm/tiny/gm12u320: Retrieve USB device from struct drm_device.dev
>>>   drm/udl: Retrieve USB device from struct drm_device.dev
>>
>> Thanks.
>>
>> The entire series looks good to me:
>>
>> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> 
> Thanks!
> 
>>
>> Note you may want to wait with pushing this to drm-misc until the
>> first patch gets at least one other review.
> 
> Following Daniel's request, I'll drop the first patch and put the helper
> into the drivers.

Ok, that works for me.

>> Or at least give others some time to possibly react :)
> 
> Sure, I'll merge it later this week.

My remark was mostly to give Daniel time to react...

BTW I missed Daniel's reaction again. Now I have figured out why
though for some reason RH's email system is marking Daniels
mails as spam, so they were in my spam folder ?

Regards,

Hans