aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm.h2
-rw-r--r--include/drm/drmP.h25
-rw-r--r--include/drm/drm_crtc.h48
-rw-r--r--include/drm/drm_edid.h1
-rw-r--r--include/drm/drm_fb_helper.h2
-rw-r--r--include/drm/drm_mode.h2
-rw-r--r--include/drm/drm_pciids.h54
-rw-r--r--include/drm/exynos_drm.h26
-rw-r--r--include/drm/gma_drm.h2
-rw-r--r--include/drm/i915_drm.h1
-rw-r--r--include/drm/intel-gtt.h4
-rw-r--r--include/drm/radeon_drm.h27
-rw-r--r--include/drm/ttm/ttm_memory.h1
13 files changed, 161 insertions, 34 deletions
diff --git a/include/drm/drm.h b/include/drm/drm.h
index 49d94ede2ec2..34a7b89fd006 100644
--- a/include/drm/drm.h
+++ b/include/drm/drm.h
@@ -761,6 +761,8 @@ struct drm_event_vblank {
761 761
762#define DRM_CAP_DUMB_BUFFER 0x1 762#define DRM_CAP_DUMB_BUFFER 0x1
763#define DRM_CAP_VBLANK_HIGH_CRTC 0x2 763#define DRM_CAP_VBLANK_HIGH_CRTC 0x2
764#define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3
765#define DRM_CAP_DUMB_PREFER_SHADOW 0x4
764 766
765/* typedef area */ 767/* typedef area */
766#ifndef __KERNEL__ 768#ifndef __KERNEL__
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 92f0981b5fb8..574bd1c81ebd 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1170,6 +1170,8 @@ struct drm_device {
1170 struct idr object_name_idr; 1170 struct idr object_name_idr;
1171 /*@} */ 1171 /*@} */
1172 int switch_power_state; 1172 int switch_power_state;
1173
1174 atomic_t unplugged; /* device has been unplugged or gone away */
1173}; 1175};
1174 1176
1175#define DRM_SWITCH_POWER_ON 0 1177#define DRM_SWITCH_POWER_ON 0
@@ -1235,6 +1237,19 @@ static inline int drm_mtrr_del(int handle, unsigned long offset,
1235} 1237}
1236#endif 1238#endif
1237 1239
1240static inline void drm_device_set_unplugged(struct drm_device *dev)
1241{
1242 smp_wmb();
1243 atomic_set(&dev->unplugged, 1);
1244}
1245
1246static inline int drm_device_is_unplugged(struct drm_device *dev)
1247{
1248 int ret = atomic_read(&dev->unplugged);
1249 smp_rmb();
1250 return ret;
1251}
1252
1238/******************************************************************/ 1253/******************************************************************/
1239/** \name Internal function definitions */ 1254/** \name Internal function definitions */
1240/*@{*/ 1255/*@{*/
@@ -1264,11 +1279,6 @@ extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait);
1264 1279
1265 /* Memory management support (drm_memory.h) */ 1280 /* Memory management support (drm_memory.h) */
1266#include "drm_memory.h" 1281#include "drm_memory.h"
1267extern void drm_mem_init(void);
1268extern int drm_mem_info(char *buf, char **start, off_t offset,
1269 int request, int *eof, void *data);
1270extern void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area);
1271
1272extern void drm_free_agp(DRM_AGP_MEM * handle, int pages); 1282extern void drm_free_agp(DRM_AGP_MEM * handle, int pages);
1273extern int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start); 1283extern int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start);
1274extern DRM_AGP_MEM *drm_agp_bind_pages(struct drm_device *dev, 1284extern DRM_AGP_MEM *drm_agp_bind_pages(struct drm_device *dev,
@@ -1383,12 +1393,8 @@ extern void drm_core_reclaim_buffers(struct drm_device *dev,
1383 /* IRQ support (drm_irq.h) */ 1393 /* IRQ support (drm_irq.h) */
1384extern int drm_control(struct drm_device *dev, void *data, 1394extern int drm_control(struct drm_device *dev, void *data,
1385 struct drm_file *file_priv); 1395 struct drm_file *file_priv);
1386extern irqreturn_t drm_irq_handler(DRM_IRQ_ARGS);
1387extern int drm_irq_install(struct drm_device *dev); 1396extern int drm_irq_install(struct drm_device *dev);
1388extern int drm_irq_uninstall(struct drm_device *dev); 1397extern int drm_irq_uninstall(struct drm_device *dev);
1389extern void drm_driver_irq_preinstall(struct drm_device *dev);
1390extern void drm_driver_irq_postinstall(struct drm_device *dev);
1391extern void drm_driver_irq_uninstall(struct drm_device *dev);
1392 1398
1393extern int drm_vblank_init(struct drm_device *dev, int num_crtcs); 1399extern int drm_vblank_init(struct drm_device *dev, int num_crtcs);
1394extern int drm_wait_vblank(struct drm_device *dev, void *data, 1400extern int drm_wait_vblank(struct drm_device *dev, void *data,
@@ -1464,6 +1470,7 @@ extern void drm_master_put(struct drm_master **master);
1464 1470
1465extern void drm_put_dev(struct drm_device *dev); 1471extern void drm_put_dev(struct drm_device *dev);
1466extern int drm_put_minor(struct drm_minor **minor); 1472extern int drm_put_minor(struct drm_minor **minor);
1473extern void drm_unplug_dev(struct drm_device *dev);
1467extern unsigned int drm_debug; 1474extern unsigned int drm_debug;
1468 1475
1469extern unsigned int drm_vblank_offdelay; 1476extern unsigned int drm_vblank_offdelay;
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 4cd4be26722c..e250eda4e3a8 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -121,7 +121,7 @@ struct drm_display_mode {
121 char name[DRM_DISPLAY_MODE_LEN]; 121 char name[DRM_DISPLAY_MODE_LEN];
122 122
123 enum drm_mode_status status; 123 enum drm_mode_status status;
124 int type; 124 unsigned int type;
125 125
126 /* Proposed mode values */ 126 /* Proposed mode values */
127 int clock; /* in kHz */ 127 int clock; /* in kHz */
@@ -257,7 +257,7 @@ struct drm_property_blob {
257 struct drm_mode_object base; 257 struct drm_mode_object base;
258 struct list_head head; 258 struct list_head head;
259 unsigned int length; 259 unsigned int length;
260 void *data; 260 unsigned char data[];
261}; 261};
262 262
263struct drm_property_enum { 263struct drm_property_enum {
@@ -796,6 +796,9 @@ struct drm_mode_config {
796 struct drm_property *scaling_mode_property; 796 struct drm_property *scaling_mode_property;
797 struct drm_property *dithering_mode_property; 797 struct drm_property *dithering_mode_property;
798 struct drm_property *dirty_info_property; 798 struct drm_property *dirty_info_property;
799
800 /* dumb ioctl parameters */
801 uint32_t preferred_depth, prefer_shadow;
799}; 802};
800 803
801#define obj_to_crtc(x) container_of(x, struct drm_crtc, base) 804#define obj_to_crtc(x) container_of(x, struct drm_crtc, base)
@@ -807,23 +810,29 @@ struct drm_mode_config {
807#define obj_to_blob(x) container_of(x, struct drm_property_blob, base) 810#define obj_to_blob(x) container_of(x, struct drm_property_blob, base)
808#define obj_to_plane(x) container_of(x, struct drm_plane, base) 811#define obj_to_plane(x) container_of(x, struct drm_plane, base)
809 812
813struct drm_prop_enum_list {
814 int type;
815 char *name;
816};
810 817
811extern void drm_crtc_init(struct drm_device *dev, 818extern int drm_crtc_init(struct drm_device *dev,
812 struct drm_crtc *crtc, 819 struct drm_crtc *crtc,
813 const struct drm_crtc_funcs *funcs); 820 const struct drm_crtc_funcs *funcs);
814extern void drm_crtc_cleanup(struct drm_crtc *crtc); 821extern void drm_crtc_cleanup(struct drm_crtc *crtc);
815 822
816extern void drm_connector_init(struct drm_device *dev, 823extern int drm_connector_init(struct drm_device *dev,
817 struct drm_connector *connector, 824 struct drm_connector *connector,
818 const struct drm_connector_funcs *funcs, 825 const struct drm_connector_funcs *funcs,
819 int connector_type); 826 int connector_type);
820 827
821extern void drm_connector_cleanup(struct drm_connector *connector); 828extern void drm_connector_cleanup(struct drm_connector *connector);
829/* helper to unplug all connectors from sysfs for device */
830extern void drm_connector_unplug_all(struct drm_device *dev);
822 831
823extern void drm_encoder_init(struct drm_device *dev, 832extern int drm_encoder_init(struct drm_device *dev,
824 struct drm_encoder *encoder, 833 struct drm_encoder *encoder,
825 const struct drm_encoder_funcs *funcs, 834 const struct drm_encoder_funcs *funcs,
826 int encoder_type); 835 int encoder_type);
827 836
828extern int drm_plane_init(struct drm_device *dev, 837extern int drm_plane_init(struct drm_device *dev,
829 struct drm_plane *plane, 838 struct drm_plane *plane,
@@ -848,6 +857,7 @@ extern struct edid *drm_get_edid(struct drm_connector *connector,
848extern int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid); 857extern int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid);
849extern void drm_mode_probed_add(struct drm_connector *connector, struct drm_display_mode *mode); 858extern void drm_mode_probed_add(struct drm_connector *connector, struct drm_display_mode *mode);
850extern void drm_mode_remove(struct drm_connector *connector, struct drm_display_mode *mode); 859extern void drm_mode_remove(struct drm_connector *connector, struct drm_display_mode *mode);
860extern void drm_mode_copy(struct drm_display_mode *dst, const struct drm_display_mode *src);
851extern struct drm_display_mode *drm_mode_duplicate(struct drm_device *dev, 861extern struct drm_display_mode *drm_mode_duplicate(struct drm_device *dev,
852 const struct drm_display_mode *mode); 862 const struct drm_display_mode *mode);
853extern void drm_mode_debug_printmodeline(struct drm_display_mode *mode); 863extern void drm_mode_debug_printmodeline(struct drm_display_mode *mode);
@@ -862,7 +872,7 @@ extern int drm_mode_height(struct drm_display_mode *mode);
862/* for us by fb module */ 872/* for us by fb module */
863extern int drm_mode_attachmode_crtc(struct drm_device *dev, 873extern int drm_mode_attachmode_crtc(struct drm_device *dev,
864 struct drm_crtc *crtc, 874 struct drm_crtc *crtc,
865 struct drm_display_mode *mode); 875 const struct drm_display_mode *mode);
866extern int drm_mode_detachmode_crtc(struct drm_device *dev, struct drm_display_mode *mode); 876extern int drm_mode_detachmode_crtc(struct drm_device *dev, struct drm_display_mode *mode);
867 877
868extern struct drm_display_mode *drm_mode_create(struct drm_device *dev); 878extern struct drm_display_mode *drm_mode_create(struct drm_device *dev);
@@ -904,6 +914,13 @@ extern int drm_connector_attach_property(struct drm_connector *connector,
904 struct drm_property *property, uint64_t init_val); 914 struct drm_property *property, uint64_t init_val);
905extern struct drm_property *drm_property_create(struct drm_device *dev, int flags, 915extern struct drm_property *drm_property_create(struct drm_device *dev, int flags,
906 const char *name, int num_values); 916 const char *name, int num_values);
917extern struct drm_property *drm_property_create_enum(struct drm_device *dev, int flags,
918 const char *name,
919 const struct drm_prop_enum_list *props,
920 int num_values);
921struct drm_property *drm_property_create_range(struct drm_device *dev, int flags,
922 const char *name,
923 uint64_t min, uint64_t max);
907extern void drm_property_destroy(struct drm_device *dev, struct drm_property *property); 924extern void drm_property_destroy(struct drm_device *dev, struct drm_property *property);
908extern int drm_property_add_enum(struct drm_property *property, int index, 925extern int drm_property_add_enum(struct drm_property *property, int index,
909 uint64_t value, const char *name); 926 uint64_t value, const char *name);
@@ -919,7 +936,7 @@ extern int drm_mode_connector_attach_encoder(struct drm_connector *connector,
919 struct drm_encoder *encoder); 936 struct drm_encoder *encoder);
920extern void drm_mode_connector_detach_encoder(struct drm_connector *connector, 937extern void drm_mode_connector_detach_encoder(struct drm_connector *connector,
921 struct drm_encoder *encoder); 938 struct drm_encoder *encoder);
922extern bool drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc, 939extern int drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc,
923 int gamma_size); 940 int gamma_size);
924extern struct drm_mode_object *drm_mode_object_find(struct drm_device *dev, 941extern struct drm_mode_object *drm_mode_object_find(struct drm_device *dev,
925 uint32_t id, uint32_t type); 942 uint32_t id, uint32_t type);
@@ -995,6 +1012,7 @@ extern int drm_add_modes_noedid(struct drm_connector *connector,
995 int hdisplay, int vdisplay); 1012 int hdisplay, int vdisplay);
996 1013
997extern int drm_edid_header_is_valid(const u8 *raw_edid); 1014extern int drm_edid_header_is_valid(const u8 *raw_edid);
1015extern bool drm_edid_block_valid(u8 *raw_edid);
998extern bool drm_edid_is_valid(struct edid *edid); 1016extern bool drm_edid_is_valid(struct edid *edid);
999struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev, 1017struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev,
1000 int hsize, int vsize, int fresh); 1018 int hsize, int vsize, int fresh);
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index 74ce91684629..bcb9a66baa8c 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -238,5 +238,6 @@ int drm_av_sync_delay(struct drm_connector *connector,
238 struct drm_display_mode *mode); 238 struct drm_display_mode *mode);
239struct drm_connector *drm_select_eld(struct drm_encoder *encoder, 239struct drm_connector *drm_select_eld(struct drm_encoder *encoder,
240 struct drm_display_mode *mode); 240 struct drm_display_mode *mode);
241int drm_load_edid_firmware(struct drm_connector *connector);
241 242
242#endif /* __DRM_EDID_H__ */ 243#endif /* __DRM_EDID_H__ */
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index 6e3076ad646e..5120b01c2eeb 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -35,7 +35,6 @@ struct drm_fb_helper;
35#include <linux/kgdb.h> 35#include <linux/kgdb.h>
36 36
37struct drm_fb_helper_crtc { 37struct drm_fb_helper_crtc {
38 uint32_t crtc_id;
39 struct drm_mode_set mode_set; 38 struct drm_mode_set mode_set;
40 struct drm_display_mode *desired_mode; 39 struct drm_display_mode *desired_mode;
41}; 40};
@@ -74,7 +73,6 @@ struct drm_fb_helper {
74 int connector_count; 73 int connector_count;
75 struct drm_fb_helper_connector **connector_info; 74 struct drm_fb_helper_connector **connector_info;
76 struct drm_fb_helper_funcs *funcs; 75 struct drm_fb_helper_funcs *funcs;
77 int conn_limit;
78 struct fb_info *fbdev; 76 struct fb_info *fbdev;
79 u32 pseudo_palette[17]; 77 u32 pseudo_palette[17];
80 struct list_head kernel_fb_list; 78 struct list_head kernel_fb_list;
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h
index 2a2acda8b437..4a0aae38e160 100644
--- a/include/drm/drm_mode.h
+++ b/include/drm/drm_mode.h
@@ -27,6 +27,8 @@
27#ifndef _DRM_MODE_H 27#ifndef _DRM_MODE_H
28#define _DRM_MODE_H 28#define _DRM_MODE_H
29 29
30#include <linux/types.h>
31
30#define DRM_DISPLAY_INFO_LEN 32 32#define DRM_DISPLAY_INFO_LEN 32
31#define DRM_CONNECTOR_NAME_LEN 32 33#define DRM_CONNECTOR_NAME_LEN 32
32#define DRM_DISPLAY_MODE_LEN 32 34#define DRM_DISPLAY_MODE_LEN 32
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h
index 14b6cd022284..58d0bdab68dd 100644
--- a/include/drm/drm_pciids.h
+++ b/include/drm/drm_pciids.h
@@ -202,11 +202,49 @@
202 {0x1002, 0x6778, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ 202 {0x1002, 0x6778, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \
203 {0x1002, 0x6779, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ 203 {0x1002, 0x6779, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \
204 {0x1002, 0x677B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ 204 {0x1002, 0x677B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \
205 {0x1002, 0x6780, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
206 {0x1002, 0x6784, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
207 {0x1002, 0x6788, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
208 {0x1002, 0x678A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
209 {0x1002, 0x6790, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
210 {0x1002, 0x6798, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
211 {0x1002, 0x6799, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
212 {0x1002, 0x679A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
213 {0x1002, 0x679E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
214 {0x1002, 0x679F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
215 {0x1002, 0x6800, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
216 {0x1002, 0x6801, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
217 {0x1002, 0x6802, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
218 {0x1002, 0x6808, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \
219 {0x1002, 0x6809, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \
220 {0x1002, 0x6810, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \
221 {0x1002, 0x6818, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \
222 {0x1002, 0x6819, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \
223 {0x1002, 0x6820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
224 {0x1002, 0x6821, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
225 {0x1002, 0x6823, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
226 {0x1002, 0x6824, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
227 {0x1002, 0x6825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
228 {0x1002, 0x6826, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
229 {0x1002, 0x6827, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
230 {0x1002, 0x6828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \
231 {0x1002, 0x6829, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \
232 {0x1002, 0x682D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
233 {0x1002, 0x682F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
234 {0x1002, 0x6830, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \
235 {0x1002, 0x6831, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \
236 {0x1002, 0x6837, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \
237 {0x1002, 0x6838, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \
238 {0x1002, 0x6839, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \
239 {0x1002, 0x683B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \
240 {0x1002, 0x683D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \
241 {0x1002, 0x683F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \
205 {0x1002, 0x6840, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 242 {0x1002, 0x6840, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
206 {0x1002, 0x6841, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 243 {0x1002, 0x6841, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
207 {0x1002, 0x6842, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 244 {0x1002, 0x6842, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
208 {0x1002, 0x6843, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 245 {0x1002, 0x6843, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
209 {0x1002, 0x6849, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ 246 {0x1002, 0x6849, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \
247 {0x1002, 0x684C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \
210 {0x1002, 0x6850, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ 248 {0x1002, 0x6850, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \
211 {0x1002, 0x6858, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ 249 {0x1002, 0x6858, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \
212 {0x1002, 0x6859, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ 250 {0x1002, 0x6859, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \
@@ -512,6 +550,22 @@
512 {0x1002, 0x9807, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 550 {0x1002, 0x9807, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
513 {0x1002, 0x9808, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 551 {0x1002, 0x9808, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
514 {0x1002, 0x9809, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 552 {0x1002, 0x9809, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
553 {0x1002, 0x9900, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
554 {0x1002, 0x9901, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
555 {0x1002, 0x9903, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
556 {0x1002, 0x9904, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
557 {0x1002, 0x9905, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
558 {0x1002, 0x9906, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
559 {0x1002, 0x9907, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
560 {0x1002, 0x9908, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
561 {0x1002, 0x9909, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
562 {0x1002, 0x990A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
563 {0x1002, 0x990F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
564 {0x1002, 0x9990, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
565 {0x1002, 0x9991, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
566 {0x1002, 0x9992, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
567 {0x1002, 0x9993, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
568 {0x1002, 0x9994, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
515 {0, 0, 0} 569 {0, 0, 0}
516 570
517#define r128_PCI_IDS \ 571#define r128_PCI_IDS \
diff --git a/include/drm/exynos_drm.h b/include/drm/exynos_drm.h
index 1ed3aae893a5..3963116083ae 100644
--- a/include/drm/exynos_drm.h
+++ b/include/drm/exynos_drm.h
@@ -74,16 +74,37 @@ struct drm_exynos_gem_mmap {
74 uint64_t mapped; 74 uint64_t mapped;
75}; 75};
76 76
77/**
78 * A structure for user connection request of virtual display.
79 *
80 * @connection: indicate whether doing connetion or not by user.
81 * @extensions: if this value is 1 then the vidi driver would need additional
82 * 128bytes edid data.
83 * @edid: the edid data pointer from user side.
84 */
85struct drm_exynos_vidi_connection {
86 unsigned int connection;
87 unsigned int extensions;
88 uint64_t *edid;
89};
90
77struct drm_exynos_plane_set_zpos { 91struct drm_exynos_plane_set_zpos {
78 __u32 plane_id; 92 __u32 plane_id;
79 __s32 zpos; 93 __s32 zpos;
80}; 94};
81 95
96/* memory type definitions. */
97enum e_drm_exynos_gem_mem_type {
98 /* Physically Non-Continuous memory. */
99 EXYNOS_BO_NONCONTIG = 1 << 0
100};
101
82#define DRM_EXYNOS_GEM_CREATE 0x00 102#define DRM_EXYNOS_GEM_CREATE 0x00
83#define DRM_EXYNOS_GEM_MAP_OFFSET 0x01 103#define DRM_EXYNOS_GEM_MAP_OFFSET 0x01
84#define DRM_EXYNOS_GEM_MMAP 0x02 104#define DRM_EXYNOS_GEM_MMAP 0x02
85/* Reserved 0x03 ~ 0x05 for exynos specific gem ioctl */ 105/* Reserved 0x03 ~ 0x05 for exynos specific gem ioctl */
86#define DRM_EXYNOS_PLANE_SET_ZPOS 0x06 106#define DRM_EXYNOS_PLANE_SET_ZPOS 0x06
107#define DRM_EXYNOS_VIDI_CONNECTION 0x07
87 108
88#define DRM_IOCTL_EXYNOS_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + \ 109#define DRM_IOCTL_EXYNOS_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + \
89 DRM_EXYNOS_GEM_CREATE, struct drm_exynos_gem_create) 110 DRM_EXYNOS_GEM_CREATE, struct drm_exynos_gem_create)
@@ -97,6 +118,9 @@ struct drm_exynos_plane_set_zpos {
97#define DRM_IOCTL_EXYNOS_PLANE_SET_ZPOS DRM_IOWR(DRM_COMMAND_BASE + \ 118#define DRM_IOCTL_EXYNOS_PLANE_SET_ZPOS DRM_IOWR(DRM_COMMAND_BASE + \
98 DRM_EXYNOS_PLANE_SET_ZPOS, struct drm_exynos_plane_set_zpos) 119 DRM_EXYNOS_PLANE_SET_ZPOS, struct drm_exynos_plane_set_zpos)
99 120
121#define DRM_IOCTL_EXYNOS_VIDI_CONNECTION DRM_IOWR(DRM_COMMAND_BASE + \
122 DRM_EXYNOS_VIDI_CONNECTION, struct drm_exynos_vidi_connection)
123
100#ifdef __KERNEL__ 124#ifdef __KERNEL__
101 125
102/** 126/**
@@ -147,11 +171,13 @@ struct exynos_drm_common_hdmi_pd {
147 * @timing: default video mode for initializing 171 * @timing: default video mode for initializing
148 * @default_win: default window layer number to be used for UI. 172 * @default_win: default window layer number to be used for UI.
149 * @bpp: default bit per pixel. 173 * @bpp: default bit per pixel.
174 * @is_v13: set if hdmi version 13 is.
150 */ 175 */
151struct exynos_drm_hdmi_pdata { 176struct exynos_drm_hdmi_pdata {
152 struct fb_videomode timing; 177 struct fb_videomode timing;
153 unsigned int default_win; 178 unsigned int default_win;
154 unsigned int bpp; 179 unsigned int bpp;
180 unsigned int is_v13:1;
155}; 181};
156 182
157#endif /* __KERNEL__ */ 183#endif /* __KERNEL__ */
diff --git a/include/drm/gma_drm.h b/include/drm/gma_drm.h
index 113686785717..884613ee00ad 100644
--- a/include/drm/gma_drm.h
+++ b/include/drm/gma_drm.h
@@ -83,9 +83,9 @@ struct drm_psb_gem_mmap {
83#define DRM_GMA_GAMMA 0x04 /* Set gamma table */ 83#define DRM_GMA_GAMMA 0x04 /* Set gamma table */
84#define DRM_GMA_ADB 0x05 /* Get backlight */ 84#define DRM_GMA_ADB 0x05 /* Get backlight */
85#define DRM_GMA_DPST_BL 0x06 /* Set backlight */ 85#define DRM_GMA_DPST_BL 0x06 /* Set backlight */
86#define DRM_GMA_GET_PIPE_FROM_CRTC_ID 0x1 /* CRTC to physical pipe# */
87#define DRM_GMA_MODE_OPERATION 0x07 /* Mode validation/DC set */ 86#define DRM_GMA_MODE_OPERATION 0x07 /* Mode validation/DC set */
88#define PSB_MODE_OPERATION_MODE_VALID 0x01 87#define PSB_MODE_OPERATION_MODE_VALID 0x01
88#define DRM_GMA_GET_PIPE_FROM_CRTC_ID 0x08 /* CRTC to physical pipe# */
89 89
90 90
91#endif 91#endif
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index 924f6a454fed..da929bb5b788 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -296,6 +296,7 @@ typedef struct drm_i915_irq_wait {
296#define I915_PARAM_HAS_EXEC_CONSTANTS 14 296#define I915_PARAM_HAS_EXEC_CONSTANTS 14
297#define I915_PARAM_HAS_RELAXED_DELTA 15 297#define I915_PARAM_HAS_RELAXED_DELTA 15
298#define I915_PARAM_HAS_GEN7_SOL_RESET 16 298#define I915_PARAM_HAS_GEN7_SOL_RESET 16
299#define I915_PARAM_HAS_LLC 17
299 300
300typedef struct drm_i915_getparam { 301typedef struct drm_i915_getparam {
301 int param; 302 int param;
diff --git a/include/drm/intel-gtt.h b/include/drm/intel-gtt.h
index b174620cc9b3..0a0001b9dc78 100644
--- a/include/drm/intel-gtt.h
+++ b/include/drm/intel-gtt.h
@@ -15,6 +15,10 @@ const struct intel_gtt {
15 unsigned int needs_dmar : 1; 15 unsigned int needs_dmar : 1;
16 /* Whether we idle the gpu before mapping/unmapping */ 16 /* Whether we idle the gpu before mapping/unmapping */
17 unsigned int do_idle_maps : 1; 17 unsigned int do_idle_maps : 1;
18 /* Share the scratch page dma with ppgtts. */
19 dma_addr_t scratch_page_dma;
20 /* for ppgtt PDE access */
21 u32 __iomem *gtt;
18} *intel_gtt_get(void); 22} *intel_gtt_get(void);
19 23
20void intel_gtt_chipset_flush(void); 24void intel_gtt_chipset_flush(void);
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h
index b55da40953fd..7c491b4bcf65 100644
--- a/include/drm/radeon_drm.h
+++ b/include/drm/radeon_drm.h
@@ -804,13 +804,23 @@ struct drm_radeon_gem_create {
804 uint32_t flags; 804 uint32_t flags;
805}; 805};
806 806
807#define RADEON_TILING_MACRO 0x1 807#define RADEON_TILING_MACRO 0x1
808#define RADEON_TILING_MICRO 0x2 808#define RADEON_TILING_MICRO 0x2
809#define RADEON_TILING_SWAP_16BIT 0x4 809#define RADEON_TILING_SWAP_16BIT 0x4
810#define RADEON_TILING_SWAP_32BIT 0x8 810#define RADEON_TILING_SWAP_32BIT 0x8
811#define RADEON_TILING_SURFACE 0x10 /* this object requires a surface 811/* this object requires a surface when mapped - i.e. front buffer */
812 * when mapped - i.e. front buffer */ 812#define RADEON_TILING_SURFACE 0x10
813#define RADEON_TILING_MICRO_SQUARE 0x20 813#define RADEON_TILING_MICRO_SQUARE 0x20
814#define RADEON_TILING_EG_BANKW_SHIFT 8
815#define RADEON_TILING_EG_BANKW_MASK 0xf
816#define RADEON_TILING_EG_BANKH_SHIFT 12
817#define RADEON_TILING_EG_BANKH_MASK 0xf
818#define RADEON_TILING_EG_MACRO_TILE_ASPECT_SHIFT 16
819#define RADEON_TILING_EG_MACRO_TILE_ASPECT_MASK 0xf
820#define RADEON_TILING_EG_TILE_SPLIT_SHIFT 24
821#define RADEON_TILING_EG_TILE_SPLIT_MASK 0xf
822#define RADEON_TILING_EG_STENCIL_TILE_SPLIT_SHIFT 28
823#define RADEON_TILING_EG_STENCIL_TILE_SPLIT_MASK 0xf
814 824
815struct drm_radeon_gem_set_tiling { 825struct drm_radeon_gem_set_tiling {
816 uint32_t handle; 826 uint32_t handle;
@@ -898,6 +908,7 @@ struct drm_radeon_gem_va {
898#define RADEON_CHUNK_ID_RELOCS 0x01 908#define RADEON_CHUNK_ID_RELOCS 0x01
899#define RADEON_CHUNK_ID_IB 0x02 909#define RADEON_CHUNK_ID_IB 0x02
900#define RADEON_CHUNK_ID_FLAGS 0x03 910#define RADEON_CHUNK_ID_FLAGS 0x03
911#define RADEON_CHUNK_ID_CONST_IB 0x04
901 912
902/* The first dword of RADEON_CHUNK_ID_FLAGS is a uint32 of these flags: */ 913/* The first dword of RADEON_CHUNK_ID_FLAGS is a uint32 of these flags: */
903#define RADEON_CS_KEEP_TILING_FLAGS 0x01 914#define RADEON_CS_KEEP_TILING_FLAGS 0x01
@@ -952,6 +963,8 @@ struct drm_radeon_cs {
952#define RADEON_INFO_VA_START 0x0e 963#define RADEON_INFO_VA_START 0x0e
953/* maximum size of ib using the virtual memory cs */ 964/* maximum size of ib using the virtual memory cs */
954#define RADEON_INFO_IB_VM_MAX_SIZE 0x0f 965#define RADEON_INFO_IB_VM_MAX_SIZE 0x0f
966/* max pipes - needed for compute shaders */
967#define RADEON_INFO_MAX_PIPES 0x10
955 968
956struct drm_radeon_info { 969struct drm_radeon_info {
957 uint32_t request; 970 uint32_t request;
diff --git a/include/drm/ttm/ttm_memory.h b/include/drm/ttm/ttm_memory.h
index 26c1f78d136f..d6d1da468c97 100644
--- a/include/drm/ttm/ttm_memory.h
+++ b/include/drm/ttm/ttm_memory.h
@@ -30,6 +30,7 @@
30 30
31#include <linux/workqueue.h> 31#include <linux/workqueue.h>
32#include <linux/spinlock.h> 32#include <linux/spinlock.h>
33#include <linux/bug.h>
33#include <linux/wait.h> 34#include <linux/wait.h>
34#include <linux/errno.h> 35#include <linux/errno.h>
35#include <linux/kobject.h> 36#include <linux/kobject.h>