From: Mario Kleiner Date: Tue, 5 Oct 2010 23:57:36 +0000 (-0400) Subject: drm/radeon: Add function for display scanout position query. X-Git-Tag: v2.6.37-rc1~92^2~23^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6383cf7d7839bf52aa4efa20cc921773126797f4;p=pandora-kernel.git drm/radeon: Add function for display scanout position query. radeon_get_crtc_scanoutpos() returns the current horizontal and vertical scanout position of a crtc. It also reports if the display scanout is currently inside the vblank area. hpos reports current horizontal pixel scanout position. vpos reports the current scanned out line as a value >= 0 in active scanout. If the scanout is inside vblank area, it reports a negative value, the number of scanlines until end of vblank aka start of active scanout, e.g., -3 == "At most 3 scanlines until end of vblank". This code is derived from radeon_pm_in_vbl(), tested on R500 and R600. Signed-off-by: Mario Kleiner Signed-off-by: Alex Deucher Signed-off-by: Dave Airlie --- Reading git-diff-tree failed