Lines Matching defs:dev

174  * @dev: DRM device
182 i915_pipe_enabled(struct drm_device *dev, int pipe)
184 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
193 u32 i915_get_vblank_counter(struct drm_device *dev, int pipe)
195 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
203 if (!i915_pipe_enabled(dev, pipe)) {
229 * @dev: drm device
236 static void i915_capture_error_state(struct drm_device *dev)
238 struct drm_i915_private *dev_priv = dev->dev_private;
257 if (!IS_I965G(dev)) {
285 if (IS_I965G(dev)) {
296 * @dev: drm device
304 void i915_handle_error(struct drm_device *dev)
306 struct drm_i915_private *dev_priv = dev->dev_private;
311 i915_capture_error_state(dev);
316 if (IS_G4X(dev)) {
345 if (IS_I9XX(dev)) {
368 if (!IS_I965G(dev)) {
416 u32 gm45_get_vblank_counter(struct drm_device *dev, int pipe)
418 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
421 if (!i915_pipe_enabled(dev, pipe)) {
429 irqreturn_t igdng_irq_handler(struct drm_device *dev)
431 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
462 dev_priv->mm.irq_gem_seqno = i915_get_gem_seqno(dev);
467 drm_handle_vblank(dev, 0);
472 drm_handle_vblank(dev, 1);
487 drm_device_t *dev = (drm_device_t *) (void *) arg;
488 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
493 if (IS_IGDNG(dev))
494 return igdng_irq_handler(dev);
514 i915_handle_error(dev);
517 dev_priv->mm.irq_gem_seqno = i915_get_gem_seqno(dev);
533 drm_handle_vblank(dev, 0);
550 drm_handle_vblank(dev, 1);
559 int i915_emit_irq(drm_device_t * dev)
562 drm_i915_private_t *dev_priv = dev->dev_private;
565 i915_kernel_lost_context(dev);
574 if (IS_GM45(dev)) {
599 if (IS_I965GM(dev) || IS_IGDNG(dev) || IS_GM45(dev))
601 if (IS_I965GM(dev) || IS_IGDNG(dev))
615 void i915_user_irq_on(struct drm_device *dev)
617 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
619 if (dev->irq_enabled && (++dev_priv->user_irq_refcount == 1)){
620 if (IS_IGDNG(dev))
629 void i915_user_irq_off(struct drm_device *dev)
631 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
633 if (dev->irq_enabled && (--dev_priv->user_irq_refcount == 0)) {
634 if (IS_IGDNG(dev))
643 static int i915_wait_irq(drm_device_t * dev, int irq_nr)
645 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
664 i915_user_irq_on(dev);
667 i915_user_irq_off(dev);
700 drm_i915_private_t *dev_priv = dev->dev_private;
704 LOCK_TEST_WITH_RETURN(dev, fpriv);
723 spin_lock(&dev->struct_mutex);
724 result = i915_emit_irq(dev);
725 spin_unlock(&dev->struct_mutex);
741 drm_i915_private_t *dev_priv = dev->dev_private;
752 return i915_wait_irq(dev, irqwait.irq_seq);
755 static void igdng_enable_vblank(struct drm_device *dev, int pipe)
757 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
773 static void igdng_disable_vblank(struct drm_device *dev, int pipe)
775 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
791 int i915_enable_vblank(struct drm_device *dev, int pipe)
793 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
802 if (IS_IGDNG(dev))
803 igdng_enable_vblank(dev, pipe);
804 else if (IS_I965G(dev))
815 void i915_disable_vblank(struct drm_device *dev, int pipe)
817 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
820 if (IS_IGDNG(dev))
821 igdng_disable_vblank(dev, pipe);
835 drm_i915_private_t *dev_priv = dev->dev_private;
849 drm_i915_private_t *dev_priv = dev->dev_private;
891 static void igdng_irq_preinstall(struct drm_device *dev)
893 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
909 static int igdng_irq_postinstall(struct drm_device *dev)
911 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
939 static void igdng_irq_uninstall(struct drm_device *dev)
941 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
953 int i915_driver_irq_preinstall(drm_device_t * dev)
955 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
960 if (IS_IGDNG(dev)) {
961 igdng_irq_preinstall(dev);
975 void i915_driver_irq_postinstall(drm_device_t * dev)
978 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
982 if (IS_IGDNG(dev)) {
983 (void) igdng_irq_postinstall(dev);
984 DRM_INIT_WAITQUEUE(&dev_priv->irq_queue, DRM_INTR_PRI(dev));
998 if (IS_G4X(dev)) {
1022 DRM_INIT_WAITQUEUE(&dev_priv->irq_queue, DRM_INTR_PRI(dev));
1027 void i915_driver_irq_uninstall(drm_device_t * dev)
1029 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
1030 if ((!dev_priv) || (dev->irq_enabled == 0))
1035 if (IS_IGDNG(dev)) {
1036 igdng_irq_uninstall(dev);