drm/radeon: Modify radeon_pm_in_vbl to use radeon_get_crtc_scanoutpos()
authorMario Kleiner <mario.kleiner@tuebingen.mpg.de>
Tue, 5 Oct 2010 23:57:37 +0000 (19:57 -0400)
committerDave Airlie <airlied@redhat.com>
Wed, 6 Oct 2010 01:46:28 +0000 (11:46 +1000)
commit75fa0b08e50cb72715b58321e8259c47adfe4c6f
treee6453e0bb36903e1574bcdd331539bf8b3c2092c
parent6383cf7d7839bf52aa4efa20cc921773126797f4
drm/radeon: Modify radeon_pm_in_vbl to use radeon_get_crtc_scanoutpos()

radeon_pm_in_vbl() didn't report in vblank status accurately. Make
it a wrapper around radeon_get_crtc_scanoutpos() which corrects for
biases, so it reports accurately.

radeon_pm_in_vbl() will only report in_vbl if all active crtc's
are currently inside vblank.

agd5f: use rdev->num_crtc rather than hardcoding the crtc count

Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_pm.c