diff options
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/Kbuild | 26 | ||||
-rw-r--r-- | include/drm/drm.h | 2 | ||||
-rw-r--r-- | include/drm/drmP.h | 82 | ||||
-rw-r--r-- | include/drm/drm_core.h | 2 | ||||
-rw-r--r-- | include/drm/drm_crtc.h | 40 | ||||
-rw-r--r-- | include/drm/drm_crtc_helper.h | 8 | ||||
-rw-r--r-- | include/drm/drm_edid.h | 6 | ||||
-rw-r--r-- | include/drm/drm_fb_helper.h | 5 | ||||
-rw-r--r-- | include/drm/drm_global.h | 53 | ||||
-rw-r--r-- | include/drm/drm_mm.h | 27 | ||||
-rw-r--r-- | include/drm/drm_mode.h | 1 | ||||
-rw-r--r-- | include/drm/drm_pciids.h | 7 | ||||
-rw-r--r-- | include/drm/i2c/sil164.h | 63 | ||||
-rw-r--r-- | include/drm/i915_drm.h | 14 | ||||
-rw-r--r-- | include/drm/nouveau_drm.h | 1 | ||||
-rw-r--r-- | include/drm/radeon_drm.h | 3 | ||||
-rw-r--r-- | include/drm/ttm/ttm_bo_driver.h | 7 | ||||
-rw-r--r-- | include/drm/ttm/ttm_module.h | 20 | ||||
-rw-r--r-- | include/drm/ttm/ttm_page_alloc.h | 4 | ||||
-rw-r--r-- | include/drm/vmwgfx_drm.h | 26 |
20 files changed, 295 insertions, 102 deletions
diff --git a/include/drm/Kbuild b/include/drm/Kbuild index bd3a1c2fbdb4..ffec177f3481 100644 --- a/include/drm/Kbuild +++ b/include/drm/Kbuild | |||
@@ -1,12 +1,14 @@ | |||
1 | unifdef-y += drm.h drm_sarea.h drm_mode.h | 1 | header-y += drm.h |
2 | unifdef-y += i810_drm.h | 2 | header-y += drm_mode.h |
3 | unifdef-y += i830_drm.h | 3 | header-y += drm_sarea.h |
4 | unifdef-y += i915_drm.h | 4 | header-y += i810_drm.h |
5 | unifdef-y += mga_drm.h | 5 | header-y += i830_drm.h |
6 | unifdef-y += r128_drm.h | 6 | header-y += i915_drm.h |
7 | unifdef-y += radeon_drm.h | 7 | header-y += mga_drm.h |
8 | unifdef-y += sis_drm.h | 8 | header-y += nouveau_drm.h |
9 | unifdef-y += savage_drm.h | 9 | header-y += r128_drm.h |
10 | unifdef-y += vmwgfx_drm.h | 10 | header-y += radeon_drm.h |
11 | unifdef-y += via_drm.h | 11 | header-y += savage_drm.h |
12 | unifdef-y += nouveau_drm.h | 12 | header-y += sis_drm.h |
13 | header-y += via_drm.h | ||
14 | header-y += vmwgfx_drm.h | ||
diff --git a/include/drm/drm.h b/include/drm/drm.h index e3f46e0cb7dc..e5f70617dec5 100644 --- a/include/drm/drm.h +++ b/include/drm/drm.h | |||
@@ -663,6 +663,8 @@ struct drm_gem_open { | |||
663 | #define DRM_IOCTL_UNLOCK DRM_IOW( 0x2b, struct drm_lock) | 663 | #define DRM_IOCTL_UNLOCK DRM_IOW( 0x2b, struct drm_lock) |
664 | #define DRM_IOCTL_FINISH DRM_IOW( 0x2c, struct drm_lock) | 664 | #define DRM_IOCTL_FINISH DRM_IOW( 0x2c, struct drm_lock) |
665 | 665 | ||
666 | #define DRM_IOCTL_GEM_PRIME_OPEN DRM_IOWR(0x2e, struct drm_gem_open) | ||
667 | |||
666 | #define DRM_IOCTL_AGP_ACQUIRE DRM_IO( 0x30) | 668 | #define DRM_IOCTL_AGP_ACQUIRE DRM_IO( 0x30) |
667 | #define DRM_IOCTL_AGP_RELEASE DRM_IO( 0x31) | 669 | #define DRM_IOCTL_AGP_RELEASE DRM_IO( 0x31) |
668 | #define DRM_IOCTL_AGP_ENABLE DRM_IOW( 0x32, struct drm_agp_mode) | 670 | #define DRM_IOCTL_AGP_ENABLE DRM_IOW( 0x32, struct drm_agp_mode) |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index c1b987158dfa..2a512bc0d4ab 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -9,6 +9,7 @@ | |||
9 | /* | 9 | /* |
10 | * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. | 10 | * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. |
11 | * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. | 11 | * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. |
12 | * Copyright (c) 2009-2010, Code Aurora Forum. | ||
12 | * All rights reserved. | 13 | * All rights reserved. |
13 | * | 14 | * |
14 | * Permission is hereby granted, free of charge, to any person obtaining a | 15 | * Permission is hereby granted, free of charge, to any person obtaining a |
@@ -48,9 +49,9 @@ | |||
48 | #include <linux/proc_fs.h> | 49 | #include <linux/proc_fs.h> |
49 | #include <linux/init.h> | 50 | #include <linux/init.h> |
50 | #include <linux/file.h> | 51 | #include <linux/file.h> |
52 | #include <linux/platform_device.h> | ||
51 | #include <linux/pci.h> | 53 | #include <linux/pci.h> |
52 | #include <linux/jiffies.h> | 54 | #include <linux/jiffies.h> |
53 | #include <linux/smp_lock.h> /* For (un)lock_kernel */ | ||
54 | #include <linux/dma-mapping.h> | 55 | #include <linux/dma-mapping.h> |
55 | #include <linux/mm.h> | 56 | #include <linux/mm.h> |
56 | #include <linux/cdev.h> | 57 | #include <linux/cdev.h> |
@@ -144,6 +145,7 @@ extern void drm_ut_debug_printk(unsigned int request_level, | |||
144 | #define DRIVER_IRQ_VBL2 0x800 | 145 | #define DRIVER_IRQ_VBL2 0x800 |
145 | #define DRIVER_GEM 0x1000 | 146 | #define DRIVER_GEM 0x1000 |
146 | #define DRIVER_MODESET 0x2000 | 147 | #define DRIVER_MODESET 0x2000 |
148 | #define DRIVER_USE_PLATFORM_DEVICE 0x4000 | ||
147 | 149 | ||
148 | /***********************************************************************/ | 150 | /***********************************************************************/ |
149 | /** \name Begin the DRM... */ | 151 | /** \name Begin the DRM... */ |
@@ -403,6 +405,8 @@ struct drm_pending_event { | |||
403 | struct drm_event *event; | 405 | struct drm_event *event; |
404 | struct list_head link; | 406 | struct list_head link; |
405 | struct drm_file *file_priv; | 407 | struct drm_file *file_priv; |
408 | pid_t pid; /* pid of requester, no guarantee it's valid by the time | ||
409 | we deliver the event, for tracing only */ | ||
406 | void (*destroy)(struct drm_pending_event *event); | 410 | void (*destroy)(struct drm_pending_event *event); |
407 | }; | 411 | }; |
408 | 412 | ||
@@ -823,6 +827,7 @@ struct drm_driver { | |||
823 | int num_ioctls; | 827 | int num_ioctls; |
824 | struct file_operations fops; | 828 | struct file_operations fops; |
825 | struct pci_driver pci_driver; | 829 | struct pci_driver pci_driver; |
830 | struct platform_device *platform_device; | ||
826 | /* List of devices hanging off this driver */ | 831 | /* List of devices hanging off this driver */ |
827 | struct list_head device_list; | 832 | struct list_head device_list; |
828 | }; | 833 | }; |
@@ -1015,12 +1020,16 @@ struct drm_device { | |||
1015 | 1020 | ||
1016 | struct drm_agp_head *agp; /**< AGP data */ | 1021 | struct drm_agp_head *agp; /**< AGP data */ |
1017 | 1022 | ||
1023 | struct device *dev; /**< Device structure */ | ||
1018 | struct pci_dev *pdev; /**< PCI device structure */ | 1024 | struct pci_dev *pdev; /**< PCI device structure */ |
1019 | int pci_vendor; /**< PCI vendor id */ | 1025 | int pci_vendor; /**< PCI vendor id */ |
1020 | int pci_device; /**< PCI device id */ | 1026 | int pci_device; /**< PCI device id */ |
1021 | #ifdef __alpha__ | 1027 | #ifdef __alpha__ |
1022 | struct pci_controller *hose; | 1028 | struct pci_controller *hose; |
1023 | #endif | 1029 | #endif |
1030 | |||
1031 | struct platform_device *platformdev; /**< Platform device struture */ | ||
1032 | |||
1024 | struct drm_sg_mem *sg; /**< Scatter gather memory */ | 1033 | struct drm_sg_mem *sg; /**< Scatter gather memory */ |
1025 | int num_crtcs; /**< Number of CRTCs on this device */ | 1034 | int num_crtcs; /**< Number of CRTCs on this device */ |
1026 | void *dev_private; /**< device private data */ | 1035 | void *dev_private; /**< device private data */ |
@@ -1060,22 +1069,36 @@ struct drm_device { | |||
1060 | 1069 | ||
1061 | }; | 1070 | }; |
1062 | 1071 | ||
1063 | static inline int drm_dev_to_irq(struct drm_device *dev) | ||
1064 | { | ||
1065 | return dev->pdev->irq; | ||
1066 | } | ||
1067 | |||
1068 | static __inline__ int drm_core_check_feature(struct drm_device *dev, | 1072 | static __inline__ int drm_core_check_feature(struct drm_device *dev, |
1069 | int feature) | 1073 | int feature) |
1070 | { | 1074 | { |
1071 | return ((dev->driver->driver_features & feature) ? 1 : 0); | 1075 | return ((dev->driver->driver_features & feature) ? 1 : 0); |
1072 | } | 1076 | } |
1073 | 1077 | ||
1074 | #ifdef __alpha__ | 1078 | static inline int drm_dev_to_irq(struct drm_device *dev) |
1075 | #define drm_get_pci_domain(dev) dev->hose->index | 1079 | { |
1076 | #else | 1080 | if (drm_core_check_feature(dev, DRIVER_USE_PLATFORM_DEVICE)) |
1077 | #define drm_get_pci_domain(dev) 0 | 1081 | return platform_get_irq(dev->platformdev, 0); |
1078 | #endif | 1082 | else |
1083 | return dev->pdev->irq; | ||
1084 | } | ||
1085 | |||
1086 | static inline int drm_get_pci_domain(struct drm_device *dev) | ||
1087 | { | ||
1088 | if (drm_core_check_feature(dev, DRIVER_USE_PLATFORM_DEVICE)) | ||
1089 | return 0; | ||
1090 | |||
1091 | #ifndef __alpha__ | ||
1092 | /* For historical reasons, drm_get_pci_domain() is busticated | ||
1093 | * on most archs and has to remain so for userspace interface | ||
1094 | * < 1.4, except on alpha which was right from the beginning | ||
1095 | */ | ||
1096 | if (dev->if_version < 0x10004) | ||
1097 | return 0; | ||
1098 | #endif /* __alpha__ */ | ||
1099 | |||
1100 | return pci_domain_nr(dev->pdev->bus); | ||
1101 | } | ||
1079 | 1102 | ||
1080 | #if __OS_HAS_AGP | 1103 | #if __OS_HAS_AGP |
1081 | static inline int drm_core_has_AGP(struct drm_device *dev) | 1104 | static inline int drm_core_has_AGP(struct drm_device *dev) |
@@ -1138,6 +1161,7 @@ extern long drm_compat_ioctl(struct file *filp, | |||
1138 | extern int drm_lastclose(struct drm_device *dev); | 1161 | extern int drm_lastclose(struct drm_device *dev); |
1139 | 1162 | ||
1140 | /* Device support (drm_fops.h) */ | 1163 | /* Device support (drm_fops.h) */ |
1164 | extern struct mutex drm_global_mutex; | ||
1141 | extern int drm_open(struct inode *inode, struct file *filp); | 1165 | extern int drm_open(struct inode *inode, struct file *filp); |
1142 | extern int drm_stub_open(struct inode *inode, struct file *filp); | 1166 | extern int drm_stub_open(struct inode *inode, struct file *filp); |
1143 | extern int drm_fasync(int fd, struct file *filp, int on); | 1167 | extern int drm_fasync(int fd, struct file *filp, int on); |
@@ -1273,10 +1297,6 @@ extern int drm_freebufs(struct drm_device *dev, void *data, | |||
1273 | extern int drm_mapbufs(struct drm_device *dev, void *data, | 1297 | extern int drm_mapbufs(struct drm_device *dev, void *data, |
1274 | struct drm_file *file_priv); | 1298 | struct drm_file *file_priv); |
1275 | extern int drm_order(unsigned long size); | 1299 | extern int drm_order(unsigned long size); |
1276 | extern resource_size_t drm_get_resource_start(struct drm_device *dev, | ||
1277 | unsigned int resource); | ||
1278 | extern resource_size_t drm_get_resource_len(struct drm_device *dev, | ||
1279 | unsigned int resource); | ||
1280 | 1300 | ||
1281 | /* DMA support (drm_dma.h) */ | 1301 | /* DMA support (drm_dma.h) */ |
1282 | extern int drm_dma_setup(struct drm_device *dev); | 1302 | extern int drm_dma_setup(struct drm_device *dev); |
@@ -1351,8 +1371,11 @@ extern int drm_dropmaster_ioctl(struct drm_device *dev, void *data, | |||
1351 | struct drm_master *drm_master_create(struct drm_minor *minor); | 1371 | struct drm_master *drm_master_create(struct drm_minor *minor); |
1352 | extern struct drm_master *drm_master_get(struct drm_master *master); | 1372 | extern struct drm_master *drm_master_get(struct drm_master *master); |
1353 | extern void drm_master_put(struct drm_master **master); | 1373 | extern void drm_master_put(struct drm_master **master); |
1354 | extern int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent, | 1374 | extern int drm_get_pci_dev(struct pci_dev *pdev, |
1355 | struct drm_driver *driver); | 1375 | const struct pci_device_id *ent, |
1376 | struct drm_driver *driver); | ||
1377 | extern int drm_get_platform_dev(struct platform_device *pdev, | ||
1378 | struct drm_driver *driver); | ||
1356 | extern void drm_put_dev(struct drm_device *dev); | 1379 | extern void drm_put_dev(struct drm_device *dev); |
1357 | extern int drm_put_minor(struct drm_minor **minor); | 1380 | extern int drm_put_minor(struct drm_minor **minor); |
1358 | extern unsigned int drm_debug; | 1381 | extern unsigned int drm_debug; |
@@ -1440,6 +1463,8 @@ void drm_gem_vm_open(struct vm_area_struct *vma); | |||
1440 | void drm_gem_vm_close(struct vm_area_struct *vma); | 1463 | void drm_gem_vm_close(struct vm_area_struct *vma); |
1441 | int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma); | 1464 | int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma); |
1442 | 1465 | ||
1466 | #include "drm_global.h" | ||
1467 | |||
1443 | static inline void | 1468 | static inline void |
1444 | drm_gem_object_reference(struct drm_gem_object *obj) | 1469 | drm_gem_object_reference(struct drm_gem_object *obj) |
1445 | { | 1470 | { |
@@ -1529,6 +1554,9 @@ static __inline__ struct drm_local_map *drm_core_findmap(struct drm_device *dev, | |||
1529 | 1554 | ||
1530 | static __inline__ int drm_device_is_agp(struct drm_device *dev) | 1555 | static __inline__ int drm_device_is_agp(struct drm_device *dev) |
1531 | { | 1556 | { |
1557 | if (drm_core_check_feature(dev, DRIVER_USE_PLATFORM_DEVICE)) | ||
1558 | return 0; | ||
1559 | |||
1532 | if (dev->driver->device_is_agp != NULL) { | 1560 | if (dev->driver->device_is_agp != NULL) { |
1533 | int err = (*dev->driver->device_is_agp) (dev); | 1561 | int err = (*dev->driver->device_is_agp) (dev); |
1534 | 1562 | ||
@@ -1542,7 +1570,10 @@ static __inline__ int drm_device_is_agp(struct drm_device *dev) | |||
1542 | 1570 | ||
1543 | static __inline__ int drm_device_is_pcie(struct drm_device *dev) | 1571 | static __inline__ int drm_device_is_pcie(struct drm_device *dev) |
1544 | { | 1572 | { |
1545 | return pci_find_capability(dev->pdev, PCI_CAP_ID_EXP); | 1573 | if (drm_core_check_feature(dev, DRIVER_USE_PLATFORM_DEVICE)) |
1574 | return 0; | ||
1575 | else | ||
1576 | return pci_find_capability(dev->pdev, PCI_CAP_ID_EXP); | ||
1546 | } | 1577 | } |
1547 | 1578 | ||
1548 | static __inline__ void drm_core_dropmap(struct drm_local_map *map) | 1579 | static __inline__ void drm_core_dropmap(struct drm_local_map *map) |
@@ -1550,6 +1581,21 @@ static __inline__ void drm_core_dropmap(struct drm_local_map *map) | |||
1550 | } | 1581 | } |
1551 | 1582 | ||
1552 | #include "drm_mem_util.h" | 1583 | #include "drm_mem_util.h" |
1584 | |||
1585 | static inline void *drm_get_device(struct drm_device *dev) | ||
1586 | { | ||
1587 | if (drm_core_check_feature(dev, DRIVER_USE_PLATFORM_DEVICE)) | ||
1588 | return dev->platformdev; | ||
1589 | else | ||
1590 | return dev->pdev; | ||
1591 | } | ||
1592 | |||
1593 | extern int drm_platform_init(struct drm_driver *driver); | ||
1594 | extern int drm_pci_init(struct drm_driver *driver); | ||
1595 | extern int drm_fill_in_dev(struct drm_device *dev, | ||
1596 | const struct pci_device_id *ent, | ||
1597 | struct drm_driver *driver); | ||
1598 | int drm_get_minor(struct drm_device *dev, struct drm_minor **minor, int type); | ||
1553 | /*@}*/ | 1599 | /*@}*/ |
1554 | 1600 | ||
1555 | #endif /* __KERNEL__ */ | 1601 | #endif /* __KERNEL__ */ |
diff --git a/include/drm/drm_core.h b/include/drm/drm_core.h index 316739036079..4e7523863a4b 100644 --- a/include/drm/drm_core.h +++ b/include/drm/drm_core.h | |||
@@ -27,7 +27,7 @@ | |||
27 | #define CORE_DATE "20060810" | 27 | #define CORE_DATE "20060810" |
28 | 28 | ||
29 | #define DRM_IF_MAJOR 1 | 29 | #define DRM_IF_MAJOR 1 |
30 | #define DRM_IF_MINOR 3 | 30 | #define DRM_IF_MINOR 4 |
31 | 31 | ||
32 | #define CORE_MAJOR 1 | 32 | #define CORE_MAJOR 1 |
33 | #define CORE_MINOR 1 | 33 | #define CORE_MINOR 1 |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 93a1a31b9c2d..c9f3cc5949a8 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/idr.h> | 31 | #include <linux/idr.h> |
32 | 32 | ||
33 | #include <linux/fb.h> | 33 | #include <linux/fb.h> |
34 | #include <linux/slow-work.h> | ||
35 | 34 | ||
36 | struct drm_device; | 35 | struct drm_device; |
37 | struct drm_mode_set; | 36 | struct drm_mode_set; |
@@ -190,49 +189,16 @@ enum subpixel_order { | |||
190 | */ | 189 | */ |
191 | struct drm_display_info { | 190 | struct drm_display_info { |
192 | char name[DRM_DISPLAY_INFO_LEN]; | 191 | char name[DRM_DISPLAY_INFO_LEN]; |
193 | /* Input info */ | 192 | |
194 | bool serration_vsync; | ||
195 | bool sync_on_green; | ||
196 | bool composite_sync; | ||
197 | bool separate_syncs; | ||
198 | bool blank_to_black; | ||
199 | unsigned char video_level; | ||
200 | bool digital; | ||
201 | /* Physical size */ | 193 | /* Physical size */ |
202 | unsigned int width_mm; | 194 | unsigned int width_mm; |
203 | unsigned int height_mm; | 195 | unsigned int height_mm; |
204 | 196 | ||
205 | /* Display parameters */ | ||
206 | unsigned char gamma; /* FIXME: storage format */ | ||
207 | bool gtf_supported; | ||
208 | bool standard_color; | ||
209 | enum { | ||
210 | monochrome = 0, | ||
211 | rgb, | ||
212 | other, | ||
213 | unknown, | ||
214 | } display_type; | ||
215 | bool active_off_supported; | ||
216 | bool suspend_supported; | ||
217 | bool standby_supported; | ||
218 | |||
219 | /* Color info FIXME: storage format */ | ||
220 | unsigned short redx, redy; | ||
221 | unsigned short greenx, greeny; | ||
222 | unsigned short bluex, bluey; | ||
223 | unsigned short whitex, whitey; | ||
224 | |||
225 | /* Clock limits FIXME: storage format */ | 197 | /* Clock limits FIXME: storage format */ |
226 | unsigned int min_vfreq, max_vfreq; | 198 | unsigned int min_vfreq, max_vfreq; |
227 | unsigned int min_hfreq, max_hfreq; | 199 | unsigned int min_hfreq, max_hfreq; |
228 | unsigned int pixel_clock; | 200 | unsigned int pixel_clock; |
229 | 201 | ||
230 | /* White point indices FIXME: storage format */ | ||
231 | unsigned int wpx1, wpy1; | ||
232 | unsigned int wpgamma1; | ||
233 | unsigned int wpx2, wpy2; | ||
234 | unsigned int wpgamma2; | ||
235 | |||
236 | enum subpixel_order subpixel_order; | 202 | enum subpixel_order subpixel_order; |
237 | 203 | ||
238 | char *raw_edid; /* if any */ | 204 | char *raw_edid; /* if any */ |
@@ -343,7 +309,7 @@ struct drm_crtc_funcs { | |||
343 | 309 | ||
344 | /* Set gamma on the CRTC */ | 310 | /* Set gamma on the CRTC */ |
345 | void (*gamma_set)(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b, | 311 | void (*gamma_set)(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b, |
346 | uint32_t size); | 312 | uint32_t start, uint32_t size); |
347 | /* Object destroy routine */ | 313 | /* Object destroy routine */ |
348 | void (*destroy)(struct drm_crtc *crtc); | 314 | void (*destroy)(struct drm_crtc *crtc); |
349 | 315 | ||
@@ -595,7 +561,7 @@ struct drm_mode_config { | |||
595 | 561 | ||
596 | /* output poll support */ | 562 | /* output poll support */ |
597 | bool poll_enabled; | 563 | bool poll_enabled; |
598 | struct delayed_slow_work output_poll_slow_work; | 564 | struct delayed_work output_poll_work; |
599 | 565 | ||
600 | /* pointers to standard properties */ | 566 | /* pointers to standard properties */ |
601 | struct list_head property_blob_list; | 567 | struct list_head property_blob_list; |
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h index dc5873c21e45..59b7073b13fe 100644 --- a/include/drm/drm_crtc_helper.h +++ b/include/drm/drm_crtc_helper.h | |||
@@ -60,9 +60,14 @@ struct drm_crtc_helper_funcs { | |||
60 | /* Move the crtc on the current fb to the given position *optional* */ | 60 | /* Move the crtc on the current fb to the given position *optional* */ |
61 | int (*mode_set_base)(struct drm_crtc *crtc, int x, int y, | 61 | int (*mode_set_base)(struct drm_crtc *crtc, int x, int y, |
62 | struct drm_framebuffer *old_fb); | 62 | struct drm_framebuffer *old_fb); |
63 | int (*mode_set_base_atomic)(struct drm_crtc *crtc, | ||
64 | struct drm_framebuffer *fb, int x, int y); | ||
63 | 65 | ||
64 | /* reload the current crtc LUT */ | 66 | /* reload the current crtc LUT */ |
65 | void (*load_lut)(struct drm_crtc *crtc); | 67 | void (*load_lut)(struct drm_crtc *crtc); |
68 | |||
69 | /* disable crtc when not in use - more explicit than dpms off */ | ||
70 | void (*disable)(struct drm_crtc *crtc); | ||
66 | }; | 71 | }; |
67 | 72 | ||
68 | struct drm_encoder_helper_funcs { | 73 | struct drm_encoder_helper_funcs { |
@@ -130,4 +135,7 @@ extern int drm_helper_resume_force_mode(struct drm_device *dev); | |||
130 | extern void drm_kms_helper_poll_init(struct drm_device *dev); | 135 | extern void drm_kms_helper_poll_init(struct drm_device *dev); |
131 | extern void drm_kms_helper_poll_fini(struct drm_device *dev); | 136 | extern void drm_kms_helper_poll_fini(struct drm_device *dev); |
132 | extern void drm_helper_hpd_irq_event(struct drm_device *dev); | 137 | extern void drm_helper_hpd_irq_event(struct drm_device *dev); |
138 | |||
139 | extern void drm_kms_helper_poll_disable(struct drm_device *dev); | ||
140 | extern void drm_kms_helper_poll_enable(struct drm_device *dev); | ||
133 | #endif | 141 | #endif |
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index 39e2cc5c7e66..5881fad91faa 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h | |||
@@ -28,6 +28,12 @@ | |||
28 | #define EDID_LENGTH 128 | 28 | #define EDID_LENGTH 128 |
29 | #define DDC_ADDR 0x50 | 29 | #define DDC_ADDR 0x50 |
30 | 30 | ||
31 | #define CEA_EXT 0x02 | ||
32 | #define VTB_EXT 0x10 | ||
33 | #define DI_EXT 0x40 | ||
34 | #define LS_EXT 0x50 | ||
35 | #define MI_EXT 0x60 | ||
36 | |||
31 | struct est_timings { | 37 | struct est_timings { |
32 | u8 t1; | 38 | u8 t1; |
33 | u8 t2; | 39 | u8 t2; |
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index f0a6afc47e76..f22e7fe4b6db 100644 --- a/include/drm/drm_fb_helper.h +++ b/include/drm/drm_fb_helper.h | |||
@@ -32,6 +32,8 @@ | |||
32 | 32 | ||
33 | struct drm_fb_helper; | 33 | struct drm_fb_helper; |
34 | 34 | ||
35 | #include <linux/kgdb.h> | ||
36 | |||
35 | struct drm_fb_helper_crtc { | 37 | struct drm_fb_helper_crtc { |
36 | uint32_t crtc_id; | 38 | uint32_t crtc_id; |
37 | struct drm_mode_set mode_set; | 39 | struct drm_mode_set mode_set; |
@@ -78,6 +80,7 @@ struct drm_fb_helper_connector { | |||
78 | 80 | ||
79 | struct drm_fb_helper { | 81 | struct drm_fb_helper { |
80 | struct drm_framebuffer *fb; | 82 | struct drm_framebuffer *fb; |
83 | struct drm_framebuffer *saved_fb; | ||
81 | struct drm_device *dev; | 84 | struct drm_device *dev; |
82 | struct drm_display_mode *mode; | 85 | struct drm_display_mode *mode; |
83 | int crtc_count; | 86 | int crtc_count; |
@@ -126,5 +129,7 @@ int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info); | |||
126 | bool drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper); | 129 | bool drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper); |
127 | bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel); | 130 | bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel); |
128 | int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper); | 131 | int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper); |
132 | int drm_fb_helper_debug_enter(struct fb_info *info); | ||
133 | int drm_fb_helper_debug_leave(struct fb_info *info); | ||
129 | 134 | ||
130 | #endif | 135 | #endif |
diff --git a/include/drm/drm_global.h b/include/drm/drm_global.h new file mode 100644 index 000000000000..a06805eaf649 --- /dev/null +++ b/include/drm/drm_global.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /************************************************************************** | ||
2 | * | ||
3 | * Copyright 2008-2009 VMware, Inc., Palo Alto, CA., USA | ||
4 | * All Rights Reserved. | ||
5 | * | ||
6 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
7 | * copy of this software and associated documentation files (the | ||
8 | * "Software"), to deal in the Software without restriction, including | ||
9 | * without limitation the rights to use, copy, modify, merge, publish, | ||
10 | * distribute, sub license, and/or sell copies of the Software, and to | ||
11 | * permit persons to whom the Software is furnished to do so, subject to | ||
12 | * the following conditions: | ||
13 | * | ||
14 | * The above copyright notice and this permission notice (including the | ||
15 | * next paragraph) shall be included in all copies or substantial portions | ||
16 | * of the Software. | ||
17 | * | ||
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL | ||
21 | * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, | ||
22 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
23 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
24 | * USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
25 | * | ||
26 | **************************************************************************/ | ||
27 | /* | ||
28 | * Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com> | ||
29 | */ | ||
30 | |||
31 | #ifndef _DRM_GLOBAL_H_ | ||
32 | #define _DRM_GLOBAL_H_ | ||
33 | enum drm_global_types { | ||
34 | DRM_GLOBAL_TTM_MEM = 0, | ||
35 | DRM_GLOBAL_TTM_BO, | ||
36 | DRM_GLOBAL_TTM_OBJECT, | ||
37 | DRM_GLOBAL_NUM | ||
38 | }; | ||
39 | |||
40 | struct drm_global_reference { | ||
41 | enum drm_global_types global_type; | ||
42 | size_t size; | ||
43 | void *object; | ||
44 | int (*init) (struct drm_global_reference *); | ||
45 | void (*release) (struct drm_global_reference *); | ||
46 | }; | ||
47 | |||
48 | extern void drm_global_init(void); | ||
49 | extern void drm_global_release(void); | ||
50 | extern int drm_global_item_ref(struct drm_global_reference *ref); | ||
51 | extern void drm_global_item_unref(struct drm_global_reference *ref); | ||
52 | |||
53 | #endif | ||
diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h index 4c10be39a43b..bf01531193d5 100644 --- a/include/drm/drm_mm.h +++ b/include/drm/drm_mm.h | |||
@@ -42,21 +42,31 @@ | |||
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | struct drm_mm_node { | 44 | struct drm_mm_node { |
45 | struct list_head fl_entry; | 45 | struct list_head free_stack; |
46 | struct list_head ml_entry; | 46 | struct list_head node_list; |
47 | int free; | 47 | unsigned free : 1; |
48 | unsigned scanned_block : 1; | ||
49 | unsigned scanned_prev_free : 1; | ||
50 | unsigned scanned_next_free : 1; | ||
48 | unsigned long start; | 51 | unsigned long start; |
49 | unsigned long size; | 52 | unsigned long size; |
50 | struct drm_mm *mm; | 53 | struct drm_mm *mm; |
51 | void *private; | ||
52 | }; | 54 | }; |
53 | 55 | ||
54 | struct drm_mm { | 56 | struct drm_mm { |
55 | struct list_head fl_entry; | 57 | /* List of free memory blocks, most recently freed ordered. */ |
56 | struct list_head ml_entry; | 58 | struct list_head free_stack; |
59 | /* List of all memory nodes, ordered according to the (increasing) start | ||
60 | * address of the memory node. */ | ||
61 | struct list_head node_list; | ||
57 | struct list_head unused_nodes; | 62 | struct list_head unused_nodes; |
58 | int num_unused; | 63 | int num_unused; |
59 | spinlock_t unused_lock; | 64 | spinlock_t unused_lock; |
65 | unsigned scan_alignment; | ||
66 | unsigned long scan_size; | ||
67 | unsigned long scan_hit_start; | ||
68 | unsigned scan_hit_size; | ||
69 | unsigned scanned_blocks; | ||
60 | }; | 70 | }; |
61 | 71 | ||
62 | /* | 72 | /* |
@@ -133,6 +143,11 @@ static inline struct drm_mm *drm_get_mm(struct drm_mm_node *block) | |||
133 | return block->mm; | 143 | return block->mm; |
134 | } | 144 | } |
135 | 145 | ||
146 | void drm_mm_init_scan(struct drm_mm *mm, unsigned long size, | ||
147 | unsigned alignment); | ||
148 | int drm_mm_scan_add_block(struct drm_mm_node *node); | ||
149 | int drm_mm_scan_remove_block(struct drm_mm_node *node); | ||
150 | |||
136 | extern void drm_mm_debug_table(struct drm_mm *mm, const char *prefix); | 151 | extern void drm_mm_debug_table(struct drm_mm *mm, const char *prefix); |
137 | #ifdef CONFIG_DEBUG_FS | 152 | #ifdef CONFIG_DEBUG_FS |
138 | int drm_mm_dump_table(struct seq_file *m, struct drm_mm *mm); | 153 | int drm_mm_dump_table(struct seq_file *m, struct drm_mm *mm); |
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index c5ba1636613c..0fc7397c8f1f 100644 --- a/include/drm/drm_mode.h +++ b/include/drm/drm_mode.h | |||
@@ -74,6 +74,7 @@ | |||
74 | /* Dithering mode options */ | 74 | /* Dithering mode options */ |
75 | #define DRM_MODE_DITHERING_OFF 0 | 75 | #define DRM_MODE_DITHERING_OFF 0 |
76 | #define DRM_MODE_DITHERING_ON 1 | 76 | #define DRM_MODE_DITHERING_ON 1 |
77 | #define DRM_MODE_DITHERING_AUTO 2 | ||
77 | 78 | ||
78 | /* Dirty info options */ | 79 | /* Dirty info options */ |
79 | #define DRM_MODE_DIRTY_OFF 0 | 80 | #define DRM_MODE_DIRTY_OFF 0 |
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 2d428b088cc8..3a9940ef728b 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
@@ -146,6 +146,8 @@ | |||
146 | {0x1002, 0x6888, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | 146 | {0x1002, 0x6888, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ |
147 | {0x1002, 0x6889, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | 147 | {0x1002, 0x6889, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ |
148 | {0x1002, 0x688A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | 148 | {0x1002, 0x688A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ |
149 | {0x1002, 0x688C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | ||
150 | {0x1002, 0x688D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | ||
149 | {0x1002, 0x6898, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | 151 | {0x1002, 0x6898, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ |
150 | {0x1002, 0x6899, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | 152 | {0x1002, 0x6899, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ |
151 | {0x1002, 0x689c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_HEMLOCK|RADEON_NEW_MEMMAP}, \ | 153 | {0x1002, 0x689c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_HEMLOCK|RADEON_NEW_MEMMAP}, \ |
@@ -161,6 +163,7 @@ | |||
161 | {0x1002, 0x68be, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \ | 163 | {0x1002, 0x68be, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \ |
162 | {0x1002, 0x68c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 164 | {0x1002, 0x68c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
163 | {0x1002, 0x68c1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 165 | {0x1002, 0x68c1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
166 | {0x1002, 0x68c7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
164 | {0x1002, 0x68c8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \ | 167 | {0x1002, 0x68c8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \ |
165 | {0x1002, 0x68c9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \ | 168 | {0x1002, 0x68c9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \ |
166 | {0x1002, 0x68d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \ | 169 | {0x1002, 0x68d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \ |
@@ -174,6 +177,7 @@ | |||
174 | {0x1002, 0x68e8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ | 177 | {0x1002, 0x68e8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ |
175 | {0x1002, 0x68e9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ | 178 | {0x1002, 0x68e9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ |
176 | {0x1002, 0x68f1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ | 179 | {0x1002, 0x68f1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ |
180 | {0x1002, 0x68f2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ | ||
177 | {0x1002, 0x68f8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ | 181 | {0x1002, 0x68f8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ |
178 | {0x1002, 0x68f9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ | 182 | {0x1002, 0x68f9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ |
179 | {0x1002, 0x68fe, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ | 183 | {0x1002, 0x68fe, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ |
@@ -314,6 +318,7 @@ | |||
314 | {0x1002, 0x9456, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ | 318 | {0x1002, 0x9456, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ |
315 | {0x1002, 0x945A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 319 | {0x1002, 0x945A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
316 | {0x1002, 0x945B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 320 | {0x1002, 0x945B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
321 | {0x1002, 0x945E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
317 | {0x1002, 0x9460, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ | 322 | {0x1002, 0x9460, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ |
318 | {0x1002, 0x9462, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ | 323 | {0x1002, 0x9462, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ |
319 | {0x1002, 0x946A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 324 | {0x1002, 0x946A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
@@ -324,6 +329,7 @@ | |||
324 | {0x1002, 0x9487, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ | 329 | {0x1002, 0x9487, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ |
325 | {0x1002, 0x9488, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 330 | {0x1002, 0x9488, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
326 | {0x1002, 0x9489, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 331 | {0x1002, 0x9489, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
332 | {0x1002, 0x948A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
327 | {0x1002, 0x948F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ | 333 | {0x1002, 0x948F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ |
328 | {0x1002, 0x9490, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ | 334 | {0x1002, 0x9490, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ |
329 | {0x1002, 0x9491, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 335 | {0x1002, 0x9491, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
@@ -366,6 +372,7 @@ | |||
366 | {0x1002, 0x9553, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 372 | {0x1002, 0x9553, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
367 | {0x1002, 0x9555, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 373 | {0x1002, 0x9555, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
368 | {0x1002, 0x9557, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 374 | {0x1002, 0x9557, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
375 | {0x1002, 0x955f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
369 | {0x1002, 0x9580, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_NEW_MEMMAP}, \ | 376 | {0x1002, 0x9580, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_NEW_MEMMAP}, \ |
370 | {0x1002, 0x9581, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 377 | {0x1002, 0x9581, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
371 | {0x1002, 0x9583, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 378 | {0x1002, 0x9583, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
diff --git a/include/drm/i2c/sil164.h b/include/drm/i2c/sil164.h new file mode 100644 index 000000000000..205e27384c83 --- /dev/null +++ b/include/drm/i2c/sil164.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Francisco Jerez. | ||
3 | * All Rights Reserved. | ||
4 | * | ||
5 | * Permission is hereby granted, free of charge, to any person obtaining | ||
6 | * a copy of this software and associated documentation files (the | ||
7 | * "Software"), to deal in the Software without restriction, including | ||
8 | * without limitation the rights to use, copy, modify, merge, publish, | ||
9 | * distribute, sublicense, and/or sell copies of the Software, and to | ||
10 | * permit persons to whom the Software is furnished to do so, subject to | ||
11 | * the following conditions: | ||
12 | * | ||
13 | * The above copyright notice and this permission notice (including the | ||
14 | * next paragraph) shall be included in all copies or substantial | ||
15 | * portions of the Software. | ||
16 | * | ||
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
20 | * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE | ||
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
24 | * | ||
25 | */ | ||
26 | |||
27 | #ifndef __DRM_I2C_SIL164_H__ | ||
28 | #define __DRM_I2C_SIL164_H__ | ||
29 | |||
30 | /** | ||
31 | * struct sil164_encoder_params | ||
32 | * | ||
33 | * Describes how the sil164 is connected to the GPU. It should be used | ||
34 | * as the @params parameter of its @set_config method. | ||
35 | * | ||
36 | * See "http://www.siliconimage.com/docs/SiI-DS-0021-E-164.pdf". | ||
37 | */ | ||
38 | struct sil164_encoder_params { | ||
39 | enum { | ||
40 | SIL164_INPUT_EDGE_FALLING = 0, | ||
41 | SIL164_INPUT_EDGE_RISING | ||
42 | } input_edge; | ||
43 | |||
44 | enum { | ||
45 | SIL164_INPUT_WIDTH_12BIT = 0, | ||
46 | SIL164_INPUT_WIDTH_24BIT | ||
47 | } input_width; | ||
48 | |||
49 | enum { | ||
50 | SIL164_INPUT_SINGLE_EDGE = 0, | ||
51 | SIL164_INPUT_DUAL_EDGE | ||
52 | } input_dual; | ||
53 | |||
54 | enum { | ||
55 | SIL164_PLL_FILTER_ON = 0, | ||
56 | SIL164_PLL_FILTER_OFF, | ||
57 | } pll_filter; | ||
58 | |||
59 | int input_skew; /** < Allowed range [-4, 3], use 0 for no de-skew. */ | ||
60 | int duallink_skew; /** < Allowed range [-4, 3]. */ | ||
61 | }; | ||
62 | |||
63 | #endif | ||
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h index b64a8d7cdf6d..8f8b072c4c7b 100644 --- a/include/drm/i915_drm.h +++ b/include/drm/i915_drm.h | |||
@@ -33,6 +33,15 @@ | |||
33 | * subject to backwards-compatibility constraints. | 33 | * subject to backwards-compatibility constraints. |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #ifdef __KERNEL__ | ||
37 | /* For use by IPS driver */ | ||
38 | extern unsigned long i915_read_mch_val(void); | ||
39 | extern bool i915_gpu_raise(void); | ||
40 | extern bool i915_gpu_lower(void); | ||
41 | extern bool i915_gpu_busy(void); | ||
42 | extern bool i915_gpu_turbo_disable(void); | ||
43 | #endif | ||
44 | |||
36 | /* Each region is a minimum of 16k, and there are at most 255 of them. | 45 | /* Each region is a minimum of 16k, and there are at most 255 of them. |
37 | */ | 46 | */ |
38 | #define I915_NR_TEX_REGIONS 255 /* table size 2k - maximum due to use | 47 | #define I915_NR_TEX_REGIONS 255 /* table size 2k - maximum due to use |
@@ -275,6 +284,7 @@ typedef struct drm_i915_irq_wait { | |||
275 | #define I915_PARAM_HAS_OVERLAY 7 | 284 | #define I915_PARAM_HAS_OVERLAY 7 |
276 | #define I915_PARAM_HAS_PAGEFLIPPING 8 | 285 | #define I915_PARAM_HAS_PAGEFLIPPING 8 |
277 | #define I915_PARAM_HAS_EXECBUF2 9 | 286 | #define I915_PARAM_HAS_EXECBUF2 9 |
287 | #define I915_PARAM_HAS_BSD 10 | ||
278 | 288 | ||
279 | typedef struct drm_i915_getparam { | 289 | typedef struct drm_i915_getparam { |
280 | int param; | 290 | int param; |
@@ -616,7 +626,9 @@ struct drm_i915_gem_execbuffer2 { | |||
616 | __u32 num_cliprects; | 626 | __u32 num_cliprects; |
617 | /** This is a struct drm_clip_rect *cliprects */ | 627 | /** This is a struct drm_clip_rect *cliprects */ |
618 | __u64 cliprects_ptr; | 628 | __u64 cliprects_ptr; |
619 | __u64 flags; /* currently unused */ | 629 | #define I915_EXEC_RENDER (1<<0) |
630 | #define I915_EXEC_BSD (1<<1) | ||
631 | __u64 flags; | ||
620 | __u64 rsvd1; | 632 | __u64 rsvd1; |
621 | __u64 rsvd2; | 633 | __u64 rsvd2; |
622 | }; | 634 | }; |
diff --git a/include/drm/nouveau_drm.h b/include/drm/nouveau_drm.h index a6a9f4af5ebd..fe917dee723a 100644 --- a/include/drm/nouveau_drm.h +++ b/include/drm/nouveau_drm.h | |||
@@ -79,6 +79,7 @@ struct drm_nouveau_gpuobj_free { | |||
79 | #define NOUVEAU_GETPARAM_CHIPSET_ID 11 | 79 | #define NOUVEAU_GETPARAM_CHIPSET_ID 11 |
80 | #define NOUVEAU_GETPARAM_VM_VRAM_BASE 12 | 80 | #define NOUVEAU_GETPARAM_VM_VRAM_BASE 12 |
81 | #define NOUVEAU_GETPARAM_GRAPH_UNITS 13 | 81 | #define NOUVEAU_GETPARAM_GRAPH_UNITS 13 |
82 | #define NOUVEAU_GETPARAM_PTIMER_TIME 14 | ||
82 | struct drm_nouveau_getparam { | 83 | struct drm_nouveau_getparam { |
83 | uint64_t param; | 84 | uint64_t param; |
84 | uint64_t value; | 85 | uint64_t value; |
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h index 3ff9fc071dfe..0acaf8f91437 100644 --- a/include/drm/radeon_drm.h +++ b/include/drm/radeon_drm.h | |||
@@ -903,6 +903,9 @@ struct drm_radeon_cs { | |||
903 | #define RADEON_INFO_NUM_Z_PIPES 0x02 | 903 | #define RADEON_INFO_NUM_Z_PIPES 0x02 |
904 | #define RADEON_INFO_ACCEL_WORKING 0x03 | 904 | #define RADEON_INFO_ACCEL_WORKING 0x03 |
905 | #define RADEON_INFO_CRTC_FROM_ID 0x04 | 905 | #define RADEON_INFO_CRTC_FROM_ID 0x04 |
906 | #define RADEON_INFO_ACCEL_WORKING2 0x05 | ||
907 | #define RADEON_INFO_TILING_CONFIG 0x06 | ||
908 | #define RADEON_INFO_WANT_HYPERZ 0x07 | ||
906 | 909 | ||
907 | struct drm_radeon_info { | 910 | struct drm_radeon_info { |
908 | uint32_t request; | 911 | uint32_t request; |
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index 0ea602da43e7..b87504235f18 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #include "ttm/ttm_memory.h" | 34 | #include "ttm/ttm_memory.h" |
35 | #include "ttm/ttm_module.h" | 35 | #include "ttm/ttm_module.h" |
36 | #include "drm_mm.h" | 36 | #include "drm_mm.h" |
37 | #include "drm_global.h" | ||
37 | #include "linux/workqueue.h" | 38 | #include "linux/workqueue.h" |
38 | #include "linux/fs.h" | 39 | #include "linux/fs.h" |
39 | #include "linux/spinlock.h" | 40 | #include "linux/spinlock.h" |
@@ -362,7 +363,7 @@ struct ttm_bo_driver { | |||
362 | */ | 363 | */ |
363 | 364 | ||
364 | struct ttm_bo_global_ref { | 365 | struct ttm_bo_global_ref { |
365 | struct ttm_global_reference ref; | 366 | struct drm_global_reference ref; |
366 | struct ttm_mem_global *mem_glob; | 367 | struct ttm_mem_global *mem_glob; |
367 | }; | 368 | }; |
368 | 369 | ||
@@ -687,8 +688,8 @@ extern int ttm_mem_io_reserve(struct ttm_bo_device *bdev, | |||
687 | extern void ttm_mem_io_free(struct ttm_bo_device *bdev, | 688 | extern void ttm_mem_io_free(struct ttm_bo_device *bdev, |
688 | struct ttm_mem_reg *mem); | 689 | struct ttm_mem_reg *mem); |
689 | 690 | ||
690 | extern void ttm_bo_global_release(struct ttm_global_reference *ref); | 691 | extern void ttm_bo_global_release(struct drm_global_reference *ref); |
691 | extern int ttm_bo_global_init(struct ttm_global_reference *ref); | 692 | extern int ttm_bo_global_init(struct drm_global_reference *ref); |
692 | 693 | ||
693 | extern int ttm_bo_device_release(struct ttm_bo_device *bdev); | 694 | extern int ttm_bo_device_release(struct ttm_bo_device *bdev); |
694 | 695 | ||
diff --git a/include/drm/ttm/ttm_module.h b/include/drm/ttm/ttm_module.h index cf416aee19af..45fa318c1585 100644 --- a/include/drm/ttm/ttm_module.h +++ b/include/drm/ttm/ttm_module.h | |||
@@ -35,26 +35,6 @@ | |||
35 | struct kobject; | 35 | struct kobject; |
36 | 36 | ||
37 | #define TTM_PFX "[TTM] " | 37 | #define TTM_PFX "[TTM] " |
38 | |||
39 | enum ttm_global_types { | ||
40 | TTM_GLOBAL_TTM_MEM = 0, | ||
41 | TTM_GLOBAL_TTM_BO, | ||
42 | TTM_GLOBAL_TTM_OBJECT, | ||
43 | TTM_GLOBAL_NUM | ||
44 | }; | ||
45 | |||
46 | struct ttm_global_reference { | ||
47 | enum ttm_global_types global_type; | ||
48 | size_t size; | ||
49 | void *object; | ||
50 | int (*init) (struct ttm_global_reference *); | ||
51 | void (*release) (struct ttm_global_reference *); | ||
52 | }; | ||
53 | |||
54 | extern void ttm_global_init(void); | ||
55 | extern void ttm_global_release(void); | ||
56 | extern int ttm_global_item_ref(struct ttm_global_reference *ref); | ||
57 | extern void ttm_global_item_unref(struct ttm_global_reference *ref); | ||
58 | extern struct kobject *ttm_get_kobj(void); | 38 | extern struct kobject *ttm_get_kobj(void); |
59 | 39 | ||
60 | #endif /* _TTM_MODULE_H_ */ | 40 | #endif /* _TTM_MODULE_H_ */ |
diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h index 8bb4de567b2c..116821448c38 100644 --- a/include/drm/ttm/ttm_page_alloc.h +++ b/include/drm/ttm/ttm_page_alloc.h | |||
@@ -56,10 +56,6 @@ void ttm_put_pages(struct list_head *pages, | |||
56 | enum ttm_caching_state cstate); | 56 | enum ttm_caching_state cstate); |
57 | /** | 57 | /** |
58 | * Initialize pool allocator. | 58 | * Initialize pool allocator. |
59 | * | ||
60 | * Pool allocator is internaly reference counted so it can be initialized | ||
61 | * multiple times but ttm_page_alloc_fini has to be called same number of | ||
62 | * times. | ||
63 | */ | 59 | */ |
64 | int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages); | 60 | int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages); |
65 | /** | 61 | /** |
diff --git a/include/drm/vmwgfx_drm.h b/include/drm/vmwgfx_drm.h index c7645f480d12..4d0842391edc 100644 --- a/include/drm/vmwgfx_drm.h +++ b/include/drm/vmwgfx_drm.h | |||
@@ -50,6 +50,8 @@ | |||
50 | #define DRM_VMW_EXECBUF 12 | 50 | #define DRM_VMW_EXECBUF 12 |
51 | #define DRM_VMW_FIFO_DEBUG 13 | 51 | #define DRM_VMW_FIFO_DEBUG 13 |
52 | #define DRM_VMW_FENCE_WAIT 14 | 52 | #define DRM_VMW_FENCE_WAIT 14 |
53 | /* guarded by minor version >= 2 */ | ||
54 | #define DRM_VMW_UPDATE_LAYOUT 15 | ||
53 | 55 | ||
54 | 56 | ||
55 | /*************************************************************************/ | 57 | /*************************************************************************/ |
@@ -585,4 +587,28 @@ struct drm_vmw_stream_arg { | |||
585 | * sure that the stream has been stopped. | 587 | * sure that the stream has been stopped. |
586 | */ | 588 | */ |
587 | 589 | ||
590 | /*************************************************************************/ | ||
591 | /** | ||
592 | * DRM_VMW_UPDATE_LAYOUT - Update layout | ||
593 | * | ||
594 | * Updates the prefered modes and connection status for connectors. The | ||
595 | * command conisits of one drm_vmw_update_layout_arg pointing out a array | ||
596 | * of num_outputs drm_vmw_rect's. | ||
597 | */ | ||
598 | |||
599 | /** | ||
600 | * struct drm_vmw_update_layout_arg | ||
601 | * | ||
602 | * @num_outputs: number of active | ||
603 | * @rects: pointer to array of drm_vmw_rect | ||
604 | * | ||
605 | * Input argument to the DRM_VMW_UPDATE_LAYOUT Ioctl. | ||
606 | */ | ||
607 | |||
608 | struct drm_vmw_update_layout_arg { | ||
609 | uint32_t num_outputs; | ||
610 | uint32_t pad64; | ||
611 | uint64_t rects; | ||
612 | }; | ||
613 | |||
588 | #endif | 614 | #endif |