diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2012-02-23 17:53:37 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-02-27 09:46:13 -0500 |
commit | 3ae19b750bdc09ce233e1504348320141593ffda (patch) | |
tree | 91698edc128672983f92e0c066f0b18ae1d72f72 /drivers/gpu/drm/radeon/r100.c | |
parent | e5bcf23443740f741df8e5461ccdad0f10d1a75b (diff) |
drm/radeon/kms: add wait_for_vblank asic callback
Required for future functionality.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r100.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r100.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index 99bb00649357..65fe8e092a18 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c | |||
@@ -65,6 +65,40 @@ MODULE_FIRMWARE(FIRMWARE_R520); | |||
65 | 65 | ||
66 | #include "r100_track.h" | 66 | #include "r100_track.h" |
67 | 67 | ||
68 | void r100_wait_for_vblank(struct radeon_device *rdev, int crtc) | ||
69 | { | ||
70 | struct radeon_crtc *radeon_crtc = rdev->mode_info.crtcs[crtc]; | ||
71 | int i; | ||
72 | |||
73 | if (radeon_crtc->crtc_id == 0) { | ||
74 | if (RREG32(RADEON_CRTC_GEN_CNTL) & RADEON_CRTC_EN) { | ||
75 | for (i = 0; i < rdev->usec_timeout; i++) { | ||
76 | if (!(RREG32(RADEON_CRTC_STATUS) & RADEON_CRTC_VBLANK_CUR)) | ||
77 | break; | ||
78 | udelay(1); | ||
79 | } | ||
80 | for (i = 0; i < rdev->usec_timeout; i++) { | ||
81 | if (RREG32(RADEON_CRTC_STATUS) & RADEON_CRTC_VBLANK_CUR) | ||
82 | break; | ||
83 | udelay(1); | ||
84 | } | ||
85 | } | ||
86 | } else { | ||
87 | if (RREG32(RADEON_CRTC2_GEN_CNTL) & RADEON_CRTC2_EN) { | ||
88 | for (i = 0; i < rdev->usec_timeout; i++) { | ||
89 | if (!(RREG32(RADEON_CRTC2_STATUS) & RADEON_CRTC2_VBLANK_CUR)) | ||
90 | break; | ||
91 | udelay(1); | ||
92 | } | ||
93 | for (i = 0; i < rdev->usec_timeout; i++) { | ||
94 | if (RREG32(RADEON_CRTC2_STATUS) & RADEON_CRTC2_VBLANK_CUR) | ||
95 | break; | ||
96 | udelay(1); | ||
97 | } | ||
98 | } | ||
99 | } | ||
100 | } | ||
101 | |||
68 | /* This files gather functions specifics to: | 102 | /* This files gather functions specifics to: |
69 | * r100,rv100,rs100,rv200,rs200,r200,rv250,rs300,rv280 | 103 | * r100,rv100,rs100,rv200,rs200,r200,rv250,rs300,rv280 |
70 | */ | 104 | */ |