aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drmP.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/drm/drmP.h')
-rw-r--r--include/drm/drmP.h40
1 files changed, 6 insertions, 34 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 63d17ee9eb48..12083dc862a9 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -55,16 +55,13 @@
55#include <linux/mm.h> 55#include <linux/mm.h>
56#include <linux/cdev.h> 56#include <linux/cdev.h>
57#include <linux/mutex.h> 57#include <linux/mutex.h>
58#include <linux/io.h>
58#include <linux/slab.h> 59#include <linux/slab.h>
59#if defined(__alpha__) || defined(__powerpc__) 60#if defined(__alpha__) || defined(__powerpc__)
60#include <asm/pgtable.h> /* For pte_wrprotect */ 61#include <asm/pgtable.h> /* For pte_wrprotect */
61#endif 62#endif
62#include <asm/io.h>
63#include <asm/mman.h> 63#include <asm/mman.h>
64#include <asm/uaccess.h> 64#include <asm/uaccess.h>
65#ifdef CONFIG_MTRR
66#include <asm/mtrr.h>
67#endif
68#if defined(CONFIG_AGP) || defined(CONFIG_AGP_MODULE) 65#if defined(CONFIG_AGP) || defined(CONFIG_AGP_MODULE)
69#include <linux/types.h> 66#include <linux/types.h>
70#include <linux/agp_backend.h> 67#include <linux/agp_backend.h>
@@ -933,12 +930,15 @@ struct drm_driver {
933 struct dma_buf *dma_buf); 930 struct dma_buf *dma_buf);
934 /* low-level interface used by drm_gem_prime_{import,export} */ 931 /* low-level interface used by drm_gem_prime_{import,export} */
935 int (*gem_prime_pin)(struct drm_gem_object *obj); 932 int (*gem_prime_pin)(struct drm_gem_object *obj);
933 void (*gem_prime_unpin)(struct drm_gem_object *obj);
936 struct sg_table *(*gem_prime_get_sg_table)(struct drm_gem_object *obj); 934 struct sg_table *(*gem_prime_get_sg_table)(struct drm_gem_object *obj);
937 struct drm_gem_object *(*gem_prime_import_sg_table)( 935 struct drm_gem_object *(*gem_prime_import_sg_table)(
938 struct drm_device *dev, size_t size, 936 struct drm_device *dev, size_t size,
939 struct sg_table *sgt); 937 struct sg_table *sgt);
940 void *(*gem_prime_vmap)(struct drm_gem_object *obj); 938 void *(*gem_prime_vmap)(struct drm_gem_object *obj);
941 void (*gem_prime_vunmap)(struct drm_gem_object *obj, void *vaddr); 939 void (*gem_prime_vunmap)(struct drm_gem_object *obj, void *vaddr);
940 int (*gem_prime_mmap)(struct drm_gem_object *obj,
941 struct vm_area_struct *vma);
942 942
943 /* vga arb irq handler */ 943 /* vga arb irq handler */
944 void (*vgaarb_irq)(struct drm_device *dev, bool state); 944 void (*vgaarb_irq)(struct drm_device *dev, bool state);
@@ -1250,37 +1250,8 @@ static inline int drm_core_has_MTRR(struct drm_device *dev)
1250{ 1250{
1251 return drm_core_check_feature(dev, DRIVER_USE_MTRR); 1251 return drm_core_check_feature(dev, DRIVER_USE_MTRR);
1252} 1252}
1253
1254#define DRM_MTRR_WC MTRR_TYPE_WRCOMB
1255
1256static inline int drm_mtrr_add(unsigned long offset, unsigned long size,
1257 unsigned int flags)
1258{
1259 return mtrr_add(offset, size, flags, 1);
1260}
1261
1262static inline int drm_mtrr_del(int handle, unsigned long offset,
1263 unsigned long size, unsigned int flags)
1264{
1265 return mtrr_del(handle, offset, size);
1266}
1267
1268#else 1253#else
1269#define drm_core_has_MTRR(dev) (0) 1254#define drm_core_has_MTRR(dev) (0)
1270
1271#define DRM_MTRR_WC 0
1272
1273static inline int drm_mtrr_add(unsigned long offset, unsigned long size,
1274 unsigned int flags)
1275{
1276 return 0;
1277}
1278
1279static inline int drm_mtrr_del(int handle, unsigned long offset,
1280 unsigned long size, unsigned int flags)
1281{
1282 return 0;
1283}
1284#endif 1255#endif
1285 1256
1286static inline void drm_device_set_unplugged(struct drm_device *dev) 1257static inline void drm_device_set_unplugged(struct drm_device *dev)
@@ -1630,7 +1601,6 @@ extern void drm_sysfs_destroy(void);
1630extern int drm_sysfs_device_add(struct drm_minor *minor); 1601extern int drm_sysfs_device_add(struct drm_minor *minor);
1631extern void drm_sysfs_hotplug_event(struct drm_device *dev); 1602extern void drm_sysfs_hotplug_event(struct drm_device *dev);
1632extern void drm_sysfs_device_remove(struct drm_minor *minor); 1603extern void drm_sysfs_device_remove(struct drm_minor *minor);
1633extern char *drm_get_connector_status_name(enum drm_connector_status status);
1634extern int drm_sysfs_connector_add(struct drm_connector *connector); 1604extern int drm_sysfs_connector_add(struct drm_connector *connector);
1635extern void drm_sysfs_connector_remove(struct drm_connector *connector); 1605extern void drm_sysfs_connector_remove(struct drm_connector *connector);
1636 1606
@@ -1648,6 +1618,8 @@ int drm_gem_private_object_init(struct drm_device *dev,
1648void drm_gem_object_handle_free(struct drm_gem_object *obj); 1618void drm_gem_object_handle_free(struct drm_gem_object *obj);
1649void drm_gem_vm_open(struct vm_area_struct *vma); 1619void drm_gem_vm_open(struct vm_area_struct *vma);
1650void drm_gem_vm_close(struct vm_area_struct *vma); 1620void drm_gem_vm_close(struct vm_area_struct *vma);
1621int drm_gem_mmap_obj(struct drm_gem_object *obj, unsigned long obj_size,
1622 struct vm_area_struct *vma);
1651int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma); 1623int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma);
1652 1624
1653#include <drm/drm_global.h> 1625#include <drm/drm_global.h>