drm/radeon/kms: add gui_idle callback

Check to see if the GUI engine and related blocks
(2D, 3D, CP, etc) are idle or not.  There are a number
of cases when we need to know if the drawing engine
is busy.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Alex Deucher
2010-04-22 12:39:58 -04:00
committed by Dave Airlie
parent 1d42bbc8f7
commit def9ba9cf6
5 changed files with 34 additions and 0 deletions

View File

@@ -67,6 +67,14 @@ MODULE_FIRMWARE(FIRMWARE_R520);
* r100,rv100,rs100,rv200,rs200,r200,rv250,rs300,rv280
*/
bool r100_gui_idle(struct radeon_device *rdev)
{
if (RREG32(RADEON_RBBM_STATUS) & RADEON_RBBM_ACTIVE)
return false;
else
return true;
}
/* hpd for digital panel detect/disconnect */
bool r100_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd)
{