aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r100.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/r100.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/r100.c')
-rw-r--r--drivers/gpu/drm/radeon/r100.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index 2b534c528aaf..b7baf16c11d7 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -289,6 +289,7 @@ static inline uint32_t r100_irq_ack(struct radeon_device *rdev)
289int r100_irq_process(struct radeon_device *rdev) 289int r100_irq_process(struct radeon_device *rdev)
290{ 290{
291 uint32_t status, msi_rearm; 291 uint32_t status, msi_rearm;
292 bool queue_hotplug = false;
292 293
293 status = r100_irq_ack(rdev); 294 status = r100_irq_ack(rdev);
294 if (!status) { 295 if (!status) {
@@ -310,13 +311,17 @@ int r100_irq_process(struct radeon_device *rdev)
310 drm_handle_vblank(rdev->ddev, 1); 311 drm_handle_vblank(rdev->ddev, 1);
311 } 312 }
312 if (status & RADEON_FP_DETECT_STAT) { 313 if (status & RADEON_FP_DETECT_STAT) {
313 DRM_INFO("HPD1\n"); 314 queue_hotplug = true;
315 DRM_DEBUG("HPD1\n");
314 } 316 }
315 if (status & RADEON_FP2_DETECT_STAT) { 317 if (status & RADEON_FP2_DETECT_STAT) {
316 DRM_INFO("HPD2\n"); 318 queue_hotplug = true;
319 DRM_DEBUG("HPD2\n");
317 } 320 }
318 status = r100_irq_ack(rdev); 321 status = r100_irq_ack(rdev);
319 } 322 }
323 if (queue_hotplug)
324 queue_work(rdev->wq, &rdev->hotplug_work);
320 if (rdev->msi_enabled) { 325 if (rdev->msi_enabled) {
321 switch (rdev->family) { 326 switch (rdev->family) {
322 case CHIP_RS400: 327 case CHIP_RS400: