提交 57e22f4a 编写于 作者: V Ville Syrjälä 提交者: Daniel Vetter

drm/i915: Use frame counter for intel_wait_for_vblank() on CTG

Use the same wait_for_vblank code for CTG that we use for ILK+.

Also fix the name of the frame counter register while at it.
Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
Reviewed-by: NImre Deak <imre.deak@intel.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 edc08d0a
...@@ -748,10 +748,10 @@ enum transcoder intel_pipe_to_cpu_transcoder(struct drm_i915_private *dev_priv, ...@@ -748,10 +748,10 @@ enum transcoder intel_pipe_to_cpu_transcoder(struct drm_i915_private *dev_priv,
return intel_crtc->config.cpu_transcoder; return intel_crtc->config.cpu_transcoder;
} }
static void ironlake_wait_for_vblank(struct drm_device *dev, int pipe) static void g4x_wait_for_vblank(struct drm_device *dev, int pipe)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 frame, frame_reg = PIPEFRAME(pipe); u32 frame, frame_reg = PIPE_FRMCOUNT_GM45(pipe);
frame = I915_READ(frame_reg); frame = I915_READ(frame_reg);
...@@ -772,8 +772,8 @@ void intel_wait_for_vblank(struct drm_device *dev, int pipe) ...@@ -772,8 +772,8 @@ void intel_wait_for_vblank(struct drm_device *dev, int pipe)
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
int pipestat_reg = PIPESTAT(pipe); int pipestat_reg = PIPESTAT(pipe);
if (INTEL_INFO(dev)->gen >= 5) { if (IS_G4X(dev) || INTEL_INFO(dev)->gen >= 5) {
ironlake_wait_for_vblank(dev, pipe); g4x_wait_for_vblank(dev, pipe);
return; return;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册