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

Commit db8cc27b authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge branch 'drm-platform' into drm-testing

* drm-platform:
  drm: Make sure the DRM offset matches the CPU
  drm: Add __arm defines to DRM
  drm: Add support for platform devices to register as DRM devices
  drm: Remove drm_resource wrappers
parents 6dbe7465 05269a3a
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -6,7 +6,7 @@
#
#
menuconfig DRM
menuconfig DRM
	tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)"
	tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)"
	depends on (AGP || AGP=n) && PCI && !EMULATED_CMPXCHG && MMU
	depends on (AGP || AGP=n) && !EMULATED_CMPXCHG && MMU
	select I2C
	select I2C
	select I2C_ALGOBIT
	select I2C_ALGOBIT
	select SLOW_WORK
	select SLOW_WORK
@@ -17,7 +17,7 @@ menuconfig DRM
	  These modules provide support for synchronization, security, and
	  These modules provide support for synchronization, security, and
	  DMA transfers. Please see <http://dri.sourceforge.net/> for more
	  DMA transfers. Please see <http://dri.sourceforge.net/> for more
	  details.  You should also select and configure AGP
	  details.  You should also select and configure AGP
	  (/dev/agpgart) support.
	  (/dev/agpgart) support if it is available for your platform.


config DRM_KMS_HELPER
config DRM_KMS_HELPER
	tristate
	tristate
+1 −1
Original line number Original line Diff line number Diff line
@@ -9,7 +9,7 @@ drm-y := drm_auth.o drm_buffer.o drm_bufs.o drm_cache.o \
		drm_drv.o drm_fops.o drm_gem.o drm_ioctl.o drm_irq.o \
		drm_drv.o drm_fops.o drm_gem.o drm_ioctl.o drm_irq.o \
		drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
		drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
		drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \
		drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \
		drm_sysfs.o drm_hashtab.o drm_sman.o drm_mm.o \
		drm_platform.o drm_sysfs.o drm_hashtab.o drm_sman.o drm_mm.o \
		drm_crtc.o drm_modes.o drm_edid.o \
		drm_crtc.o drm_modes.o drm_edid.o \
		drm_info.o drm_debugfs.o drm_encoder_slave.o
		drm_info.o drm_debugfs.o drm_encoder_slave.o


+1 −14
Original line number Original line Diff line number Diff line
@@ -39,19 +39,6 @@
#include <asm/shmparam.h>
#include <asm/shmparam.h>
#include "drmP.h"
#include "drmP.h"


resource_size_t drm_get_resource_start(struct drm_device *dev, unsigned int resource)
{
	return pci_resource_start(dev->pdev, resource);
}
EXPORT_SYMBOL(drm_get_resource_start);

resource_size_t drm_get_resource_len(struct drm_device *dev, unsigned int resource)
{
	return pci_resource_len(dev->pdev, resource);
}

EXPORT_SYMBOL(drm_get_resource_len);

static struct drm_map_list *drm_find_matching_map(struct drm_device *dev,
static struct drm_map_list *drm_find_matching_map(struct drm_device *dev,
						  struct drm_local_map *map)
						  struct drm_local_map *map)
{
{
@@ -189,7 +176,7 @@ static int drm_addmap_core(struct drm_device * dev, resource_size_t offset,
	switch (map->type) {
	switch (map->type) {
	case _DRM_REGISTERS:
	case _DRM_REGISTERS:
	case _DRM_FRAME_BUFFER:
	case _DRM_FRAME_BUFFER:
#if !defined(__sparc__) && !defined(__alpha__) && !defined(__ia64__) && !defined(__powerpc64__) && !defined(__x86_64__)
#if !defined(__sparc__) && !defined(__alpha__) && !defined(__ia64__) && !defined(__powerpc64__) && !defined(__x86_64__) && !defined(__arm__)
		if (map->offset + (map->size-1) < map->offset ||
		if (map->offset + (map->size-1) < map->offset ||
		    map->offset < virt_to_phys(high_memory)) {
		    map->offset < virt_to_phys(high_memory)) {
			kfree(map);
			kfree(map);
+5 −32
Original line number Original line Diff line number Diff line
@@ -243,47 +243,20 @@ int drm_lastclose(struct drm_device * dev)
 *
 *
 * Initializes an array of drm_device structures, and attempts to
 * Initializes an array of drm_device structures, and attempts to
 * initialize all available devices, using consecutive minors, registering the
 * initialize all available devices, using consecutive minors, registering the
 * stubs and initializing the AGP device.
 * stubs and initializing the device.
 *
 *
 * Expands the \c DRIVER_PREINIT and \c DRIVER_POST_INIT macros before and
 * Expands the \c DRIVER_PREINIT and \c DRIVER_POST_INIT macros before and
 * after the initialization for driver customization.
 * after the initialization for driver customization.
 */
 */
int drm_init(struct drm_driver *driver)
int drm_init(struct drm_driver *driver)
{
{
	struct pci_dev *pdev = NULL;
	const struct pci_device_id *pid;
	int i;

	DRM_DEBUG("\n");
	DRM_DEBUG("\n");

	INIT_LIST_HEAD(&driver->device_list);
	INIT_LIST_HEAD(&driver->device_list);


	if (driver->driver_features & DRIVER_MODESET)
	if (driver->driver_features & DRIVER_USE_PLATFORM_DEVICE)
		return pci_register_driver(&driver->pci_driver);
		return drm_platform_init(driver);

	else
	/* If not using KMS, fall back to stealth mode manual scanning. */
		return drm_pci_init(driver);
	for (i = 0; driver->pci_driver.id_table[i].vendor != 0; i++) {
		pid = &driver->pci_driver.id_table[i];

		/* Loop around setting up a DRM device for each PCI device
		 * matching our ID and device class.  If we had the internal
		 * function that pci_get_subsys and pci_get_class used, we'd
		 * be able to just pass pid in instead of doing a two-stage
		 * thing.
		 */
		pdev = NULL;
		while ((pdev =
			pci_get_subsys(pid->vendor, pid->device, pid->subvendor,
				       pid->subdevice, pdev)) != NULL) {
			if ((pdev->class & pid->class_mask) != pid->class)
				continue;

			/* stealth mode requires a manual probe */
			pci_dev_get(pdev);
			drm_get_dev(pdev, pid, driver);
		}
	}
	return 0;
}
}


EXPORT_SYMBOL(drm_init);
EXPORT_SYMBOL(drm_init);
+2 −2
Original line number Original line Diff line number Diff line
@@ -282,7 +282,7 @@ drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter)
	return block;
	return block;


carp:
carp:
	dev_warn(&connector->dev->pdev->dev, "%s: EDID block %d invalid.\n",
	dev_warn(connector->dev->dev, "%s: EDID block %d invalid.\n",
		 drm_get_connector_name(connector), j);
		 drm_get_connector_name(connector), j);


out:
out:
@@ -1626,7 +1626,7 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)
		return 0;
		return 0;
	}
	}
	if (!drm_edid_is_valid(edid)) {
	if (!drm_edid_is_valid(edid)) {
		dev_warn(&connector->dev->pdev->dev, "%s: EDID invalid.\n",
		dev_warn(connector->dev->dev, "%s: EDID invalid.\n",
			 drm_get_connector_name(connector));
			 drm_get_connector_name(connector));
		return 0;
		return 0;
	}
	}
Loading