diff options
-rw-r--r-- | drivers/gpu/drm/drm_irq.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 22f3bf5ecbd2..53120a72a48c 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c | |||
@@ -493,6 +493,12 @@ void drm_calc_timestamping_constants(struct drm_crtc *crtc) | |||
493 | /* Dot clock in Hz: */ | 493 | /* Dot clock in Hz: */ |
494 | dotclock = (u64) crtc->hwmode.clock * 1000; | 494 | dotclock = (u64) crtc->hwmode.clock * 1000; |
495 | 495 | ||
496 | /* Fields of interlaced scanout modes are only halve a frame duration. | ||
497 | * Double the dotclock to get halve the frame-/line-/pixelduration. | ||
498 | */ | ||
499 | if (crtc->hwmode.flags & DRM_MODE_FLAG_INTERLACE) | ||
500 | dotclock *= 2; | ||
501 | |||
496 | /* Valid dotclock? */ | 502 | /* Valid dotclock? */ |
497 | if (dotclock > 0) { | 503 | if (dotclock > 0) { |
498 | /* Convert scanline length in pixels and video dot clock to | 504 | /* Convert scanline length in pixels and video dot clock to |
@@ -605,14 +611,6 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, int crtc, | |||
605 | return -EAGAIN; | 611 | return -EAGAIN; |
606 | } | 612 | } |
607 | 613 | ||
608 | /* Don't know yet how to handle interlaced or | ||
609 | * double scan modes. Just no-op for now. | ||
610 | */ | ||
611 | if (mode->flags & (DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLSCAN)) { | ||
612 | DRM_DEBUG("crtc %d: Noop due to unsupported mode.\n", crtc); | ||
613 | return -ENOTSUPP; | ||
614 | } | ||
615 | |||
616 | /* Get current scanout position with system timestamp. | 614 | /* Get current scanout position with system timestamp. |
617 | * Repeat query up to DRM_TIMESTAMP_MAXRETRIES times | 615 | * Repeat query up to DRM_TIMESTAMP_MAXRETRIES times |
618 | * if single query takes longer than max_error nanoseconds. | 616 | * if single query takes longer than max_error nanoseconds. |