drm/i915: Add intel_get_crtc_scanline()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 29 Apr 2014 10:35:45 +0000 (13:35 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 5 May 2014 07:09:26 +0000 (09:09 +0200)
commita225f0795714efbbd1b558e1be4dc368d038e105
tree4a3fdf6b09f93c4a3ec845b0bb2b8b2bd6cc9181
parent78e8fc6b2e3bbce6170d2ead2406d29930077735
drm/i915: Add intel_get_crtc_scanline()

Add a new function intel_get_crtc_scanline() that returns the current
scanline counter for the crtc.

v2: Rebase after vblank timestamp changes.
    Use intel_ prefix instead of i915_ as is more customary for
    display related functions.
    Include DRM_SCANOUTPOS_INVBL in the return value even w/o
    adjustments, for a bit of extra consistency.
v3: Change the implementation to be based on DSL on all gens,
    since that's enough for the needs of atomic updates, and
    it will avoid complicating the scanout position calculations
    for the vblank timestamps
v4: Don't break scanline wraparound for interlaced modes

Reviewed-by: Sourab Gupta <sourabgupta@gmail.com>
Reviewed-by: Akash Goel <akash.goels@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/intel_drv.h