summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drmP.h7
-rw-r--r--linux-core/drm_bufs.c14
2 files changed, 19 insertions, 2 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index bbc7a237..e5789c65 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -851,7 +851,8 @@ extern int drm_addmap(struct inode *inode, struct file *filp,
extern int drm_rmmap(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
extern int drm_initmap(drm_device_t * dev, unsigned int offset,
- unsigned int size, int type, int flags);
+ unsigned int size, unsigned int resource, int type,
+ int flags);
extern int drm_addbufs(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
extern int drm_infobufs(struct inode *inode, struct file *filp,
@@ -863,6 +864,10 @@ extern int drm_freebufs(struct inode *inode, struct file *filp,
extern int drm_mapbufs(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
extern int drm_order(unsigned long size);
+extern unsigned long drm_get_resource_start(drm_device_t *dev,
+ unsigned int resource);
+extern unsigned long drm_get_resource_len(drm_device_t *dev,
+ unsigned int resource);
/* DMA support (drm_dma.h) */
extern int drm_dma_setup(drm_device_t * dev);
diff --git a/linux-core/drm_bufs.c b/linux-core/drm_bufs.c
index 97574a37..6339ac21 100644
--- a/linux-core/drm_bufs.c
+++ b/linux-core/drm_bufs.c
@@ -36,13 +36,25 @@
#include <linux/vmalloc.h>
#include "drmP.h"
+unsigned long drm_get_resource_start(drm_device_t *dev, unsigned int resource)
+{
+ return pci_resource_start(dev->pdev, resource);
+}
+EXPORT_SYMBOL(drm_get_resource_start);
+
+unsigned long drm_get_resource_len(drm_device_t *dev, unsigned int resource)
+{
+ return pci_resource_len(dev->pdev, resource);
+}
+EXPORT_SYMBOL(drm_get_resource_len);
+
/**
* Adjusts the memory offset to its absolute value according to the mapping
* type. Adds the map to the map list drm_device::maplist. Adds MTRR's where
* applicable and if supported by the kernel.
*/
int drm_initmap(drm_device_t * dev, unsigned int offset, unsigned int size,
- int type, int flags)
+ unsigned int resource, int type, int flags)
{
drm_map_t *map;
drm_map_list_t *list;