summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_drv.h
diff options
context:
space:
mode:
authorVille Syrjälä2016-10-31 21:37:09 +0100
committerVille Syrjälä2016-11-01 15:40:38 +0100
commitb91eb5cce65047eced9d13e8e15b46dced0c3c53 (patch)
treee77730f127897147953026e15fb06ab8ad168bbd /drivers/gpu/drm/i915/intel_drv.h
parentdrm/i915: Pass dev_priv to g4x wm functions (diff)
downloadkernel-qcow2-linux-b91eb5cce65047eced9d13e8e15b46dced0c3c53.tar.gz
kernel-qcow2-linux-b91eb5cce65047eced9d13e8e15b46dced0c3c53.tar.xz
kernel-qcow2-linux-b91eb5cce65047eced9d13e8e15b46dced0c3c53.zip
drm/i915: Pass dev_priv to intel_get_crtc_for_pipe()
Unify our approach to things by passing around dev_priv instead of dev. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1477946245-14134-11-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_drv.h')
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 7c0af57819f9..0fdd546ac8d8 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1029,16 +1029,14 @@ vlv_pipe_to_channel(enum pipe pipe)
}
static inline struct intel_crtc *
-intel_get_crtc_for_pipe(struct drm_device *dev, int pipe)
+intel_get_crtc_for_pipe(struct drm_i915_private *dev_priv, enum pipe pipe)
{
- struct drm_i915_private *dev_priv = to_i915(dev);
return dev_priv->pipe_to_crtc_mapping[pipe];
}
static inline struct intel_crtc *
-intel_get_crtc_for_plane(struct drm_device *dev, int plane)
+intel_get_crtc_for_plane(struct drm_i915_private *dev_priv, enum plane plane)
{
- struct drm_i915_private *dev_priv = to_i915(dev);
return dev_priv->plane_to_crtc_mapping[plane];
}
@@ -1251,7 +1249,7 @@ intel_wait_for_vblank(struct drm_i915_private *dev_priv, enum pipe pipe)
static inline void
intel_wait_for_vblank_if_active(struct drm_i915_private *dev_priv, int pipe)
{
- const struct intel_crtc *crtc = intel_get_crtc_for_pipe(&dev_priv->drm, pipe);
+ const struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
if (crtc->active)
intel_wait_for_vblank(dev_priv, pipe);