aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-07-02 10:51:02 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-07-03 16:08:46 -0400
commit990bbdadabaa51828e475eda86ee5720a4910cc3 (patch)
tree596748f31e6f00d21d59cd6c0cdcf9f08a28a219 /drivers/gpu/drm/i915/i915_drv.h
parent146937e5828ede495e11ba3a6f4a01b36b7166dc (diff)
drm/i915: Group the GT routines together in both code and vtable
Tidy up the routines for interacting with the GT (in particular the forcewake dance) which are scattered throughout the code in a single structure. v2: use wait_for_atomic for polling. v3: *really* use wait_for_atomic for polling. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com> Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index a0c15abbdcef..60f6974d20d4 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -262,8 +262,6 @@ struct drm_i915_display_funcs {
262 struct drm_i915_gem_object *obj); 262 struct drm_i915_gem_object *obj);
263 int (*update_plane)(struct drm_crtc *crtc, struct drm_framebuffer *fb, 263 int (*update_plane)(struct drm_crtc *crtc, struct drm_framebuffer *fb,
264 int x, int y); 264 int x, int y);
265 void (*force_wake_get)(struct drm_i915_private *dev_priv);
266 void (*force_wake_put)(struct drm_i915_private *dev_priv);
267 /* clock updates for mode set */ 265 /* clock updates for mode set */
268 /* cursor updates */ 266 /* cursor updates */
269 /* render clock increase/decrease */ 267 /* render clock increase/decrease */
@@ -271,6 +269,11 @@ struct drm_i915_display_funcs {
271 /* pll clock increase/decrease */ 269 /* pll clock increase/decrease */
272}; 270};
273 271
272struct drm_i915_gt_funcs {
273 void (*force_wake_get)(struct drm_i915_private *dev_priv);
274 void (*force_wake_put)(struct drm_i915_private *dev_priv);
275};
276
274struct intel_device_info { 277struct intel_device_info {
275 u8 gen; 278 u8 gen;
276 u8 is_mobile:1; 279 u8 is_mobile:1;
@@ -362,6 +365,8 @@ typedef struct drm_i915_private {
362 int relative_constants_mode; 365 int relative_constants_mode;
363 366
364 void __iomem *regs; 367 void __iomem *regs;
368
369 struct drm_i915_gt_funcs gt;
365 /** gt_fifo_count and the subsequent register write are synchronized 370 /** gt_fifo_count and the subsequent register write are synchronized
366 * with dev->struct_mutex. */ 371 * with dev->struct_mutex. */
367 unsigned gt_fifo_count; 372 unsigned gt_fifo_count;
@@ -1200,6 +1205,7 @@ void i915_hangcheck_elapsed(unsigned long data);
1200void i915_handle_error(struct drm_device *dev, bool wedged); 1205void i915_handle_error(struct drm_device *dev, bool wedged);
1201 1206
1202extern void intel_irq_init(struct drm_device *dev); 1207extern void intel_irq_init(struct drm_device *dev);
1208extern void intel_gt_init(struct drm_device *dev);
1203 1209
1204void i915_error_state_free(struct kref *error_ref); 1210void i915_error_state_free(struct kref *error_ref);
1205 1211
@@ -1517,13 +1523,6 @@ extern int intel_trans_dp_port_sel(struct drm_crtc *crtc);
1517extern int intel_enable_rc6(const struct drm_device *dev); 1523extern int intel_enable_rc6(const struct drm_device *dev);
1518 1524
1519extern bool i915_semaphore_is_enabled(struct drm_device *dev); 1525extern bool i915_semaphore_is_enabled(struct drm_device *dev);
1520extern void __gen6_gt_force_wake_get(struct drm_i915_private *dev_priv);
1521extern void __gen6_gt_force_wake_mt_get(struct drm_i915_private *dev_priv);
1522extern void __gen6_gt_force_wake_put(struct drm_i915_private *dev_priv);
1523extern void __gen6_gt_force_wake_mt_put(struct drm_i915_private *dev_priv);
1524
1525extern void vlv_force_wake_get(struct drm_i915_private *dev_priv);
1526extern void vlv_force_wake_put(struct drm_i915_private *dev_priv);
1527 1526
1528/* overlay */ 1527/* overlay */
1529#ifdef CONFIG_DEBUG_FS 1528#ifdef CONFIG_DEBUG_FS