diff options
author | Dave Airlie <airlied@redhat.com> | 2010-10-25 19:23:22 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-10-25 19:23:22 -0400 |
commit | e3ce8a0b277438591844847ac7c89a980b4cfa6d (patch) | |
tree | c9bf47675403a54be2e0c54df9357d2b9c65326b /drivers/gpu/drm/i915/i915_drv.h | |
parent | e1efc9b6ac22c605fd326b3f6af9b393325d43b4 (diff) | |
parent | 641934069d29211baf82afb93622a426172b67b6 (diff) |
Merge remote branch 'intel/drm-intel-next' of ../drm-next into drm-core-next
* 'intel/drm-intel-next' of ../drm-next: (63 commits)
drm/i915: Move gpu_write_list to per-ring
drm/i915: Invalidate the to-ring, flush the old-ring when updating domains
drm/i915/ringbuffer: Write the value passed in to the tail register
agp/intel: Restore valid PTE bit for Sandybridge after bdd3072
drm/i915: Fix flushing regression from 9af90d19f
drm/i915/sdvo: Remove unused encoding member
i915: enable AVI infoframe for intel_hdmi.c [v4]
drm/i915: Fix current fb blocking for page flip
drm/i915: IS_IRONLAKE is synonymous with gen == 5
drm/i915: Enable SandyBridge blitter ring
drm/i915/ringbuffer: Remove broken intel_fill_struct()
drm/i915/ringbuffer: Fix emit batch buffer regression from 8187a2b
drm/i915: Copy the updated reloc->presumed_offset back to the user
drm/i915: Track objects in global active list (as well as per-ring)
drm/i915: Simplify most HAS_BSD() checks
drm/i915: cache the last object lookup during pin_and_relocate()
drm/i915: Do interrupible mutex lock first to avoid locking for unreference
drivers: gpu: drm: i915: Fix a typo.
agp/intel: Also add B43.1 to list of supported devices
drm/i915: rearrange mutex acquisition for pread
...
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 65 |
1 files changed, 39 insertions, 26 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 73ad8bff2c2..2c2c19b6285 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -206,7 +206,6 @@ struct intel_device_info { | |||
206 | u8 is_pineview : 1; | 206 | u8 is_pineview : 1; |
207 | u8 is_broadwater : 1; | 207 | u8 is_broadwater : 1; |
208 | u8 is_crestline : 1; | 208 | u8 is_crestline : 1; |
209 | u8 is_ironlake : 1; | ||
210 | u8 has_fbc : 1; | 209 | u8 has_fbc : 1; |
211 | u8 has_rc6 : 1; | 210 | u8 has_rc6 : 1; |
212 | u8 has_pipe_cxsr : 1; | 211 | u8 has_pipe_cxsr : 1; |
@@ -216,6 +215,7 @@ struct intel_device_info { | |||
216 | u8 overlay_needs_physical : 1; | 215 | u8 overlay_needs_physical : 1; |
217 | u8 supports_tv : 1; | 216 | u8 supports_tv : 1; |
218 | u8 has_bsd_ring : 1; | 217 | u8 has_bsd_ring : 1; |
218 | u8 has_blt_ring : 1; | ||
219 | }; | 219 | }; |
220 | 220 | ||
221 | enum no_fbc_reason { | 221 | enum no_fbc_reason { |
@@ -255,6 +255,7 @@ typedef struct drm_i915_private { | |||
255 | struct pci_dev *bridge_dev; | 255 | struct pci_dev *bridge_dev; |
256 | struct intel_ring_buffer render_ring; | 256 | struct intel_ring_buffer render_ring; |
257 | struct intel_ring_buffer bsd_ring; | 257 | struct intel_ring_buffer bsd_ring; |
258 | struct intel_ring_buffer blt_ring; | ||
258 | uint32_t next_seqno; | 259 | uint32_t next_seqno; |
259 | 260 | ||
260 | drm_dma_handle_t *status_page_dmah; | 261 | drm_dma_handle_t *status_page_dmah; |
@@ -339,17 +340,18 @@ typedef struct drm_i915_private { | |||
339 | unsigned int int_crt_support:1; | 340 | unsigned int int_crt_support:1; |
340 | unsigned int lvds_use_ssc:1; | 341 | unsigned int lvds_use_ssc:1; |
341 | int lvds_ssc_freq; | 342 | int lvds_ssc_freq; |
342 | |||
343 | struct { | 343 | struct { |
344 | u8 rate:4; | 344 | int rate; |
345 | u8 lanes:4; | 345 | int lanes; |
346 | u8 preemphasis:4; | 346 | int preemphasis; |
347 | u8 vswing:4; | 347 | int vswing; |
348 | 348 | ||
349 | u8 initialized:1; | 349 | bool initialized; |
350 | u8 support:1; | 350 | bool support; |
351 | u8 bpp:6; | 351 | int bpp; |
352 | struct edp_power_seq pps; | ||
352 | } edp; | 353 | } edp; |
354 | bool no_aux_handshake; | ||
353 | 355 | ||
354 | struct notifier_block lid_notifier; | 356 | struct notifier_block lid_notifier; |
355 | 357 | ||
@@ -547,6 +549,17 @@ typedef struct drm_i915_private { | |||
547 | struct list_head shrink_list; | 549 | struct list_head shrink_list; |
548 | 550 | ||
549 | /** | 551 | /** |
552 | * List of objects currently involved in rendering. | ||
553 | * | ||
554 | * Includes buffers having the contents of their GPU caches | ||
555 | * flushed, not necessarily primitives. last_rendering_seqno | ||
556 | * represents when the rendering involved will be completed. | ||
557 | * | ||
558 | * A reference is held on the buffer while on this list. | ||
559 | */ | ||
560 | struct list_head active_list; | ||
561 | |||
562 | /** | ||
550 | * List of objects which are not in the ringbuffer but which | 563 | * List of objects which are not in the ringbuffer but which |
551 | * still have a write_domain which needs to be flushed before | 564 | * still have a write_domain which needs to be flushed before |
552 | * unbinding. | 565 | * unbinding. |
@@ -558,15 +571,6 @@ typedef struct drm_i915_private { | |||
558 | struct list_head flushing_list; | 571 | struct list_head flushing_list; |
559 | 572 | ||
560 | /** | 573 | /** |
561 | * List of objects currently pending a GPU write flush. | ||
562 | * | ||
563 | * All elements on this list will belong to either the | ||
564 | * active_list or flushing_list, last_rendering_seqno can | ||
565 | * be used to differentiate between the two elements. | ||
566 | */ | ||
567 | struct list_head gpu_write_list; | ||
568 | |||
569 | /** | ||
570 | * LRU list of objects which are not in the ringbuffer and | 574 | * LRU list of objects which are not in the ringbuffer and |
571 | * are ready to unbind, but are still in the GTT. | 575 | * are ready to unbind, but are still in the GTT. |
572 | * | 576 | * |
@@ -713,7 +717,8 @@ struct drm_i915_gem_object { | |||
713 | struct drm_mm_node *gtt_space; | 717 | struct drm_mm_node *gtt_space; |
714 | 718 | ||
715 | /** This object's place on the active/flushing/inactive lists */ | 719 | /** This object's place on the active/flushing/inactive lists */ |
716 | struct list_head list; | 720 | struct list_head ring_list; |
721 | struct list_head mm_list; | ||
717 | /** This object's place on GPU write list */ | 722 | /** This object's place on GPU write list */ |
718 | struct list_head gpu_write_list; | 723 | struct list_head gpu_write_list; |
719 | /** This object's place on eviction list */ | 724 | /** This object's place on eviction list */ |
@@ -1136,6 +1141,15 @@ static inline void intel_opregion_gse_intr(struct drm_device *dev) { return; } | |||
1136 | static inline void intel_opregion_enable_asle(struct drm_device *dev) { return; } | 1141 | static inline void intel_opregion_enable_asle(struct drm_device *dev) { return; } |
1137 | #endif | 1142 | #endif |
1138 | 1143 | ||
1144 | /* intel_acpi.c */ | ||
1145 | #ifdef CONFIG_ACPI | ||
1146 | extern void intel_register_dsm_handler(void); | ||
1147 | extern void intel_unregister_dsm_handler(void); | ||
1148 | #else | ||
1149 | static inline void intel_register_dsm_handler(void) { return; } | ||
1150 | static inline void intel_unregister_dsm_handler(void) { return; } | ||
1151 | #endif /* CONFIG_ACPI */ | ||
1152 | |||
1139 | /* modesetting */ | 1153 | /* modesetting */ |
1140 | extern void intel_modeset_init(struct drm_device *dev); | 1154 | extern void intel_modeset_init(struct drm_device *dev); |
1141 | extern void intel_modeset_cleanup(struct drm_device *dev); | 1155 | extern void intel_modeset_cleanup(struct drm_device *dev); |
@@ -1268,7 +1282,6 @@ static inline void i915_write(struct drm_i915_private *dev_priv, u32 reg, | |||
1268 | #define IS_G33(dev) (INTEL_INFO(dev)->is_g33) | 1282 | #define IS_G33(dev) (INTEL_INFO(dev)->is_g33) |
1269 | #define IS_IRONLAKE_D(dev) ((dev)->pci_device == 0x0042) | 1283 | #define IS_IRONLAKE_D(dev) ((dev)->pci_device == 0x0042) |
1270 | #define IS_IRONLAKE_M(dev) ((dev)->pci_device == 0x0046) | 1284 | #define IS_IRONLAKE_M(dev) ((dev)->pci_device == 0x0046) |
1271 | #define IS_IRONLAKE(dev) (INTEL_INFO(dev)->is_ironlake) | ||
1272 | #define IS_MOBILE(dev) (INTEL_INFO(dev)->is_mobile) | 1285 | #define IS_MOBILE(dev) (INTEL_INFO(dev)->is_mobile) |
1273 | 1286 | ||
1274 | #define IS_GEN2(dev) (INTEL_INFO(dev)->gen == 2) | 1287 | #define IS_GEN2(dev) (INTEL_INFO(dev)->gen == 2) |
@@ -1278,6 +1291,7 @@ static inline void i915_write(struct drm_i915_private *dev_priv, u32 reg, | |||
1278 | #define IS_GEN6(dev) (INTEL_INFO(dev)->gen == 6) | 1291 | #define IS_GEN6(dev) (INTEL_INFO(dev)->gen == 6) |
1279 | 1292 | ||
1280 | #define HAS_BSD(dev) (INTEL_INFO(dev)->has_bsd_ring) | 1293 | #define HAS_BSD(dev) (INTEL_INFO(dev)->has_bsd_ring) |
1294 | #define HAS_BLT(dev) (INTEL_INFO(dev)->has_blt_ring) | ||
1281 | #define I915_NEED_GFX_HWS(dev) (INTEL_INFO(dev)->need_gfx_hws) | 1295 | #define I915_NEED_GFX_HWS(dev) (INTEL_INFO(dev)->need_gfx_hws) |
1282 | 1296 | ||
1283 | #define HAS_OVERLAY(dev) (INTEL_INFO(dev)->has_overlay) | 1297 | #define HAS_OVERLAY(dev) (INTEL_INFO(dev)->has_overlay) |
@@ -1289,8 +1303,8 @@ static inline void i915_write(struct drm_i915_private *dev_priv, u32 reg, | |||
1289 | #define HAS_128_BYTE_Y_TILING(dev) (!IS_GEN2(dev) && !(IS_I915G(dev) || \ | 1303 | #define HAS_128_BYTE_Y_TILING(dev) (!IS_GEN2(dev) && !(IS_I915G(dev) || \ |
1290 | IS_I915GM(dev))) | 1304 | IS_I915GM(dev))) |
1291 | #define SUPPORTS_DIGITAL_OUTPUTS(dev) (!IS_GEN2(dev) && !IS_PINEVIEW(dev)) | 1305 | #define SUPPORTS_DIGITAL_OUTPUTS(dev) (!IS_GEN2(dev) && !IS_PINEVIEW(dev)) |
1292 | #define SUPPORTS_INTEGRATED_HDMI(dev) (IS_G4X(dev) || IS_IRONLAKE(dev)) | 1306 | #define SUPPORTS_INTEGRATED_HDMI(dev) (IS_G4X(dev) || IS_GEN5(dev)) |
1293 | #define SUPPORTS_INTEGRATED_DP(dev) (IS_G4X(dev) || IS_IRONLAKE(dev)) | 1307 | #define SUPPORTS_INTEGRATED_DP(dev) (IS_G4X(dev) || IS_GEN5(dev)) |
1294 | #define SUPPORTS_EDP(dev) (IS_IRONLAKE_M(dev)) | 1308 | #define SUPPORTS_EDP(dev) (IS_IRONLAKE_M(dev)) |
1295 | #define SUPPORTS_TV(dev) (INTEL_INFO(dev)->supports_tv) | 1309 | #define SUPPORTS_TV(dev) (INTEL_INFO(dev)->supports_tv) |
1296 | #define I915_HAS_HOTPLUG(dev) (INTEL_INFO(dev)->has_hotplug) | 1310 | #define I915_HAS_HOTPLUG(dev) (INTEL_INFO(dev)->has_hotplug) |
@@ -1302,9 +1316,8 @@ static inline void i915_write(struct drm_i915_private *dev_priv, u32 reg, | |||
1302 | #define I915_HAS_FBC(dev) (INTEL_INFO(dev)->has_fbc) | 1316 | #define I915_HAS_FBC(dev) (INTEL_INFO(dev)->has_fbc) |
1303 | #define I915_HAS_RC6(dev) (INTEL_INFO(dev)->has_rc6) | 1317 | #define I915_HAS_RC6(dev) (INTEL_INFO(dev)->has_rc6) |
1304 | 1318 | ||
1305 | #define HAS_PCH_SPLIT(dev) (IS_IRONLAKE(dev) || \ | 1319 | #define HAS_PCH_SPLIT(dev) (IS_GEN5(dev) || IS_GEN6(dev)) |
1306 | IS_GEN6(dev)) | 1320 | #define HAS_PIPE_CONTROL(dev) (IS_GEN5(dev) || IS_GEN6(dev)) |
1307 | #define HAS_PIPE_CONTROL(dev) (IS_IRONLAKE(dev) || IS_GEN6(dev)) | ||
1308 | 1321 | ||
1309 | #define INTEL_PCH_TYPE(dev) (((struct drm_i915_private *)(dev)->dev_private)->pch_type) | 1322 | #define INTEL_PCH_TYPE(dev) (((struct drm_i915_private *)(dev)->dev_private)->pch_type) |
1310 | #define HAS_PCH_CPT(dev) (INTEL_PCH_TYPE(dev) == PCH_CPT) | 1323 | #define HAS_PCH_CPT(dev) (INTEL_PCH_TYPE(dev) == PCH_CPT) |