aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_irq.c')
-rw-r--r--drivers/gpu/drm/drm_irq.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 77f357b2c386..c0c3f2006203 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -482,7 +482,7 @@ int drm_irq_install(struct drm_device *dev, int irq)
482 return ret; 482 return ret;
483 } 483 }
484 484
485 if (!drm_core_check_feature(dev, DRIVER_MODESET)) 485 if (drm_core_check_feature(dev, DRIVER_LEGACY))
486 vga_client_register(dev->pdev, (void *)dev, drm_irq_vgaarb_nokms, NULL); 486 vga_client_register(dev->pdev, (void *)dev, drm_irq_vgaarb_nokms, NULL);
487 487
488 /* After installing handler */ 488 /* After installing handler */
@@ -491,7 +491,7 @@ int drm_irq_install(struct drm_device *dev, int irq)
491 491
492 if (ret < 0) { 492 if (ret < 0) {
493 dev->irq_enabled = false; 493 dev->irq_enabled = false;
494 if (!drm_core_check_feature(dev, DRIVER_MODESET)) 494 if (drm_core_check_feature(dev, DRIVER_LEGACY))
495 vga_client_register(dev->pdev, NULL, NULL, NULL); 495 vga_client_register(dev->pdev, NULL, NULL, NULL);
496 free_irq(irq, dev); 496 free_irq(irq, dev);
497 } else { 497 } else {
@@ -557,7 +557,7 @@ int drm_irq_uninstall(struct drm_device *dev)
557 557
558 DRM_DEBUG("irq=%d\n", dev->irq); 558 DRM_DEBUG("irq=%d\n", dev->irq);
559 559
560 if (!drm_core_check_feature(dev, DRIVER_MODESET)) 560 if (drm_core_check_feature(dev, DRIVER_LEGACY))
561 vga_client_register(dev->pdev, NULL, NULL, NULL); 561 vga_client_register(dev->pdev, NULL, NULL, NULL);
562 562
563 if (dev->driver->irq_uninstall) 563 if (dev->driver->irq_uninstall)
@@ -592,7 +592,7 @@ int drm_control(struct drm_device *dev, void *data,
592 592
593 if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) 593 if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
594 return 0; 594 return 0;
595 if (drm_core_check_feature(dev, DRIVER_MODESET)) 595 if (!drm_core_check_feature(dev, DRIVER_LEGACY))
596 return 0; 596 return 0;
597 /* UMS was only ever supported on pci devices. */ 597 /* UMS was only ever supported on pci devices. */
598 if (WARN_ON(!dev->pdev)) 598 if (WARN_ON(!dev->pdev))
@@ -1295,7 +1295,7 @@ void drm_vblank_off(struct drm_device *dev, unsigned int pipe)
1295 if (e->pipe != pipe) 1295 if (e->pipe != pipe)
1296 continue; 1296 continue;
1297 DRM_DEBUG("Sending premature vblank event on disable: " 1297 DRM_DEBUG("Sending premature vblank event on disable: "
1298 "wanted %d, current %d\n", 1298 "wanted %u, current %u\n",
1299 e->event.sequence, seq); 1299 e->event.sequence, seq);
1300 list_del(&e->base.link); 1300 list_del(&e->base.link);
1301 drm_vblank_put(dev, pipe); 1301 drm_vblank_put(dev, pipe);
@@ -1519,7 +1519,7 @@ int drm_modeset_ctl(struct drm_device *dev, void *data,
1519 return 0; 1519 return 0;
1520 1520
1521 /* KMS drivers handle this internally */ 1521 /* KMS drivers handle this internally */
1522 if (drm_core_check_feature(dev, DRIVER_MODESET)) 1522 if (!drm_core_check_feature(dev, DRIVER_LEGACY))
1523 return 0; 1523 return 0;
1524 1524
1525 pipe = modeset->crtc; 1525 pipe = modeset->crtc;
@@ -1585,7 +1585,7 @@ static int drm_queue_vblank_event(struct drm_device *dev, unsigned int pipe,
1585 1585
1586 seq = drm_vblank_count_and_time(dev, pipe, &now); 1586 seq = drm_vblank_count_and_time(dev, pipe, &now);
1587 1587
1588 DRM_DEBUG("event on vblank count %d, current %d, crtc %u\n", 1588 DRM_DEBUG("event on vblank count %u, current %u, crtc %u\n",
1589 vblwait->request.sequence, seq, pipe); 1589 vblwait->request.sequence, seq, pipe);
1590 1590
1591 trace_drm_vblank_event_queued(current->pid, pipe, 1591 trace_drm_vblank_event_queued(current->pid, pipe,
@@ -1693,7 +1693,7 @@ int drm_wait_vblank(struct drm_device *dev, void *data,
1693 return drm_queue_vblank_event(dev, pipe, vblwait, file_priv); 1693 return drm_queue_vblank_event(dev, pipe, vblwait, file_priv);
1694 } 1694 }
1695 1695
1696 DRM_DEBUG("waiting on vblank count %d, crtc %u\n", 1696 DRM_DEBUG("waiting on vblank count %u, crtc %u\n",
1697 vblwait->request.sequence, pipe); 1697 vblwait->request.sequence, pipe);
1698 DRM_WAIT_ON(ret, vblank->queue, 3 * HZ, 1698 DRM_WAIT_ON(ret, vblank->queue, 3 * HZ,
1699 (((drm_vblank_count(dev, pipe) - 1699 (((drm_vblank_count(dev, pipe) -
@@ -1708,7 +1708,7 @@ int drm_wait_vblank(struct drm_device *dev, void *data,
1708 vblwait->reply.tval_sec = now.tv_sec; 1708 vblwait->reply.tval_sec = now.tv_sec;
1709 vblwait->reply.tval_usec = now.tv_usec; 1709 vblwait->reply.tval_usec = now.tv_usec;
1710 1710
1711 DRM_DEBUG("returning %d to client\n", 1711 DRM_DEBUG("returning %u to client\n",
1712 vblwait->reply.sequence); 1712 vblwait->reply.sequence);
1713 } else { 1713 } else {
1714 DRM_DEBUG("vblank wait interrupted by signal\n"); 1714 DRM_DEBUG("vblank wait interrupted by signal\n");
@@ -1735,7 +1735,7 @@ static void drm_handle_vblank_events(struct drm_device *dev, unsigned int pipe)
1735 if ((seq - e->event.sequence) > (1<<23)) 1735 if ((seq - e->event.sequence) > (1<<23))
1736 continue; 1736 continue;
1737 1737
1738 DRM_DEBUG("vblank event on %d, current %d\n", 1738 DRM_DEBUG("vblank event on %u, current %u\n",
1739 e->event.sequence, seq); 1739 e->event.sequence, seq);
1740 1740
1741 list_del(&e->base.link); 1741 list_del(&e->base.link);
@@ -1826,6 +1826,7 @@ EXPORT_SYMBOL(drm_crtc_handle_vblank);
1826 */ 1826 */
1827u32 drm_vblank_no_hw_counter(struct drm_device *dev, unsigned int pipe) 1827u32 drm_vblank_no_hw_counter(struct drm_device *dev, unsigned int pipe)
1828{ 1828{
1829 WARN_ON_ONCE(dev->max_vblank_count != 0);
1829 return 0; 1830 return 0;
1830} 1831}
1831EXPORT_SYMBOL(drm_vblank_no_hw_counter); 1832EXPORT_SYMBOL(drm_vblank_no_hw_counter);