diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv04_display.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv04_display.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nv04_display.c b/drivers/gpu/drm/nouveau/nv04_display.c index 9e28cf772e3c..1715e1464b7d 100644 --- a/drivers/gpu/drm/nouveau/nv04_display.c +++ b/drivers/gpu/drm/nouveau/nv04_display.c | |||
@@ -32,6 +32,9 @@ | |||
32 | #include "nouveau_encoder.h" | 32 | #include "nouveau_encoder.h" |
33 | #include "nouveau_connector.h" | 33 | #include "nouveau_connector.h" |
34 | 34 | ||
35 | static void nv04_vblank_crtc0_isr(struct drm_device *); | ||
36 | static void nv04_vblank_crtc1_isr(struct drm_device *); | ||
37 | |||
35 | static void | 38 | static void |
36 | nv04_display_store_initial_head_owner(struct drm_device *dev) | 39 | nv04_display_store_initial_head_owner(struct drm_device *dev) |
37 | { | 40 | { |
@@ -197,6 +200,8 @@ nv04_display_create(struct drm_device *dev) | |||
197 | func->save(encoder); | 200 | func->save(encoder); |
198 | } | 201 | } |
199 | 202 | ||
203 | nouveau_irq_register(dev, 24, nv04_vblank_crtc0_isr); | ||
204 | nouveau_irq_register(dev, 25, nv04_vblank_crtc1_isr); | ||
200 | return 0; | 205 | return 0; |
201 | } | 206 | } |
202 | 207 | ||
@@ -208,6 +213,9 @@ nv04_display_destroy(struct drm_device *dev) | |||
208 | 213 | ||
209 | NV_DEBUG_KMS(dev, "\n"); | 214 | NV_DEBUG_KMS(dev, "\n"); |
210 | 215 | ||
216 | nouveau_irq_unregister(dev, 24); | ||
217 | nouveau_irq_unregister(dev, 25); | ||
218 | |||
211 | /* Turn every CRTC off. */ | 219 | /* Turn every CRTC off. */ |
212 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { | 220 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { |
213 | struct drm_mode_set modeset = { | 221 | struct drm_mode_set modeset = { |
@@ -258,3 +266,16 @@ nv04_display_init(struct drm_device *dev) | |||
258 | return 0; | 266 | return 0; |
259 | } | 267 | } |
260 | 268 | ||
269 | static void | ||
270 | nv04_vblank_crtc0_isr(struct drm_device *dev) | ||
271 | { | ||
272 | nv_wr32(dev, NV_CRTC0_INTSTAT, NV_CRTC_INTR_VBLANK); | ||
273 | drm_handle_vblank(dev, 0); | ||
274 | } | ||
275 | |||
276 | static void | ||
277 | nv04_vblank_crtc1_isr(struct drm_device *dev) | ||
278 | { | ||
279 | nv_wr32(dev, NV_CRTC1_INTSTAT, NV_CRTC_INTR_VBLANK); | ||
280 | drm_handle_vblank(dev, 1); | ||
281 | } | ||