Lines Matching refs:dev
34 __FBSDID("$FreeBSD: releng/11.0/sys/dev/drm/radeon_irq.c 197603 2009-09-28 22:37:07Z rnoland $");
36 #include "dev/drm/drmP.h"
37 #include "dev/drm/drm.h"
38 #include "dev/drm/radeon_drm.h"
39 #include "dev/drm/radeon_drv.h"
41 void radeon_irq_set_state(struct drm_device *dev, u32 mask, int state)
43 drm_radeon_private_t *dev_priv = dev->dev_private;
50 if (dev->irq_enabled)
54 static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state)
56 drm_radeon_private_t *dev_priv = dev->dev_private;
63 if (dev->irq_enabled)
67 int radeon_enable_vblank(struct drm_device *dev, int crtc)
69 drm_radeon_private_t *dev_priv = dev->dev_private;
74 r500_vbl_irq_set_state(dev, R500_D1MODE_INT_MASK, 1);
77 r500_vbl_irq_set_state(dev, R500_D2MODE_INT_MASK, 1);
87 radeon_irq_set_state(dev, RADEON_CRTC_VBLANK_MASK, 1);
90 radeon_irq_set_state(dev, RADEON_CRTC2_VBLANK_MASK, 1);
102 void radeon_disable_vblank(struct drm_device *dev, int crtc)
104 drm_radeon_private_t *dev_priv = dev->dev_private;
109 r500_vbl_irq_set_state(dev, R500_D1MODE_INT_MASK, 0);
112 r500_vbl_irq_set_state(dev, R500_D2MODE_INT_MASK, 0);
122 radeon_irq_set_state(dev, RADEON_CRTC_VBLANK_MASK, 0);
125 radeon_irq_set_state(dev, RADEON_CRTC2_VBLANK_MASK, 0);
190 struct drm_device *dev = (struct drm_device *) arg;
192 (drm_radeon_private_t *) dev->dev_private;
216 drm_handle_vblank(dev, 0);
218 drm_handle_vblank(dev, 1);
221 drm_handle_vblank(dev, 0);
223 drm_handle_vblank(dev, 1);
225 if (dev->msi_enabled) {
256 static int radeon_emit_irq(struct drm_device * dev)
258 drm_radeon_private_t *dev_priv = dev->dev_private;
274 static int radeon_wait_irq(struct drm_device * dev, int swi_nr)
277 (drm_radeon_private_t *) dev->dev_private;
294 u32 radeon_get_vblank_counter(struct drm_device *dev, int crtc)
296 drm_radeon_private_t *dev_priv = dev->dev_private;
323 int radeon_irq_emit(struct drm_device *dev, void *data, struct drm_file *file_priv)
325 drm_radeon_private_t *dev_priv = dev->dev_private;
332 LOCK_TEST_WITH_RETURN(dev, file_priv);
339 result = radeon_emit_irq(dev);
351 int radeon_irq_wait(struct drm_device *dev, void *data, struct drm_file *file_priv)
353 drm_radeon_private_t *dev_priv = dev->dev_private;
361 return radeon_wait_irq(dev, irqwait->irq_seq);
366 void radeon_driver_irq_preinstall(struct drm_device * dev)
369 (drm_radeon_private_t *) dev->dev_private;
384 int radeon_driver_irq_postinstall(struct drm_device * dev)
387 (drm_radeon_private_t *) dev->dev_private;
395 radeon_irq_set_state(dev, RADEON_SW_INT_ENABLE, 1);
400 void radeon_driver_irq_uninstall(struct drm_device * dev)
403 (drm_radeon_private_t *) dev->dev_private;
419 int radeon_vblank_crtc_get(struct drm_device *dev)
421 drm_radeon_private_t *dev_priv = (drm_radeon_private_t *) dev->dev_private;
426 int radeon_vblank_crtc_set(struct drm_device *dev, int64_t value)
428 drm_radeon_private_t *dev_priv = (drm_radeon_private_t *) dev->dev_private;