drm: add usb framework

This adds an initial framework to plug USB graphics devices
into the drm/kms subsystem.

I've started writing a displaylink driver using this interface.

Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie
2010-12-15 07:13:55 +10:00
committed by Dave Airlie
parent 8410ea3b95
commit a250b9fdc5
5 changed files with 136 additions and 1 deletions

View File

@@ -925,6 +925,7 @@ struct drm_driver {
union {
struct pci_driver *pci;
struct platform_device *platform_device;
struct usb_driver *usb;
} kdriver;
struct drm_bus *bus;
@@ -1130,6 +1131,7 @@ struct drm_device {
#endif
struct platform_device *platformdev; /**< Platform device struture */
struct usb_device *usbdev;
struct drm_sg_mem *sg; /**< Scatter gather memory */
int num_crtcs; /**< Number of CRTCs on this device */

15
include/drm/drm_usb.h Normal file
View File

@@ -0,0 +1,15 @@
#ifndef DRM_USB_H
#define DRM_USB_H
#include <drmP.h>
#include <linux/usb.h>
extern int drm_usb_init(struct drm_driver *driver, struct usb_driver *udriver);
extern void drm_usb_exit(struct drm_driver *driver, struct usb_driver *udriver);
int drm_get_usb_dev(struct usb_interface *interface,
const struct usb_device_id *id,
struct drm_driver *driver);
#endif