diff options
author | Eric Anholt <eric@anholt.net> | 2009-12-01 12:01:54 -0500 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-12-01 12:01:54 -0500 |
commit | f40d6817a5c2bf84f5fe7b5d1a83f1e8f8669951 (patch) | |
tree | 1c515a34a60f65cbfd3cf1a387427d0a9fdf878f /include | |
parent | 103a196f4224dc6872081305cf7f82ebf67aa7bd (diff) | |
parent | 46557bef3f3834ac33031c7be27d39d90d507442 (diff) |
Merge remote branch 'airlied/drm-next' into drm-intel-next
Diffstat (limited to 'include')
-rw-r--r-- | include/drm/drm.h | 1 | ||||
-rw-r--r-- | include/drm/drmP.h | 33 | ||||
-rw-r--r-- | include/drm/drm_crtc.h | 16 | ||||
-rw-r--r-- | include/drm/drm_mode.h | 33 | ||||
-rw-r--r-- | include/linux/i2c.h | 18 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 2 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack.h | 8 | ||||
-rw-r--r-- | include/net/netfilter/nf_nat_helper.h | 4 |
8 files changed, 76 insertions, 39 deletions
diff --git a/include/drm/drm.h b/include/drm/drm.h index fa6d9155873d..3919a4f792ae 100644 --- a/include/drm/drm.h +++ b/include/drm/drm.h | |||
@@ -687,6 +687,7 @@ struct drm_gem_open { | |||
687 | #define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xAD, struct drm_mode_fb_cmd) | 687 | #define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xAD, struct drm_mode_fb_cmd) |
688 | #define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xAE, struct drm_mode_fb_cmd) | 688 | #define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xAE, struct drm_mode_fb_cmd) |
689 | #define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xAF, unsigned int) | 689 | #define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xAF, unsigned int) |
690 | #define DRM_IOCTL_MODE_PAGE_FLIP DRM_IOWR(0xB0, struct drm_mode_crtc_page_flip) | ||
690 | 691 | ||
691 | /** | 692 | /** |
692 | * Device specific ioctls should only be in their respective headers | 693 | * Device specific ioctls should only be in their respective headers |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 1b807d0f6cdb..febf6c530c66 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -245,16 +245,6 @@ extern void drm_ut_debug_printk(unsigned int request_level, | |||
245 | 245 | ||
246 | #endif | 246 | #endif |
247 | 247 | ||
248 | #define DRM_PROC_LIMIT (PAGE_SIZE-80) | ||
249 | |||
250 | #define DRM_PROC_PRINT(fmt, arg...) \ | ||
251 | len += sprintf(&buf[len], fmt , ##arg); \ | ||
252 | if (len > DRM_PROC_LIMIT) { *eof = 1; return len - offset; } | ||
253 | |||
254 | #define DRM_PROC_PRINT_RET(ret, fmt, arg...) \ | ||
255 | len += sprintf(&buf[len], fmt , ##arg); \ | ||
256 | if (len > DRM_PROC_LIMIT) { ret; *eof = 1; return len - offset; } | ||
257 | |||
258 | /*@}*/ | 248 | /*@}*/ |
259 | 249 | ||
260 | /***********************************************************************/ | 250 | /***********************************************************************/ |
@@ -265,19 +255,8 @@ extern void drm_ut_debug_printk(unsigned int request_level, | |||
265 | 255 | ||
266 | #define DRM_LEFTCOUNT(x) (((x)->rp + (x)->count - (x)->wp) % ((x)->count + 1)) | 256 | #define DRM_LEFTCOUNT(x) (((x)->rp + (x)->count - (x)->wp) % ((x)->count + 1)) |
267 | #define DRM_BUFCOUNT(x) ((x)->count - DRM_LEFTCOUNT(x)) | 257 | #define DRM_BUFCOUNT(x) ((x)->count - DRM_LEFTCOUNT(x)) |
268 | #define DRM_WAITCOUNT(dev,idx) DRM_BUFCOUNT(&dev->queuelist[idx]->waitlist) | ||
269 | 258 | ||
270 | #define DRM_IF_VERSION(maj, min) (maj << 16 | min) | 259 | #define DRM_IF_VERSION(maj, min) (maj << 16 | min) |
271 | /** | ||
272 | * Get the private SAREA mapping. | ||
273 | * | ||
274 | * \param _dev DRM device. | ||
275 | * \param _ctx context number. | ||
276 | * \param _map output mapping. | ||
277 | */ | ||
278 | #define DRM_GET_PRIV_SAREA(_dev, _ctx, _map) do { \ | ||
279 | (_map) = (_dev)->context_sareas[_ctx]; \ | ||
280 | } while(0) | ||
281 | 260 | ||
282 | /** | 261 | /** |
283 | * Test that the hardware lock is held by the caller, returning otherwise. | 262 | * Test that the hardware lock is held by the caller, returning otherwise. |
@@ -297,18 +276,6 @@ do { \ | |||
297 | } while (0) | 276 | } while (0) |
298 | 277 | ||
299 | /** | 278 | /** |
300 | * Copy and IOCTL return string to user space | ||
301 | */ | ||
302 | #define DRM_COPY( name, value ) \ | ||
303 | len = strlen( value ); \ | ||
304 | if ( len > name##_len ) len = name##_len; \ | ||
305 | name##_len = strlen( value ); \ | ||
306 | if ( len && name ) { \ | ||
307 | if ( copy_to_user( name, value, len ) ) \ | ||
308 | return -EFAULT; \ | ||
309 | } | ||
310 | |||
311 | /** | ||
312 | * Ioctl function type. | 279 | * Ioctl function type. |
313 | * | 280 | * |
314 | * \param inode device inode. | 281 | * \param inode device inode. |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index bfcc60d101db..51d613673b2e 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -290,6 +290,7 @@ struct drm_property { | |||
290 | struct drm_crtc; | 290 | struct drm_crtc; |
291 | struct drm_connector; | 291 | struct drm_connector; |
292 | struct drm_encoder; | 292 | struct drm_encoder; |
293 | struct drm_pending_vblank_event; | ||
293 | 294 | ||
294 | /** | 295 | /** |
295 | * drm_crtc_funcs - control CRTCs for a given device | 296 | * drm_crtc_funcs - control CRTCs for a given device |
@@ -333,6 +334,19 @@ struct drm_crtc_funcs { | |||
333 | void (*destroy)(struct drm_crtc *crtc); | 334 | void (*destroy)(struct drm_crtc *crtc); |
334 | 335 | ||
335 | int (*set_config)(struct drm_mode_set *set); | 336 | int (*set_config)(struct drm_mode_set *set); |
337 | |||
338 | /* | ||
339 | * Flip to the given framebuffer. This implements the page | ||
340 | * flip ioctl descibed in drm_mode.h, specifically, the | ||
341 | * implementation must return immediately and block all | ||
342 | * rendering to the current fb until the flip has completed. | ||
343 | * If userspace set the event flag in the ioctl, the event | ||
344 | * argument will point to an event to send back when the flip | ||
345 | * completes, otherwise it will be NULL. | ||
346 | */ | ||
347 | int (*page_flip)(struct drm_crtc *crtc, | ||
348 | struct drm_framebuffer *fb, | ||
349 | struct drm_pending_vblank_event *event); | ||
336 | }; | 350 | }; |
337 | 351 | ||
338 | /** | 352 | /** |
@@ -757,6 +771,8 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev, | |||
757 | extern int drm_mode_gamma_set_ioctl(struct drm_device *dev, | 771 | extern int drm_mode_gamma_set_ioctl(struct drm_device *dev, |
758 | void *data, struct drm_file *file_priv); | 772 | void *data, struct drm_file *file_priv); |
759 | extern bool drm_detect_hdmi_monitor(struct edid *edid); | 773 | extern bool drm_detect_hdmi_monitor(struct edid *edid); |
774 | extern int drm_mode_page_flip_ioctl(struct drm_device *dev, | ||
775 | void *data, struct drm_file *file_priv); | ||
760 | extern struct drm_display_mode *drm_cvt_mode(struct drm_device *dev, | 776 | extern struct drm_display_mode *drm_cvt_mode(struct drm_device *dev, |
761 | int hdisplay, int vdisplay, int vrefresh, | 777 | int hdisplay, int vdisplay, int vrefresh, |
762 | bool reduced, bool interlaced, bool margins); | 778 | bool reduced, bool interlaced, bool margins); |
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index 1f908416aedb..68ddc6175ae7 100644 --- a/include/drm/drm_mode.h +++ b/include/drm/drm_mode.h | |||
@@ -268,4 +268,37 @@ struct drm_mode_crtc_lut { | |||
268 | __u64 blue; | 268 | __u64 blue; |
269 | }; | 269 | }; |
270 | 270 | ||
271 | #define DRM_MODE_PAGE_FLIP_EVENT 0x01 | ||
272 | #define DRM_MODE_PAGE_FLIP_FLAGS DRM_MODE_PAGE_FLIP_EVENT | ||
273 | |||
274 | /* | ||
275 | * Request a page flip on the specified crtc. | ||
276 | * | ||
277 | * This ioctl will ask KMS to schedule a page flip for the specified | ||
278 | * crtc. Once any pending rendering targeting the specified fb (as of | ||
279 | * ioctl time) has completed, the crtc will be reprogrammed to display | ||
280 | * that fb after the next vertical refresh. The ioctl returns | ||
281 | * immediately, but subsequent rendering to the current fb will block | ||
282 | * in the execbuffer ioctl until the page flip happens. If a page | ||
283 | * flip is already pending as the ioctl is called, EBUSY will be | ||
284 | * returned. | ||
285 | * | ||
286 | * The ioctl supports one flag, DRM_MODE_PAGE_FLIP_EVENT, which will | ||
287 | * request that drm sends back a vblank event (see drm.h: struct | ||
288 | * drm_event_vblank) when the page flip is done. The user_data field | ||
289 | * passed in with this ioctl will be returned as the user_data field | ||
290 | * in the vblank event struct. | ||
291 | * | ||
292 | * The reserved field must be zero until we figure out something | ||
293 | * clever to use it for. | ||
294 | */ | ||
295 | |||
296 | struct drm_mode_crtc_page_flip { | ||
297 | __u32 crtc_id; | ||
298 | __u32 fb_id; | ||
299 | __u32 flags; | ||
300 | __u32 reserved; | ||
301 | __u64 user_data; | ||
302 | }; | ||
303 | |||
271 | #endif | 304 | #endif |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 57d41b0abce2..7b40cda57a70 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -361,6 +361,24 @@ static inline void i2c_set_adapdata(struct i2c_adapter *dev, void *data) | |||
361 | dev_set_drvdata(&dev->dev, data); | 361 | dev_set_drvdata(&dev->dev, data); |
362 | } | 362 | } |
363 | 363 | ||
364 | /** | ||
365 | * i2c_lock_adapter - Prevent access to an I2C bus segment | ||
366 | * @adapter: Target I2C bus segment | ||
367 | */ | ||
368 | static inline void i2c_lock_adapter(struct i2c_adapter *adapter) | ||
369 | { | ||
370 | mutex_lock(&adapter->bus_lock); | ||
371 | } | ||
372 | |||
373 | /** | ||
374 | * i2c_unlock_adapter - Reauthorize access to an I2C bus segment | ||
375 | * @adapter: Target I2C bus segment | ||
376 | */ | ||
377 | static inline void i2c_unlock_adapter(struct i2c_adapter *adapter) | ||
378 | { | ||
379 | mutex_unlock(&adapter->bus_lock); | ||
380 | } | ||
381 | |||
364 | /*flags for the client struct: */ | 382 | /*flags for the client struct: */ |
365 | #define I2C_CLIENT_PEC 0x04 /* Use Packet Error Checking */ | 383 | #define I2C_CLIENT_PEC 0x04 /* Use Packet Error Checking */ |
366 | #define I2C_CLIENT_TEN 0x10 /* we have a ten bit chip address */ | 384 | #define I2C_CLIENT_TEN 0x10 /* we have a ten bit chip address */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index b0f0f3851cd4..9ceb392cb984 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -543,7 +543,7 @@ | |||
543 | #define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450 | 543 | #define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450 |
544 | #define PCI_DEVICE_ID_AMD_8131_APIC 0x7451 | 544 | #define PCI_DEVICE_ID_AMD_8131_APIC 0x7451 |
545 | #define PCI_DEVICE_ID_AMD_8132_BRIDGE 0x7458 | 545 | #define PCI_DEVICE_ID_AMD_8132_BRIDGE 0x7458 |
546 | #define PCI_DEVICE_ID_AMD_SB900_SMBUS 0x780b | 546 | #define PCI_DEVICE_ID_AMD_HUDSON2_SMBUS 0x780b |
547 | #define PCI_DEVICE_ID_AMD_CS5535_IDE 0x208F | 547 | #define PCI_DEVICE_ID_AMD_CS5535_IDE 0x208F |
548 | #define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090 | 548 | #define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090 |
549 | #define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091 | 549 | #define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091 |
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index cbdd6284996d..5cf7270e3ffc 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h | |||
@@ -255,11 +255,9 @@ static inline bool nf_ct_kill(struct nf_conn *ct) | |||
255 | } | 255 | } |
256 | 256 | ||
257 | /* These are for NAT. Icky. */ | 257 | /* These are for NAT. Icky. */ |
258 | /* Update TCP window tracking data when NAT mangles the packet */ | 258 | extern s16 (*nf_ct_nat_offset)(const struct nf_conn *ct, |
259 | extern void nf_conntrack_tcp_update(const struct sk_buff *skb, | 259 | enum ip_conntrack_dir dir, |
260 | unsigned int dataoff, | 260 | u32 seq); |
261 | struct nf_conn *ct, int dir, | ||
262 | s16 offset); | ||
263 | 261 | ||
264 | /* Fake conntrack entry for untracked connections */ | 262 | /* Fake conntrack entry for untracked connections */ |
265 | extern struct nf_conn nf_conntrack_untracked; | 263 | extern struct nf_conn nf_conntrack_untracked; |
diff --git a/include/net/netfilter/nf_nat_helper.h b/include/net/netfilter/nf_nat_helper.h index 237a961f40e1..4222220920a5 100644 --- a/include/net/netfilter/nf_nat_helper.h +++ b/include/net/netfilter/nf_nat_helper.h | |||
@@ -32,4 +32,8 @@ extern int (*nf_nat_seq_adjust_hook)(struct sk_buff *skb, | |||
32 | * to port ct->master->saved_proto. */ | 32 | * to port ct->master->saved_proto. */ |
33 | extern void nf_nat_follow_master(struct nf_conn *ct, | 33 | extern void nf_nat_follow_master(struct nf_conn *ct, |
34 | struct nf_conntrack_expect *this); | 34 | struct nf_conntrack_expect *this); |
35 | |||
36 | extern s16 nf_nat_get_offset(const struct nf_conn *ct, | ||
37 | enum ip_conntrack_dir dir, | ||
38 | u32 seq); | ||
35 | #endif | 39 | #endif |