aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-05-18 19:26:47 -0400
committerDave Airlie <airlied@redhat.com>2010-05-18 20:31:41 -0400
commit8e36ed00842668a39a6ed1b0a00b8ac92b7c4cd5 (patch)
treeb16da6957fdfbea44ef4cdd540a13d4be59c9445 /drivers/gpu/drm
parent2bfcc0fc698d550689ef020c73b2d977b73e728c (diff)
drm/radeon/kms: hpd cleanup
- Use radeon hpd enum consistently (in both hotplug and dp) - Legacy r100 with DVI should be HPD_1 not NONE Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/radeon/atombios_dp.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_atombios.c3
-rw-r--r--drivers/gpu/drm/radeon/radeon_combios.c4
-rw-r--r--drivers/gpu/drm/radeon/radeon_mode.h22
4 files changed, 15 insertions, 16 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c
index 28b31c64f48d..abffb1499e22 100644
--- a/drivers/gpu/drm/radeon/atombios_dp.c
+++ b/drivers/gpu/drm/radeon/atombios_dp.c
@@ -351,7 +351,7 @@ retry:
351 args.v1.ucChannelID = chan->rec.i2c_id; 351 args.v1.ucChannelID = chan->rec.i2c_id;
352 args.v1.ucDelay = delay / 10; 352 args.v1.ucDelay = delay / 10;
353 if (ASIC_IS_DCE4(rdev)) 353 if (ASIC_IS_DCE4(rdev))
354 args.v2.ucHPD_ID = chan->rec.hpd_id; 354 args.v2.ucHPD_ID = chan->rec.hpd;
355 355
356 atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); 356 atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args);
357 357
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index 8cb4173365c3..6e733fdc3349 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -549,7 +549,6 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
549 ATOM_I2C_RECORD *i2c_record; 549 ATOM_I2C_RECORD *i2c_record;
550 ATOM_HPD_INT_RECORD *hpd_record; 550 ATOM_HPD_INT_RECORD *hpd_record;
551 ATOM_I2C_ID_CONFIG_ACCESS *i2c_config; 551 ATOM_I2C_ID_CONFIG_ACCESS *i2c_config;
552 hpd.hpd = RADEON_HPD_NONE;
553 552
554 while (record->ucRecordType > 0 553 while (record->ucRecordType > 0
555 && record-> 554 && record->
@@ -590,7 +589,7 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
590 } 589 }
591 590
592 /* needed for aux chan transactions */ 591 /* needed for aux chan transactions */
593 ddc_bus.hpd_id = hpd.hpd ? (hpd.hpd - 1) : 0; 592 ddc_bus.hpd = hpd.hpd;
594 593
595 conn_id = le16_to_cpu(path->usConnObjectId); 594 conn_id = le16_to_cpu(path->usConnObjectId);
596 595
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index 93f18bbf744a..7b5e10d3e9c9 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -600,7 +600,7 @@ static struct radeon_i2c_bus_rec combios_setup_i2c_bus(struct radeon_device *rde
600 } 600 }
601 i2c.mm_i2c = false; 601 i2c.mm_i2c = false;
602 i2c.i2c_id = 0; 602 i2c.i2c_id = 0;
603 i2c.hpd_id = 0; 603 i2c.hpd = RADEON_HPD_NONE;
604 604
605 if (ddc_line) 605 if (ddc_line)
606 i2c.valid = true; 606 i2c.valid = true;
@@ -2198,7 +2198,7 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev)
2198 ATOM_DEVICE_DFP1_SUPPORT); 2198 ATOM_DEVICE_DFP1_SUPPORT);
2199 2199
2200 ddc_i2c = combios_setup_i2c_bus(rdev, RADEON_GPIO_DVI_DDC); 2200 ddc_i2c = combios_setup_i2c_bus(rdev, RADEON_GPIO_DVI_DDC);
2201 hpd.hpd = RADEON_HPD_NONE; 2201 hpd.hpd = RADEON_HPD_1;
2202 radeon_add_legacy_connector(dev, 2202 radeon_add_legacy_connector(dev,
2203 0, 2203 0,
2204 ATOM_DEVICE_CRT1_SUPPORT | 2204 ATOM_DEVICE_CRT1_SUPPORT |
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
index 71e1f0e7438d..67358baf28b2 100644
--- a/drivers/gpu/drm/radeon/radeon_mode.h
+++ b/drivers/gpu/drm/radeon/radeon_mode.h
@@ -66,6 +66,16 @@ enum radeon_tv_std {
66 TV_STD_PAL_N, 66 TV_STD_PAL_N,
67}; 67};
68 68
69enum radeon_hpd_id {
70 RADEON_HPD_1 = 0,
71 RADEON_HPD_2,
72 RADEON_HPD_3,
73 RADEON_HPD_4,
74 RADEON_HPD_5,
75 RADEON_HPD_6,
76 RADEON_HPD_NONE = 0xff,
77};
78
69/* radeon gpio-based i2c 79/* radeon gpio-based i2c
70 * 1. "mask" reg and bits 80 * 1. "mask" reg and bits
71 * grabs the gpio pins for software use 81 * grabs the gpio pins for software use
@@ -85,7 +95,7 @@ struct radeon_i2c_bus_rec {
85 /* id used by atom */ 95 /* id used by atom */
86 uint8_t i2c_id; 96 uint8_t i2c_id;
87 /* id used by atom */ 97 /* id used by atom */
88 uint8_t hpd_id; 98 enum radeon_hpd_id hpd;
89 /* can be used with hw i2c engine */ 99 /* can be used with hw i2c engine */
90 bool hw_capable; 100 bool hw_capable;
91 /* uses multi-media i2c engine */ 101 /* uses multi-media i2c engine */
@@ -370,16 +380,6 @@ struct radeon_gpio_rec {
370 u32 mask; 380 u32 mask;
371}; 381};
372 382
373enum radeon_hpd_id {
374 RADEON_HPD_NONE = 0,
375 RADEON_HPD_1,
376 RADEON_HPD_2,
377 RADEON_HPD_3,
378 RADEON_HPD_4,
379 RADEON_HPD_5,
380 RADEON_HPD_6,
381};
382
383struct radeon_hpd { 383struct radeon_hpd {
384 enum radeon_hpd_id hpd; 384 enum radeon_hpd_id hpd;
385 u8 plugged_state; 385 u8 plugged_state;