diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-05 19:02:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-05 19:02:01 -0400 |
commit | fc1caf6eafb30ea185720e29f7f5eccca61ecd60 (patch) | |
tree | 666dabc25a9b02e5c05f9eba32fa6b0d8027341a /include/drm | |
parent | 9779714c8af09d57527f18d9aa2207dcc27a8687 (diff) | |
parent | 96576a9e1a0cdb8a43d3af5846be0948f52b4460 (diff) |
Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (204 commits)
agp: intel-agp: do not use PCI resources before pci_enable_device()
agp: efficeon-agp: do not use PCI resources before pci_enable_device()
drm: kill BKL from common code
drm/kms: Simplify setup of the initial I2C encoder config.
drm,io-mapping: Specify slot to use for atomic mappings
drm/radeon/kms: only expose underscan on avivo chips
drm/radeon: add new pci ids
drm: Cleanup after failing to create master->unique and dev->name
drm/radeon: tone down overchatty acpi debug messages.
drm/radeon/kms: enable underscan option for digital connectors
drm/radeon/kms: fix calculation of h/v scaling factors
drm/radeon/kms/igp: sideport is AMD only
drm/radeon/kms: handle the case of no active displays properly in the bandwidth code
drm: move ttm global code to core drm
drm/i915: Clear the Ironlake dithering flags when the pipe doesn't want it.
drm/radeon/kms: make sure HPD is set to NONE on analog-only connectors
drm/radeon/kms: make sure rio_mem is valid before unmapping it
drm/agp/i915: trim stolen space to 32M
drm/i915: Unset cursor if out-of-bounds upon mode change (v4)
drm/i915: Unreference object not handle on creation
...
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm.h | 2 | ||||
-rw-r--r-- | include/drm/drmP.h | 62 | ||||
-rw-r--r-- | include/drm/drm_crtc_helper.h | 3 | ||||
-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/radeon_drm.h | 2 | ||||
-rw-r--r-- | include/drm/ttm/ttm_bo_driver.h | 7 | ||||
-rw-r--r-- | include/drm/ttm/ttm_module.h | 20 |
11 files changed, 205 insertions, 42 deletions
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..e2a4da7d7fab 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,17 +1069,21 @@ 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 | ||
1078 | |||
1079 | static inline int drm_dev_to_irq(struct drm_device *dev) | ||
1080 | { | ||
1081 | if (drm_core_check_feature(dev, DRIVER_USE_PLATFORM_DEVICE)) | ||
1082 | return platform_get_irq(dev->platformdev, 0); | ||
1083 | else | ||
1084 | return dev->pdev->irq; | ||
1085 | } | ||
1086 | |||
1074 | #ifdef __alpha__ | 1087 | #ifdef __alpha__ |
1075 | #define drm_get_pci_domain(dev) dev->hose->index | 1088 | #define drm_get_pci_domain(dev) dev->hose->index |
1076 | #else | 1089 | #else |
@@ -1138,6 +1151,7 @@ extern long drm_compat_ioctl(struct file *filp, | |||
1138 | extern int drm_lastclose(struct drm_device *dev); | 1151 | extern int drm_lastclose(struct drm_device *dev); |
1139 | 1152 | ||
1140 | /* Device support (drm_fops.h) */ | 1153 | /* Device support (drm_fops.h) */ |
1154 | extern struct mutex drm_global_mutex; | ||
1141 | extern int drm_open(struct inode *inode, struct file *filp); | 1155 | extern int drm_open(struct inode *inode, struct file *filp); |
1142 | extern int drm_stub_open(struct inode *inode, struct file *filp); | 1156 | extern int drm_stub_open(struct inode *inode, struct file *filp); |
1143 | extern int drm_fasync(int fd, struct file *filp, int on); | 1157 | extern int drm_fasync(int fd, struct file *filp, int on); |
@@ -1273,10 +1287,6 @@ extern int drm_freebufs(struct drm_device *dev, void *data, | |||
1273 | extern int drm_mapbufs(struct drm_device *dev, void *data, | 1287 | extern int drm_mapbufs(struct drm_device *dev, void *data, |
1274 | struct drm_file *file_priv); | 1288 | struct drm_file *file_priv); |
1275 | extern int drm_order(unsigned long size); | 1289 | 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 | 1290 | ||
1281 | /* DMA support (drm_dma.h) */ | 1291 | /* DMA support (drm_dma.h) */ |
1282 | extern int drm_dma_setup(struct drm_device *dev); | 1292 | extern int drm_dma_setup(struct drm_device *dev); |
@@ -1351,8 +1361,11 @@ extern int drm_dropmaster_ioctl(struct drm_device *dev, void *data, | |||
1351 | struct drm_master *drm_master_create(struct drm_minor *minor); | 1361 | struct drm_master *drm_master_create(struct drm_minor *minor); |
1352 | extern struct drm_master *drm_master_get(struct drm_master *master); | 1362 | extern struct drm_master *drm_master_get(struct drm_master *master); |
1353 | extern void drm_master_put(struct drm_master **master); | 1363 | 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, | 1364 | extern int drm_get_pci_dev(struct pci_dev *pdev, |
1355 | struct drm_driver *driver); | 1365 | const struct pci_device_id *ent, |
1366 | struct drm_driver *driver); | ||
1367 | extern int drm_get_platform_dev(struct platform_device *pdev, | ||
1368 | struct drm_driver *driver); | ||
1356 | extern void drm_put_dev(struct drm_device *dev); | 1369 | extern void drm_put_dev(struct drm_device *dev); |
1357 | extern int drm_put_minor(struct drm_minor **minor); | 1370 | extern int drm_put_minor(struct drm_minor **minor); |
1358 | extern unsigned int drm_debug; | 1371 | extern unsigned int drm_debug; |
@@ -1440,6 +1453,8 @@ void drm_gem_vm_open(struct vm_area_struct *vma); | |||
1440 | void drm_gem_vm_close(struct vm_area_struct *vma); | 1453 | void drm_gem_vm_close(struct vm_area_struct *vma); |
1441 | int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma); | 1454 | int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma); |
1442 | 1455 | ||
1456 | #include "drm_global.h" | ||
1457 | |||
1443 | static inline void | 1458 | static inline void |
1444 | drm_gem_object_reference(struct drm_gem_object *obj) | 1459 | drm_gem_object_reference(struct drm_gem_object *obj) |
1445 | { | 1460 | { |
@@ -1529,6 +1544,9 @@ static __inline__ struct drm_local_map *drm_core_findmap(struct drm_device *dev, | |||
1529 | 1544 | ||
1530 | static __inline__ int drm_device_is_agp(struct drm_device *dev) | 1545 | static __inline__ int drm_device_is_agp(struct drm_device *dev) |
1531 | { | 1546 | { |
1547 | if (drm_core_check_feature(dev, DRIVER_USE_PLATFORM_DEVICE)) | ||
1548 | return 0; | ||
1549 | |||
1532 | if (dev->driver->device_is_agp != NULL) { | 1550 | if (dev->driver->device_is_agp != NULL) { |
1533 | int err = (*dev->driver->device_is_agp) (dev); | 1551 | int err = (*dev->driver->device_is_agp) (dev); |
1534 | 1552 | ||
@@ -1542,7 +1560,10 @@ static __inline__ int drm_device_is_agp(struct drm_device *dev) | |||
1542 | 1560 | ||
1543 | static __inline__ int drm_device_is_pcie(struct drm_device *dev) | 1561 | static __inline__ int drm_device_is_pcie(struct drm_device *dev) |
1544 | { | 1562 | { |
1545 | return pci_find_capability(dev->pdev, PCI_CAP_ID_EXP); | 1563 | if (drm_core_check_feature(dev, DRIVER_USE_PLATFORM_DEVICE)) |
1564 | return 0; | ||
1565 | else | ||
1566 | return pci_find_capability(dev->pdev, PCI_CAP_ID_EXP); | ||
1546 | } | 1567 | } |
1547 | 1568 | ||
1548 | static __inline__ void drm_core_dropmap(struct drm_local_map *map) | 1569 | static __inline__ void drm_core_dropmap(struct drm_local_map *map) |
@@ -1550,6 +1571,21 @@ static __inline__ void drm_core_dropmap(struct drm_local_map *map) | |||
1550 | } | 1571 | } |
1551 | 1572 | ||
1552 | #include "drm_mem_util.h" | 1573 | #include "drm_mem_util.h" |
1574 | |||
1575 | static inline void *drm_get_device(struct drm_device *dev) | ||
1576 | { | ||
1577 | if (drm_core_check_feature(dev, DRIVER_USE_PLATFORM_DEVICE)) | ||
1578 | return dev->platformdev; | ||
1579 | else | ||
1580 | return dev->pdev; | ||
1581 | } | ||
1582 | |||
1583 | extern int drm_platform_init(struct drm_driver *driver); | ||
1584 | extern int drm_pci_init(struct drm_driver *driver); | ||
1585 | extern int drm_fill_in_dev(struct drm_device *dev, | ||
1586 | const struct pci_device_id *ent, | ||
1587 | struct drm_driver *driver); | ||
1588 | int drm_get_minor(struct drm_device *dev, struct drm_minor **minor, int type); | ||
1553 | /*@}*/ | 1589 | /*@}*/ |
1554 | 1590 | ||
1555 | #endif /* __KERNEL__ */ | 1591 | #endif /* __KERNEL__ */ |
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h index 10f7d03e58a9..59b7073b13fe 100644 --- a/include/drm/drm_crtc_helper.h +++ b/include/drm/drm_crtc_helper.h | |||
@@ -65,6 +65,9 @@ struct drm_crtc_helper_funcs { | |||
65 | 65 | ||
66 | /* reload the current crtc LUT */ | 66 | /* reload the current crtc LUT */ |
67 | 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); | ||
68 | }; | 71 | }; |
69 | 72 | ||
70 | struct drm_encoder_helper_funcs { | 73 | struct drm_encoder_helper_funcs { |
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/radeon_drm.h b/include/drm/radeon_drm.h index 5347063e9d5a..0acaf8f91437 100644 --- a/include/drm/radeon_drm.h +++ b/include/drm/radeon_drm.h | |||
@@ -904,6 +904,8 @@ struct drm_radeon_cs { | |||
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 | 906 | #define RADEON_INFO_ACCEL_WORKING2 0x05 |
907 | #define RADEON_INFO_TILING_CONFIG 0x06 | ||
908 | #define RADEON_INFO_WANT_HYPERZ 0x07 | ||
907 | 909 | ||
908 | struct drm_radeon_info { | 910 | struct drm_radeon_info { |
909 | 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_ */ |