Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4f68a75 authored by David Herrmann's avatar David Herrmann Committed by Dave Airlie
Browse files

drm: merge drm_usb into udl



This merges all the remains of drm_usb into its only user, udl. We can
then drop all the drm_usb stuff, including dev->usbdev.

Signed-off-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
Reviewed-by: default avatarThierry Reding <treding@nvidia.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent c5786fe5
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -291,10 +291,9 @@ char *date;</synopsis>
      <title>Device Registration</title>
      <title>Device Registration</title>
      <para>
      <para>
        A number of functions are provided to help with device registration.
        A number of functions are provided to help with device registration.
        The functions deal with PCI, USB and platform devices, respectively.
        The functions deal with PCI and platform devices, respectively.
      </para>
      </para>
!Edrivers/gpu/drm/drm_pci.c
!Edrivers/gpu/drm/drm_pci.c
!Edrivers/gpu/drm/drm_usb.c
!Edrivers/gpu/drm/drm_platform.c
!Edrivers/gpu/drm/drm_platform.c
      <para>
      <para>
        New drivers that no longer rely on the services provided by the
        New drivers that no longer rely on the services provided by the
+0 −6
Original line number Original line Diff line number Diff line
@@ -25,12 +25,6 @@ config DRM_MIPI_DSI
	bool
	bool
	depends on DRM
	depends on DRM


config DRM_USB
	tristate
	depends on DRM
	depends on USB_SUPPORT && USB_ARCH_HAS_HCD
	select USB

config DRM_KMS_HELPER
config DRM_KMS_HELPER
	tristate
	tristate
	depends on DRM
	depends on DRM
+0 −3
Original line number Original line Diff line number Diff line
@@ -22,8 +22,6 @@ drm-$(CONFIG_PCI) += ati_pcigart.o
drm-$(CONFIG_DRM_PANEL) += drm_panel.o
drm-$(CONFIG_DRM_PANEL) += drm_panel.o
drm-$(CONFIG_OF) += drm_of.o
drm-$(CONFIG_OF) += drm_of.o


drm-usb-y   := drm_usb.o

drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_probe_helper.o \
drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_probe_helper.o \
		drm_plane_helper.o drm_dp_mst_topology.o
		drm_plane_helper.o drm_dp_mst_topology.o
drm_kms_helper-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o
drm_kms_helper-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o
@@ -36,7 +34,6 @@ CFLAGS_drm_trace_points.o := -I$(src)


obj-$(CONFIG_DRM)	+= drm.o
obj-$(CONFIG_DRM)	+= drm.o
obj-$(CONFIG_DRM_MIPI_DSI) += drm_mipi_dsi.o
obj-$(CONFIG_DRM_MIPI_DSI) += drm_mipi_dsi.o
obj-$(CONFIG_DRM_USB)   += drm_usb.o
obj-$(CONFIG_DRM_TTM)	+= ttm/
obj-$(CONFIG_DRM_TTM)	+= ttm/
obj-$(CONFIG_DRM_TDFX)	+= tdfx/
obj-$(CONFIG_DRM_TDFX)	+= tdfx/
obj-$(CONFIG_DRM_R128)	+= r128/
obj-$(CONFIG_DRM_R128)	+= r128/

drivers/gpu/drm/drm_usb.c

deleted100644 → 0
+0 −76
Original line number Original line Diff line number Diff line
#include <drm/drmP.h>
#include <drm/drm_usb.h>
#include <linux/usb.h>
#include <linux/module.h>

int drm_get_usb_dev(struct usb_interface *interface,
		    const struct usb_device_id *id,
		    struct drm_driver *driver)
{
	struct drm_device *dev;
	int ret;

	DRM_DEBUG("\n");

	dev = drm_dev_alloc(driver, &interface->dev);
	if (!dev)
		return -ENOMEM;

	dev->usbdev = interface_to_usbdev(interface);
	usb_set_intfdata(interface, dev);

	ret = drm_dev_register(dev, 0);
	if (ret)
		goto err_free;

	DRM_INFO("Initialized %s %d.%d.%d %s on minor %d\n",
		 driver->name, driver->major, driver->minor, driver->patchlevel,
		 driver->date, dev->primary->index);

	return 0;

err_free:
	drm_dev_unref(dev);
	return ret;

}
EXPORT_SYMBOL(drm_get_usb_dev);

/**
 * drm_usb_init - Register matching USB devices with the DRM subsystem
 * @driver: DRM device driver
 * @udriver: USB device driver
 *
 * Registers one or more devices matched by a USB driver with the DRM
 * subsystem.
 *
 * Return: 0 on success or a negative error code on failure.
 */
int drm_usb_init(struct drm_driver *driver, struct usb_driver *udriver)
{
	int res;
	DRM_DEBUG("\n");

	res = usb_register(udriver);
	return res;
}
EXPORT_SYMBOL(drm_usb_init);

/**
 * drm_usb_exit - Unregister matching USB devices from the DRM subsystem
 * @driver: DRM device driver
 * @udriver: USB device driver
 *
 * Unregisters one or more devices matched by a USB driver from the DRM
 * subsystem.
 */
void drm_usb_exit(struct drm_driver *driver,
		  struct usb_driver *udriver)
{
	usb_deregister(udriver);
}
EXPORT_SYMBOL(drm_usb_exit);

MODULE_AUTHOR("David Airlie");
MODULE_DESCRIPTION("USB DRM support");
MODULE_LICENSE("GPL and additional rights");
+2 −1
Original line number Original line Diff line number Diff line
config DRM_UDL
config DRM_UDL
	tristate "DisplayLink"
	tristate "DisplayLink"
	depends on DRM
	depends on DRM
	depends on USB_SUPPORT
	depends on USB_ARCH_HAS_HCD
	depends on USB_ARCH_HAS_HCD
	select DRM_USB
	select USB
	select FB_SYS_FILLRECT
	select FB_SYS_FILLRECT
	select FB_SYS_COPYAREA
	select FB_SYS_COPYAREA
	select FB_SYS_IMAGEBLIT
	select FB_SYS_IMAGEBLIT
Loading