Lines Matching refs:dev
34 __FBSDID("$FreeBSD: releng/11.0/sys/dev/drm2/radeon/radeon_irq.c 254885 2013-08-25 19:37:15Z dumbbell $");
36 #include <dev/drm2/drmP.h>
37 #include <dev/drm2/radeon/radeon_drm.h>
40 void radeon_irq_set_state(struct drm_device *dev, u32 mask, int state)
42 drm_radeon_private_t *dev_priv = dev->dev_private;
49 if (dev->irq_enabled)
53 static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state)
55 drm_radeon_private_t *dev_priv = dev->dev_private;
62 if (dev->irq_enabled)
66 int radeon_enable_vblank(struct drm_device *dev, int crtc)
68 drm_radeon_private_t *dev_priv = dev->dev_private;
73 r500_vbl_irq_set_state(dev, R500_D1MODE_INT_MASK, 1);
76 r500_vbl_irq_set_state(dev, R500_D2MODE_INT_MASK, 1);
86 radeon_irq_set_state(dev, RADEON_CRTC_VBLANK_MASK, 1);
89 radeon_irq_set_state(dev, RADEON_CRTC2_VBLANK_MASK, 1);
101 void radeon_disable_vblank(struct drm_device *dev, int crtc)
103 drm_radeon_private_t *dev_priv = dev->dev_private;
108 r500_vbl_irq_set_state(dev, R500_D1MODE_INT_MASK, 0);
111 r500_vbl_irq_set_state(dev, R500_D2MODE_INT_MASK, 0);
121 radeon_irq_set_state(dev, RADEON_CRTC_VBLANK_MASK, 0);
124 radeon_irq_set_state(dev, RADEON_CRTC2_VBLANK_MASK, 0);
187 struct drm_device *dev = (struct drm_device *) arg;
189 (drm_radeon_private_t *) dev->dev_private;
212 drm_handle_vblank(dev, 0);
214 drm_handle_vblank(dev, 1);
217 drm_handle_vblank(dev, 0);
219 drm_handle_vblank(dev, 1);
224 static int radeon_emit_irq(struct drm_device * dev)
226 drm_radeon_private_t *dev_priv = dev->dev_private;
242 static int radeon_wait_irq(struct drm_device * dev, int swi_nr)
245 (drm_radeon_private_t *) dev->dev_private;
259 u32 radeon_get_vblank_counter(struct drm_device *dev, int crtc)
261 drm_radeon_private_t *dev_priv = dev->dev_private;
288 int radeon_irq_emit(struct drm_device *dev, void *data, struct drm_file *file_priv)
290 drm_radeon_private_t *dev_priv = dev->dev_private;
302 LOCK_TEST_WITH_RETURN(dev, file_priv);
304 result = radeon_emit_irq(dev);
316 int radeon_irq_wait(struct drm_device *dev, void *data, struct drm_file *file_priv)
318 drm_radeon_private_t *dev_priv = dev->dev_private;
329 return radeon_wait_irq(dev, irqwait->irq_seq);
334 void radeon_driver_irq_preinstall(struct drm_device * dev)
337 (drm_radeon_private_t *) dev->dev_private;
352 int radeon_driver_irq_postinstall(struct drm_device *dev)
355 (drm_radeon_private_t *) dev->dev_private;
360 dev->max_vblank_count = 0x001fffff;
365 radeon_irq_set_state(dev, RADEON_SW_INT_ENABLE, 1);
370 void radeon_driver_irq_uninstall(struct drm_device * dev)
373 (drm_radeon_private_t *) dev->dev_private;
387 int radeon_vblank_crtc_get(struct drm_device *dev)
389 drm_radeon_private_t *dev_priv = (drm_radeon_private_t *) dev->dev_private;
394 int radeon_vblank_crtc_set(struct drm_device *dev, int64_t value)
396 drm_radeon_private_t *dev_priv = (drm_radeon_private_t *) dev->dev_private;