diff options
author | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2012-10-23 16:30:02 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-10-26 04:24:49 -0400 |
commit | fe2b8f9dfb05f78d525bf6668549271af1860ee5 (patch) | |
tree | fb33b759986191619331a0bfeed4a7094dcf94d6 /drivers/gpu/drm/i915/i915_irq.c | |
parent | afe2fcf5e0ddca8aada0882fc5c54430101dfb0e (diff) |
drm/i915: convert pipe timing definitions to transcoder
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_irq.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 6036d214994c..b92e6bfbb97c 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -185,6 +185,8 @@ static int i915_get_crtc_scanoutpos(struct drm_device *dev, int pipe, | |||
185 | int vbl_start, vbl_end, htotal, vtotal; | 185 | int vbl_start, vbl_end, htotal, vtotal; |
186 | bool in_vbl = true; | 186 | bool in_vbl = true; |
187 | int ret = 0; | 187 | int ret = 0; |
188 | enum transcoder cpu_transcoder = intel_pipe_to_cpu_transcoder(dev_priv, | ||
189 | pipe); | ||
188 | 190 | ||
189 | if (!i915_pipe_enabled(dev, pipe)) { | 191 | if (!i915_pipe_enabled(dev, pipe)) { |
190 | DRM_DEBUG_DRIVER("trying to get scanoutpos for disabled " | 192 | DRM_DEBUG_DRIVER("trying to get scanoutpos for disabled " |
@@ -193,7 +195,7 @@ static int i915_get_crtc_scanoutpos(struct drm_device *dev, int pipe, | |||
193 | } | 195 | } |
194 | 196 | ||
195 | /* Get vtotal. */ | 197 | /* Get vtotal. */ |
196 | vtotal = 1 + ((I915_READ(VTOTAL(pipe)) >> 16) & 0x1fff); | 198 | vtotal = 1 + ((I915_READ(VTOTAL(cpu_transcoder)) >> 16) & 0x1fff); |
197 | 199 | ||
198 | if (INTEL_INFO(dev)->gen >= 4) { | 200 | if (INTEL_INFO(dev)->gen >= 4) { |
199 | /* No obvious pixelcount register. Only query vertical | 201 | /* No obvious pixelcount register. Only query vertical |
@@ -213,13 +215,13 @@ static int i915_get_crtc_scanoutpos(struct drm_device *dev, int pipe, | |||
213 | */ | 215 | */ |
214 | position = (I915_READ(PIPEFRAMEPIXEL(pipe)) & PIPE_PIXEL_MASK) >> PIPE_PIXEL_SHIFT; | 216 | position = (I915_READ(PIPEFRAMEPIXEL(pipe)) & PIPE_PIXEL_MASK) >> PIPE_PIXEL_SHIFT; |
215 | 217 | ||
216 | htotal = 1 + ((I915_READ(HTOTAL(pipe)) >> 16) & 0x1fff); | 218 | htotal = 1 + ((I915_READ(HTOTAL(cpu_transcoder)) >> 16) & 0x1fff); |
217 | *vpos = position / htotal; | 219 | *vpos = position / htotal; |
218 | *hpos = position - (*vpos * htotal); | 220 | *hpos = position - (*vpos * htotal); |
219 | } | 221 | } |
220 | 222 | ||
221 | /* Query vblank area. */ | 223 | /* Query vblank area. */ |
222 | vbl = I915_READ(VBLANK(pipe)); | 224 | vbl = I915_READ(VBLANK(cpu_transcoder)); |
223 | 225 | ||
224 | /* Test position against vblank region. */ | 226 | /* Test position against vblank region. */ |
225 | vbl_start = vbl & 0x1fff; | 227 | vbl_start = vbl & 0x1fff; |