aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/drm_bufs.c2
-rw-r--r--drivers/gpu/drm/drm_proc.c21
-rw-r--r--include/drm/drmP.h5
3 files changed, 21 insertions, 7 deletions
diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c
index 72c667f9bee..f56bc66c38a 100644
--- a/drivers/gpu/drm/drm_bufs.c
+++ b/drivers/gpu/drm/drm_bufs.c
@@ -141,7 +141,7 @@ static int drm_addmap_core(struct drm_device * dev, unsigned int offset,
switch (map->type) {
case _DRM_REGISTERS:
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 ||
map->offset < virt_to_phys(high_memory)) {
drm_free(map, sizeof(*map), DRM_MEM_MAPS);
diff --git a/drivers/gpu/drm/drm_proc.c b/drivers/gpu/drm/drm_proc.c
index 8df849f6683..255b12f9a15 100644
--- a/drivers/gpu/drm/drm_proc.c
+++ b/drivers/gpu/drm/drm_proc.c
@@ -214,14 +214,23 @@ static int drm_name_info(char *buf, char **start, off_t offset, int request,
*eof = 0;
if (master->unique) {
- DRM_PROC_PRINT("%s %s %s\n",
- dev->driver->pci_driver.name,
- pci_name(dev->pdev), master->unique);
+ if (drm_core_is_platform(dev)) {
+ DRM_PROC_PRINT("%s %s %s\n", dev->driver->name,
+ dev_name(&dev->platform_dev->dev), master->unique);
+ } else {
+ DRM_PROC_PRINT("%s %s %s\n",
+ dev->driver->pci_driver.name,
+ pci_name(dev->pdev), master->unique);
+ }
} else {
- DRM_PROC_PRINT("%s %s\n", dev->driver->pci_driver.name,
- pci_name(dev->pdev));
+ if (drm_core_is_platform(dev)) {
+ DRM_PROC_PRINT("%s %s\n", dev->driver->name,
+ dev_name(&dev->platform_dev->dev));
+ } else {
+ DRM_PROC_PRINT("%s %s\n", dev->driver->pci_driver.name,
+ pci_name(dev->pdev));
+ }
}
-
if (len > request + offset)
return request;
*eof = 1;
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index ca7034ac11b..176fdc2c313 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1029,6 +1029,11 @@ static inline int drm_mtrr_del(int handle, unsigned long offset,
}
#endif
+static inline int drm_core_is_platform(struct drm_device *dev)
+{
+ return drm_core_check_feature(dev, DRIVER_IS_PLATFORM);
+}
+
/******************************************************************/
/** \name Internal function definitions */
/*@{*/