diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 06a37f4fd74b..554bef7a3b9c 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -107,6 +107,7 @@ struct opregion_header; | |||
107 | struct opregion_acpi; | 107 | struct opregion_acpi; |
108 | struct opregion_swsci; | 108 | struct opregion_swsci; |
109 | struct opregion_asle; | 109 | struct opregion_asle; |
110 | struct drm_i915_private; | ||
110 | 111 | ||
111 | struct intel_opregion { | 112 | struct intel_opregion { |
112 | struct opregion_header *header; | 113 | struct opregion_header *header; |
@@ -126,6 +127,9 @@ struct drm_i915_master_private { | |||
126 | struct _drm_i915_sarea *sarea_priv; | 127 | struct _drm_i915_sarea *sarea_priv; |
127 | }; | 128 | }; |
128 | #define I915_FENCE_REG_NONE -1 | 129 | #define I915_FENCE_REG_NONE -1 |
130 | #define I915_MAX_NUM_FENCES 16 | ||
131 | /* 16 fences + sign bit for FENCE_REG_NONE */ | ||
132 | #define I915_MAX_NUM_FENCE_BITS 5 | ||
129 | 133 | ||
130 | struct drm_i915_fence_reg { | 134 | struct drm_i915_fence_reg { |
131 | struct list_head lru_list; | 135 | struct list_head lru_list; |
@@ -168,7 +172,7 @@ struct drm_i915_error_state { | |||
168 | u32 instdone1; | 172 | u32 instdone1; |
169 | u32 seqno; | 173 | u32 seqno; |
170 | u64 bbaddr; | 174 | u64 bbaddr; |
171 | u64 fence[16]; | 175 | u64 fence[I915_MAX_NUM_FENCES]; |
172 | struct timeval time; | 176 | struct timeval time; |
173 | struct drm_i915_error_object { | 177 | struct drm_i915_error_object { |
174 | int page_count; | 178 | int page_count; |
@@ -182,7 +186,7 @@ struct drm_i915_error_state { | |||
182 | u32 gtt_offset; | 186 | u32 gtt_offset; |
183 | u32 read_domains; | 187 | u32 read_domains; |
184 | u32 write_domain; | 188 | u32 write_domain; |
185 | s32 fence_reg:5; | 189 | s32 fence_reg:I915_MAX_NUM_FENCE_BITS; |
186 | s32 pinned:2; | 190 | s32 pinned:2; |
187 | u32 tiling:2; | 191 | u32 tiling:2; |
188 | u32 dirty:1; | 192 | u32 dirty:1; |
@@ -218,6 +222,8 @@ struct drm_i915_display_funcs { | |||
218 | struct drm_i915_gem_object *obj); | 222 | struct drm_i915_gem_object *obj); |
219 | int (*update_plane)(struct drm_crtc *crtc, struct drm_framebuffer *fb, | 223 | int (*update_plane)(struct drm_crtc *crtc, struct drm_framebuffer *fb, |
220 | int x, int y); | 224 | int x, int y); |
225 | void (*force_wake_get)(struct drm_i915_private *dev_priv); | ||
226 | void (*force_wake_put)(struct drm_i915_private *dev_priv); | ||
221 | /* clock updates for mode set */ | 227 | /* clock updates for mode set */ |
222 | /* cursor updates */ | 228 | /* cursor updates */ |
223 | /* render clock increase/decrease */ | 229 | /* render clock increase/decrease */ |
@@ -375,7 +381,7 @@ typedef struct drm_i915_private { | |||
375 | struct notifier_block lid_notifier; | 381 | struct notifier_block lid_notifier; |
376 | 382 | ||
377 | int crt_ddc_pin; | 383 | int crt_ddc_pin; |
378 | struct drm_i915_fence_reg fence_regs[16]; /* assume 965 */ | 384 | struct drm_i915_fence_reg fence_regs[I915_MAX_NUM_FENCES]; /* assume 965 */ |
379 | int fence_reg_start; /* 4 if userland hasn't ioctl'd us yet */ | 385 | int fence_reg_start; /* 4 if userland hasn't ioctl'd us yet */ |
380 | int num_fence_regs; /* 8 on pre-965, 16 otherwise */ | 386 | int num_fence_regs; /* 8 on pre-965, 16 otherwise */ |
381 | 387 | ||
@@ -506,7 +512,7 @@ typedef struct drm_i915_private { | |||
506 | u8 saveAR[21]; | 512 | u8 saveAR[21]; |
507 | u8 saveDACMASK; | 513 | u8 saveDACMASK; |
508 | u8 saveCR[37]; | 514 | u8 saveCR[37]; |
509 | uint64_t saveFENCE[16]; | 515 | uint64_t saveFENCE[I915_MAX_NUM_FENCES]; |
510 | u32 saveCURACNTR; | 516 | u32 saveCURACNTR; |
511 | u32 saveCURAPOS; | 517 | u32 saveCURAPOS; |
512 | u32 saveCURABASE; | 518 | u32 saveCURABASE; |
@@ -707,6 +713,7 @@ typedef struct drm_i915_private { | |||
707 | 713 | ||
708 | u64 last_count1; | 714 | u64 last_count1; |
709 | unsigned long last_time1; | 715 | unsigned long last_time1; |
716 | unsigned long chipset_power; | ||
710 | u64 last_count2; | 717 | u64 last_count2; |
711 | struct timespec last_time2; | 718 | struct timespec last_time2; |
712 | unsigned long gfx_power; | 719 | unsigned long gfx_power; |
@@ -777,10 +784,8 @@ struct drm_i915_gem_object { | |||
777 | * Fence register bits (if any) for this object. Will be set | 784 | * Fence register bits (if any) for this object. Will be set |
778 | * as needed when mapped into the GTT. | 785 | * as needed when mapped into the GTT. |
779 | * Protected by dev->struct_mutex. | 786 | * Protected by dev->struct_mutex. |
780 | * | ||
781 | * Size: 4 bits for 16 fences + sign (for FENCE_REG_NONE) | ||
782 | */ | 787 | */ |
783 | signed int fence_reg:5; | 788 | signed int fence_reg:I915_MAX_NUM_FENCE_BITS; |
784 | 789 | ||
785 | /** | 790 | /** |
786 | * Advice: are the backing pages purgeable? | 791 | * Advice: are the backing pages purgeable? |
@@ -997,12 +1002,12 @@ extern int i915_max_ioctl; | |||
997 | extern unsigned int i915_fbpercrtc __always_unused; | 1002 | extern unsigned int i915_fbpercrtc __always_unused; |
998 | extern int i915_panel_ignore_lid __read_mostly; | 1003 | extern int i915_panel_ignore_lid __read_mostly; |
999 | extern unsigned int i915_powersave __read_mostly; | 1004 | extern unsigned int i915_powersave __read_mostly; |
1000 | extern unsigned int i915_semaphores __read_mostly; | 1005 | extern int i915_semaphores __read_mostly; |
1001 | extern unsigned int i915_lvds_downclock __read_mostly; | 1006 | extern unsigned int i915_lvds_downclock __read_mostly; |
1002 | extern unsigned int i915_panel_use_ssc __read_mostly; | 1007 | extern int i915_panel_use_ssc __read_mostly; |
1003 | extern int i915_vbt_sdvo_panel_type __read_mostly; | 1008 | extern int i915_vbt_sdvo_panel_type __read_mostly; |
1004 | extern unsigned int i915_enable_rc6 __read_mostly; | 1009 | extern int i915_enable_rc6 __read_mostly; |
1005 | extern unsigned int i915_enable_fbc __read_mostly; | 1010 | extern int i915_enable_fbc __read_mostly; |
1006 | extern bool i915_enable_hangcheck __read_mostly; | 1011 | extern bool i915_enable_hangcheck __read_mostly; |
1007 | 1012 | ||
1008 | extern int i915_suspend(struct drm_device *dev, pm_message_t state); | 1013 | extern int i915_suspend(struct drm_device *dev, pm_message_t state); |
@@ -1307,6 +1312,11 @@ extern void gen6_set_rps(struct drm_device *dev, u8 val); | |||
1307 | extern void intel_detect_pch(struct drm_device *dev); | 1312 | extern void intel_detect_pch(struct drm_device *dev); |
1308 | extern int intel_trans_dp_port_sel(struct drm_crtc *crtc); | 1313 | extern int intel_trans_dp_port_sel(struct drm_crtc *crtc); |
1309 | 1314 | ||
1315 | extern void __gen6_gt_force_wake_get(struct drm_i915_private *dev_priv); | ||
1316 | extern void __gen6_gt_force_wake_mt_get(struct drm_i915_private *dev_priv); | ||
1317 | extern void __gen6_gt_force_wake_put(struct drm_i915_private *dev_priv); | ||
1318 | extern void __gen6_gt_force_wake_mt_put(struct drm_i915_private *dev_priv); | ||
1319 | |||
1310 | /* overlay */ | 1320 | /* overlay */ |
1311 | #ifdef CONFIG_DEBUG_FS | 1321 | #ifdef CONFIG_DEBUG_FS |
1312 | extern struct intel_overlay_error_state *intel_overlay_capture_error_state(struct drm_device *dev); | 1322 | extern struct intel_overlay_error_state *intel_overlay_capture_error_state(struct drm_device *dev); |
@@ -1351,8 +1361,9 @@ void __gen6_gt_wait_for_fifo(struct drm_i915_private *dev_priv); | |||
1351 | /* We give fast paths for the really cool registers */ | 1361 | /* We give fast paths for the really cool registers */ |
1352 | #define NEEDS_FORCE_WAKE(dev_priv, reg) \ | 1362 | #define NEEDS_FORCE_WAKE(dev_priv, reg) \ |
1353 | (((dev_priv)->info->gen >= 6) && \ | 1363 | (((dev_priv)->info->gen >= 6) && \ |
1354 | ((reg) < 0x40000) && \ | 1364 | ((reg) < 0x40000) && \ |
1355 | ((reg) != FORCEWAKE)) | 1365 | ((reg) != FORCEWAKE) && \ |
1366 | ((reg) != ECOBUS)) | ||
1356 | 1367 | ||
1357 | #define __i915_read(x, y) \ | 1368 | #define __i915_read(x, y) \ |
1358 | u##x i915_read##x(struct drm_i915_private *dev_priv, u32 reg); | 1369 | u##x i915_read##x(struct drm_i915_private *dev_priv, u32 reg); |