aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_kms.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_kms.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_kms.c33
1 files changed, 28 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 3357110e30ce..d2764bf6b2a2 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -141,19 +141,42 @@ void radeon_driver_preclose_kms(struct drm_device *dev,
141 */ 141 */
142u32 radeon_get_vblank_counter_kms(struct drm_device *dev, int crtc) 142u32 radeon_get_vblank_counter_kms(struct drm_device *dev, int crtc)
143{ 143{
144 /* FIXME: implement */ 144 struct radeon_device *rdev = dev->dev_private;
145 return 0; 145
146 if (crtc < 0 || crtc > 1) {
147 DRM_ERROR("Invalid crtc %d\n", crtc);
148 return -EINVAL;
149 }
150
151 return radeon_get_vblank_counter(rdev, crtc);
146} 152}
147 153
148int radeon_enable_vblank_kms(struct drm_device *dev, int crtc) 154int radeon_enable_vblank_kms(struct drm_device *dev, int crtc)
149{ 155{
150 /* FIXME: implement */ 156 struct radeon_device *rdev = dev->dev_private;
151 return 0; 157
158 if (crtc < 0 || crtc > 1) {
159 DRM_ERROR("Invalid crtc %d\n", crtc);
160 return -EINVAL;
161 }
162
163 rdev->irq.crtc_vblank_int[crtc] = true;
164
165 return radeon_irq_set(rdev);
152} 166}
153 167
154void radeon_disable_vblank_kms(struct drm_device *dev, int crtc) 168void radeon_disable_vblank_kms(struct drm_device *dev, int crtc)
155{ 169{
156 /* FIXME: implement */ 170 struct radeon_device *rdev = dev->dev_private;
171
172 if (crtc < 0 || crtc > 1) {
173 DRM_ERROR("Invalid crtc %d\n", crtc);
174 return;
175 }
176
177 rdev->irq.crtc_vblank_int[crtc] = false;
178
179 radeon_irq_set(rdev);
157} 180}
158 181
159 182