diff options
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drmP.h | 1 | ||||
-rw-r--r-- | include/drm/drm_crtc.h | 6 | ||||
-rw-r--r-- | include/drm/drm_edid.h | 3 | ||||
-rw-r--r-- | include/drm/drm_pciids.h | 1 | ||||
-rw-r--r-- | include/drm/ttm/ttm_page_alloc.h | 74 |
5 files changed, 80 insertions, 5 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index de2f82efb15f..2f3b3a00b7a3 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -55,6 +55,7 @@ | |||
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/slab.h> | ||
58 | #if defined(__alpha__) || defined(__powerpc__) | 59 | #if defined(__alpha__) || defined(__powerpc__) |
59 | #include <asm/pgtable.h> /* For pte_wrprotect */ | 60 | #include <asm/pgtable.h> /* For pte_wrprotect */ |
60 | #endif | 61 | #endif |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index fce2042ad0a5..c560364663a5 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -648,8 +648,6 @@ extern void drm_fb_release(struct drm_file *file_priv); | |||
648 | extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group); | 648 | extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group); |
649 | extern struct edid *drm_get_edid(struct drm_connector *connector, | 649 | extern struct edid *drm_get_edid(struct drm_connector *connector, |
650 | struct i2c_adapter *adapter); | 650 | struct i2c_adapter *adapter); |
651 | extern int drm_do_probe_ddc_edid(struct i2c_adapter *adapter, | ||
652 | unsigned char *buf, int len); | ||
653 | extern int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid); | 651 | extern int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid); |
654 | extern void drm_mode_probed_add(struct drm_connector *connector, struct drm_display_mode *mode); | 652 | extern void drm_mode_probed_add(struct drm_connector *connector, struct drm_display_mode *mode); |
655 | extern void drm_mode_remove(struct drm_connector *connector, struct drm_display_mode *mode); | 653 | extern void drm_mode_remove(struct drm_connector *connector, struct drm_display_mode *mode); |
@@ -781,6 +779,10 @@ extern struct drm_display_mode *drm_cvt_mode(struct drm_device *dev, | |||
781 | extern struct drm_display_mode *drm_gtf_mode(struct drm_device *dev, | 779 | extern struct drm_display_mode *drm_gtf_mode(struct drm_device *dev, |
782 | int hdisplay, int vdisplay, int vrefresh, | 780 | int hdisplay, int vdisplay, int vrefresh, |
783 | bool interlaced, int margins); | 781 | bool interlaced, int margins); |
782 | extern struct drm_display_mode *drm_gtf_mode_complex(struct drm_device *dev, | ||
783 | int hdisplay, int vdisplay, int vrefresh, | ||
784 | bool interlaced, int margins, int GTF_M, | ||
785 | int GTF_2C, int GTF_K, int GTF_2J); | ||
784 | extern int drm_add_modes_noedid(struct drm_connector *connector, | 786 | extern int drm_add_modes_noedid(struct drm_connector *connector, |
785 | int hdisplay, int vdisplay); | 787 | int hdisplay, int vdisplay); |
786 | 788 | ||
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index b4209898f115..d33c3e038606 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h | |||
@@ -201,7 +201,4 @@ struct edid { | |||
201 | 201 | ||
202 | #define EDID_PRODUCT_ID(e) ((e)->prod_code[0] | ((e)->prod_code[1] << 8)) | 202 | #define EDID_PRODUCT_ID(e) ((e)->prod_code[0] | ((e)->prod_code[1] << 8)) |
203 | 203 | ||
204 | /* define the number of Extension EDID block */ | ||
205 | #define DRM_MAX_EDID_EXT_NUM 4 | ||
206 | |||
207 | #endif /* __DRM_EDID_H__ */ | 204 | #endif /* __DRM_EDID_H__ */ |
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 04a6ebc27b96..2d428b088cc8 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
@@ -6,6 +6,7 @@ | |||
6 | {0x1002, 0x3150, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \ | 6 | {0x1002, 0x3150, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \ |
7 | {0x1002, 0x3152, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 7 | {0x1002, 0x3152, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
8 | {0x1002, 0x3154, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 8 | {0x1002, 0x3154, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
9 | {0x1002, 0x3155, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
9 | {0x1002, 0x3E50, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \ | 10 | {0x1002, 0x3E50, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \ |
10 | {0x1002, 0x3E54, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \ | 11 | {0x1002, 0x3E54, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \ |
11 | {0x1002, 0x4136, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS100|RADEON_IS_IGP}, \ | 12 | {0x1002, 0x4136, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS100|RADEON_IS_IGP}, \ |
diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h new file mode 100644 index 000000000000..8bb4de567b2c --- /dev/null +++ b/include/drm/ttm/ttm_page_alloc.h | |||
@@ -0,0 +1,74 @@ | |||
1 | /* | ||
2 | * Copyright (c) Red Hat Inc. | ||
3 | |||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sub license, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice (including the | ||
12 | * next paragraph) shall be included in all copies or substantial portions | ||
13 | * of the Software. | ||
14 | * | ||
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL | ||
18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
21 | * DEALINGS IN THE SOFTWARE. | ||
22 | * | ||
23 | * Authors: Dave Airlie <airlied@redhat.com> | ||
24 | * Jerome Glisse <jglisse@redhat.com> | ||
25 | */ | ||
26 | #ifndef TTM_PAGE_ALLOC | ||
27 | #define TTM_PAGE_ALLOC | ||
28 | |||
29 | #include "ttm_bo_driver.h" | ||
30 | #include "ttm_memory.h" | ||
31 | |||
32 | /** | ||
33 | * Get count number of pages from pool to pages list. | ||
34 | * | ||
35 | * @pages: heado of empty linked list where pages are filled. | ||
36 | * @flags: ttm flags for page allocation. | ||
37 | * @cstate: ttm caching state for the page. | ||
38 | * @count: number of pages to allocate. | ||
39 | */ | ||
40 | int ttm_get_pages(struct list_head *pages, | ||
41 | int flags, | ||
42 | enum ttm_caching_state cstate, | ||
43 | unsigned count); | ||
44 | /** | ||
45 | * Put linked list of pages to pool. | ||
46 | * | ||
47 | * @pages: list of pages to free. | ||
48 | * @page_count: number of pages in the list. Zero can be passed for unknown | ||
49 | * count. | ||
50 | * @flags: ttm flags for page allocation. | ||
51 | * @cstate: ttm caching state. | ||
52 | */ | ||
53 | void ttm_put_pages(struct list_head *pages, | ||
54 | unsigned page_count, | ||
55 | int flags, | ||
56 | enum ttm_caching_state cstate); | ||
57 | /** | ||
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 | */ | ||
64 | int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages); | ||
65 | /** | ||
66 | * Free pool allocator. | ||
67 | */ | ||
68 | void ttm_page_alloc_fini(void); | ||
69 | |||
70 | /** | ||
71 | * Output the state of pools to debugfs file | ||
72 | */ | ||
73 | extern int ttm_page_alloc_debugfs(struct seq_file *m, void *data); | ||
74 | #endif | ||