aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_device.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-12-04 16:56:37 -0500
committerDave Airlie <airlied@redhat.com>2009-12-07 19:48:22 -0500
commitd4877cf2293f5463f531769fd12300cb3417c778 (patch)
treeee9533aaf9fac0bbec859cf5d888fa73a71875bd /drivers/gpu/drm/radeon/radeon_device.c
parent429770b3e39999c4d025fbcb9959502adc3989d8 (diff)
drm/radeon/kms: enable hpd support
This enabled interrupt driven hpd support for all radeon chips. Assuming the hpd pin is wired up correctly, the driver will generate uevents on digital monitor connect and disconnect and retrain DP monitors automatically. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_device.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_device.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 60ee6a8b4f7f..7e55647f118e 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -570,6 +570,11 @@ int radeon_device_init(struct radeon_device *rdev,
570 rwlock_init(&rdev->fence_drv.lock); 570 rwlock_init(&rdev->fence_drv.lock);
571 INIT_LIST_HEAD(&rdev->gem.objects); 571 INIT_LIST_HEAD(&rdev->gem.objects);
572 572
573 /* setup workqueue */
574 rdev->wq = create_workqueue("radeon");
575 if (rdev->wq == NULL)
576 return -ENOMEM;
577
573 /* Set asic functions */ 578 /* Set asic functions */
574 r = radeon_asic_init(rdev); 579 r = radeon_asic_init(rdev);
575 if (r) { 580 if (r) {
@@ -643,6 +648,7 @@ void radeon_device_fini(struct radeon_device *rdev)
643 DRM_INFO("radeon: finishing device.\n"); 648 DRM_INFO("radeon: finishing device.\n");
644 rdev->shutdown = true; 649 rdev->shutdown = true;
645 radeon_fini(rdev); 650 radeon_fini(rdev);
651 destroy_workqueue(rdev->wq);
646 vga_client_register(rdev->pdev, NULL, NULL, NULL); 652 vga_client_register(rdev->pdev, NULL, NULL, NULL);
647 iounmap(rdev->rmmio); 653 iounmap(rdev->rmmio);
648 rdev->rmmio = NULL; 654 rdev->rmmio = NULL;
@@ -689,6 +695,7 @@ int radeon_suspend_kms(struct drm_device *dev, pm_message_t state)
689 radeon_save_bios_scratch_regs(rdev); 695 radeon_save_bios_scratch_regs(rdev);
690 696
691 radeon_suspend(rdev); 697 radeon_suspend(rdev);
698 radeon_hpd_fini(rdev);
692 /* evict remaining vram memory */ 699 /* evict remaining vram memory */
693 radeon_bo_evict_vram(rdev); 700 radeon_bo_evict_vram(rdev);
694 701
@@ -723,6 +730,8 @@ int radeon_resume_kms(struct drm_device *dev)
723 fb_set_suspend(rdev->fbdev_info, 0); 730 fb_set_suspend(rdev->fbdev_info, 0);
724 release_console_sem(); 731 release_console_sem();
725 732
733 /* reset hpd state */
734 radeon_hpd_init(rdev);
726 /* blat the mode back in */ 735 /* blat the mode back in */
727 drm_helper_resume_force_mode(dev); 736 drm_helper_resume_force_mode(dev);
728 return 0; 737 return 0;