dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] drm: Store USB device in struct drm_device
@ 2020-11-03 10:36 Thomas Zimmermann
  2020-11-03 10:36 ` [PATCH v2 1/3] drm: Add USB helpers Thomas Zimmermann
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Thomas Zimmermann @ 2020-11-03 10:36 UTC (permalink / raw)
  To: hdegoede, airlied, daniel, sean, maarten.lankhorst, mripard
  Cc: Thomas Zimmermann, dri-devel

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

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-11-03 11:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-03 10:36 [PATCH v2 0/3] drm: Store USB device in struct drm_device Thomas Zimmermann
2020-11-03 10:36 ` [PATCH v2 1/3] drm: Add USB helpers Thomas Zimmermann
2020-11-03 10:48   ` Daniel Vetter
2020-11-03 10:36 ` [PATCH v2 2/3] drm/tiny/gm12u320: Retrieve USB device from struct drm_device.dev Thomas Zimmermann
2020-11-03 10:56   ` Daniel Vetter
2020-11-03 10:36 ` [PATCH v2 3/3] drm/udl: " Thomas Zimmermann
2020-11-03 10:56   ` Daniel Vetter
2020-11-03 11:09 ` [PATCH v2 0/3] drm: Store USB device in struct drm_device Hans de Goede
2020-11-03 11:30   ` Thomas Zimmermann
2020-11-03 11:45     ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).