diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 67 |
1 files changed, 65 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index b99b6a841d95..f97592609da4 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -150,7 +150,27 @@ struct drm_i915_error_state { | |||
150 | u32 instps; | 150 | u32 instps; |
151 | u32 instdone1; | 151 | u32 instdone1; |
152 | u32 seqno; | 152 | u32 seqno; |
153 | u64 bbaddr; | ||
153 | struct timeval time; | 154 | struct timeval time; |
155 | struct drm_i915_error_object { | ||
156 | int page_count; | ||
157 | u32 gtt_offset; | ||
158 | u32 *pages[0]; | ||
159 | } *ringbuffer, *batchbuffer[2]; | ||
160 | struct drm_i915_error_buffer { | ||
161 | size_t size; | ||
162 | u32 name; | ||
163 | u32 seqno; | ||
164 | u32 gtt_offset; | ||
165 | u32 read_domains; | ||
166 | u32 write_domain; | ||
167 | u32 fence_reg; | ||
168 | s32 pinned:2; | ||
169 | u32 tiling:2; | ||
170 | u32 dirty:1; | ||
171 | u32 purgeable:1; | ||
172 | } *active_bo; | ||
173 | u32 active_bo_count; | ||
154 | }; | 174 | }; |
155 | 175 | ||
156 | struct drm_i915_display_funcs { | 176 | struct drm_i915_display_funcs { |
@@ -192,6 +212,14 @@ struct intel_device_info { | |||
192 | u8 cursor_needs_physical : 1; | 212 | u8 cursor_needs_physical : 1; |
193 | }; | 213 | }; |
194 | 214 | ||
215 | enum no_fbc_reason { | ||
216 | FBC_STOLEN_TOO_SMALL, /* not enough space to hold compressed buffers */ | ||
217 | FBC_UNSUPPORTED_MODE, /* interlace or doublescanned mode */ | ||
218 | FBC_MODE_TOO_LARGE, /* mode too large for compression */ | ||
219 | FBC_BAD_PLANE, /* fbc not supported on plane */ | ||
220 | FBC_NOT_TILED, /* buffer not tiled */ | ||
221 | }; | ||
222 | |||
195 | typedef struct drm_i915_private { | 223 | typedef struct drm_i915_private { |
196 | struct drm_device *dev; | 224 | struct drm_device *dev; |
197 | 225 | ||
@@ -452,6 +480,7 @@ typedef struct drm_i915_private { | |||
452 | u32 savePIPEB_DATA_N1; | 480 | u32 savePIPEB_DATA_N1; |
453 | u32 savePIPEB_LINK_M1; | 481 | u32 savePIPEB_LINK_M1; |
454 | u32 savePIPEB_LINK_N1; | 482 | u32 savePIPEB_LINK_N1; |
483 | u32 saveMCHBAR_RENDER_STANDBY; | ||
455 | 484 | ||
456 | struct { | 485 | struct { |
457 | struct drm_mm gtt_space; | 486 | struct drm_mm gtt_space; |
@@ -590,6 +619,14 @@ typedef struct drm_i915_private { | |||
590 | int child_dev_num; | 619 | int child_dev_num; |
591 | struct child_device_config *child_dev; | 620 | struct child_device_config *child_dev; |
592 | struct drm_connector *int_lvds_connector; | 621 | struct drm_connector *int_lvds_connector; |
622 | |||
623 | bool mchbar_need_disable; | ||
624 | |||
625 | u8 cur_delay; | ||
626 | u8 min_delay; | ||
627 | u8 max_delay; | ||
628 | |||
629 | enum no_fbc_reason no_fbc_reason; | ||
593 | } drm_i915_private_t; | 630 | } drm_i915_private_t; |
594 | 631 | ||
595 | /** driver private structure attached to each drm_gem_object */ | 632 | /** driver private structure attached to each drm_gem_object */ |
@@ -761,6 +798,7 @@ extern int i965_reset(struct drm_device *dev, u8 flags); | |||
761 | 798 | ||
762 | /* i915_irq.c */ | 799 | /* i915_irq.c */ |
763 | void i915_hangcheck_elapsed(unsigned long data); | 800 | void i915_hangcheck_elapsed(unsigned long data); |
801 | void i915_destroy_error_state(struct drm_device *dev); | ||
764 | extern int i915_irq_emit(struct drm_device *dev, void *data, | 802 | extern int i915_irq_emit(struct drm_device *dev, void *data, |
765 | struct drm_file *file_priv); | 803 | struct drm_file *file_priv); |
766 | extern int i915_irq_wait(struct drm_device *dev, void *data, | 804 | extern int i915_irq_wait(struct drm_device *dev, void *data, |
@@ -897,7 +935,8 @@ void i915_gem_object_do_bit_17_swizzle(struct drm_gem_object *obj); | |||
897 | void i915_gem_object_save_bit_17_swizzle(struct drm_gem_object *obj); | 935 | void i915_gem_object_save_bit_17_swizzle(struct drm_gem_object *obj); |
898 | bool i915_tiling_ok(struct drm_device *dev, int stride, int size, | 936 | bool i915_tiling_ok(struct drm_device *dev, int stride, int size, |
899 | int tiling_mode); | 937 | int tiling_mode); |
900 | bool i915_obj_fenceable(struct drm_device *dev, struct drm_gem_object *obj); | 938 | bool i915_gem_object_fence_offset_ok(struct drm_gem_object *obj, |
939 | int tiling_mode); | ||
901 | 940 | ||
902 | /* i915_gem_debug.c */ | 941 | /* i915_gem_debug.c */ |
903 | void i915_gem_dump_object(struct drm_gem_object *obj, int len, | 942 | void i915_gem_dump_object(struct drm_gem_object *obj, int len, |
@@ -1026,7 +1065,7 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); | |||
1026 | #define IS_845G(dev) ((dev)->pci_device == 0x2562) | 1065 | #define IS_845G(dev) ((dev)->pci_device == 0x2562) |
1027 | #define IS_I85X(dev) ((dev)->pci_device == 0x3582) | 1066 | #define IS_I85X(dev) ((dev)->pci_device == 0x3582) |
1028 | #define IS_I865G(dev) ((dev)->pci_device == 0x2572) | 1067 | #define IS_I865G(dev) ((dev)->pci_device == 0x2572) |
1029 | #define IS_I8XX(dev) (INTEL_INFO(dev)->is_i8xx) | 1068 | #define IS_GEN2(dev) (INTEL_INFO(dev)->is_i8xx) |
1030 | #define IS_I915G(dev) (INTEL_INFO(dev)->is_i915g) | 1069 | #define IS_I915G(dev) (INTEL_INFO(dev)->is_i915g) |
1031 | #define IS_I915GM(dev) ((dev)->pci_device == 0x2592) | 1070 | #define IS_I915GM(dev) ((dev)->pci_device == 0x2592) |
1032 | #define IS_I945G(dev) ((dev)->pci_device == 0x2772) | 1071 | #define IS_I945G(dev) ((dev)->pci_device == 0x2772) |
@@ -1045,8 +1084,29 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); | |||
1045 | #define IS_I9XX(dev) (INTEL_INFO(dev)->is_i9xx) | 1084 | #define IS_I9XX(dev) (INTEL_INFO(dev)->is_i9xx) |
1046 | #define IS_MOBILE(dev) (INTEL_INFO(dev)->is_mobile) | 1085 | #define IS_MOBILE(dev) (INTEL_INFO(dev)->is_mobile) |
1047 | 1086 | ||
1087 | #define IS_GEN3(dev) (IS_I915G(dev) || \ | ||
1088 | IS_I915GM(dev) || \ | ||
1089 | IS_I945G(dev) || \ | ||
1090 | IS_I945GM(dev) || \ | ||
1091 | IS_G33(dev) || \ | ||
1092 | IS_PINEVIEW(dev)) | ||
1093 | #define IS_GEN4(dev) ((dev)->pci_device == 0x2972 || \ | ||
1094 | (dev)->pci_device == 0x2982 || \ | ||
1095 | (dev)->pci_device == 0x2992 || \ | ||
1096 | (dev)->pci_device == 0x29A2 || \ | ||
1097 | (dev)->pci_device == 0x2A02 || \ | ||
1098 | (dev)->pci_device == 0x2A12 || \ | ||
1099 | (dev)->pci_device == 0x2E02 || \ | ||
1100 | (dev)->pci_device == 0x2E12 || \ | ||
1101 | (dev)->pci_device == 0x2E22 || \ | ||
1102 | (dev)->pci_device == 0x2E32 || \ | ||
1103 | (dev)->pci_device == 0x2A42 || \ | ||
1104 | (dev)->pci_device == 0x2E42) | ||
1105 | |||
1048 | #define I915_NEED_GFX_HWS(dev) (INTEL_INFO(dev)->need_gfx_hws) | 1106 | #define I915_NEED_GFX_HWS(dev) (INTEL_INFO(dev)->need_gfx_hws) |
1049 | 1107 | ||
1108 | #define IS_GEN6(dev) ((dev)->pci_device == 0x0102) | ||
1109 | |||
1050 | /* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte | 1110 | /* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte |
1051 | * rows, which changed the alignment requirements and fence programming. | 1111 | * rows, which changed the alignment requirements and fence programming. |
1052 | */ | 1112 | */ |
@@ -1067,6 +1127,9 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); | |||
1067 | #define I915_HAS_FBC(dev) (INTEL_INFO(dev)->has_fbc) | 1127 | #define I915_HAS_FBC(dev) (INTEL_INFO(dev)->has_fbc) |
1068 | #define I915_HAS_RC6(dev) (INTEL_INFO(dev)->has_rc6) | 1128 | #define I915_HAS_RC6(dev) (INTEL_INFO(dev)->has_rc6) |
1069 | 1129 | ||
1130 | #define HAS_PCH_SPLIT(dev) (IS_IRONLAKE(dev) || \ | ||
1131 | IS_GEN6(dev)) | ||
1132 | |||
1070 | #define PRIMARY_RINGBUFFER_SIZE (128*1024) | 1133 | #define PRIMARY_RINGBUFFER_SIZE (128*1024) |
1071 | 1134 | ||
1072 | #endif | 1135 | #endif |