drm/radeon/kms: reset ddc_bus in object header parsing
Subsystems (2)
PATCH 1/2 drm/radeon/kms: reset ddc_bus in object header parsing
Some LVDS connectors don't have a ddc bus, so reset the ddc bus to invalid before parsing the next connector to avoid using stale ddc bus data. Should fix fdo bug 28164.
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/radeon/radeon_atombios.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/radeon/radeon_atombios.c +2 -3
@@ -530,6 +530,8 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev) }/* look up gpio for ddc, hpd */ + ddc_bus.valid = false; + hpd.hpd =RADEON_HPD_NONE ;if ((le16_to_cpu (path->usDeviceTag) & (ATOM_DEVICE_TV_SUPPORT |ATOM_DEVICE_CV_SUPPORT )) ==0 ) {for (j =0 ; j < con_obj->ucNumberOfObjects; j++) {
@@ -585,9 +587,6 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)break ; } } - }else { - hpd.hpd =RADEON_HPD_NONE ; - ddc_bus.valid = false; }/* needed for aux chan transactions */
Signature · 1 line
1.5.6.3
PATCH 2/2 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 <[email protected]>
--- drivers/gpu/drm/radeon/atombios_dp.c | 2 +- drivers/gpu/drm/radeon/radeon_atombios.c | 3 +-- drivers/gpu/drm/radeon/radeon_combios.c | 4 ++-- drivers/gpu/drm/radeon/radeon_mode.h | 22 +++++++++++----------- 4 files changed, 15 insertions(+), 16 deletions(-)
drivers/gpu/drm/radeon/atombios_dp.c +1 -1
@@ -351,7 +351,7 @@ retry: args.v1.ucChannelID = chan->rec.i2c_id; args.v1.ucDelay = delay /10 ;if (ASIC_IS_DCE4 (rdev)) - args.v2.ucHPD_ID = chan->rec.hpd_id; + args.v2.ucHPD_ID = chan->rec.hpd;atom_execute_table (rdev->mode_info.atom_context, index, (uint32_t *)&args);
drivers/gpu/drm/radeon/radeon_atombios.c +1 -2
@@ -549,7 +549,6 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)ATOM_I2C_RECORD *i2c_record;ATOM_HPD_INT_RECORD *hpd_record;ATOM_I2C_ID_CONFIG_ACCESS *i2c_config; - hpd.hpd =RADEON_HPD_NONE ;while (record->ucRecordType >0 && record->
@@ -590,7 +589,7 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev) }/* needed for aux chan transactions */ - ddc_bus.hpd_id = hpd.hpd ? (hpd.hpd -1 ) :0 ; + ddc_bus.hpd = hpd.hpd; conn_id =le16_to_cpu (path->usConnObjectId);
drivers/gpu/drm/radeon/radeon_combios.c +2 -2
@@ -600,7 +600,7 @@ static struct radeon_i2c_bus_rec combios_setup_i2c_bus(struct radeon_device *rde } i2c.mm_i2c = false; i2c.i2c_id =0 ; - i2c.hpd_id =0 ; + i2c.hpd =RADEON_HPD_NONE ;if (ddc_line) i2c.valid = true;
@@ -2198,7 +2198,7 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev) ATOM_DEVICE_DFP1_SUPPORT); ddc_i2c =combios_setup_i2c_bus (rdev,RADEON_GPIO_DVI_DDC ); - hpd.hpd =RADEON_HPD_NONE ; + hpd.hpd =RADEON_HPD_1 ; radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_CRT1_SUPPORT |
drivers/gpu/drm/radeon/radeon_mode.h +11 -11
@@ -66,6 +66,16 @@ enum radeon_tv_std { TV_STD_PAL_N, }; +enum radeon_hpd_id { +RADEON_HPD_1 =0 , +RADEON_HPD_2 , +RADEON_HPD_3 , +RADEON_HPD_4 , +RADEON_HPD_5 , +RADEON_HPD_6 , +RADEON_HPD_NONE =0xff , +}; +/* radeon gpio-based i2c * 1. "mask" reg and bits * grabs the gpio pins for software use
@@ -85,7 +95,7 @@ struct radeon_i2c_bus_rec {/* id used by atom */ uint8_t i2c_id;/* id used by atom */ -uint8_t hpd_id; +enum radeon_hpd_id hpd;/* can be used with hw i2c engine */ bool hw_capable;/* uses multi-media i2c engine */
@@ -370,16 +380,6 @@ struct radeon_gpio_rec {u32 mask; }; -enum radeon_hpd_id { -RADEON_HPD_NONE =0 , -RADEON_HPD_1 , -RADEON_HPD_2 , -RADEON_HPD_3 , -RADEON_HPD_4 , -RADEON_HPD_5 , -RADEON_HPD_6 , -}; -struct radeon_hpd {enum radeon_hpd_id hpd;u8 plugged_state;
Signature · 1 line
1.5.6.3
2010/5/19 Alex Deucher <[email protected]>:
Quoted 4 lines
Some LVDS connectors don't have a ddc bus, so reset the ddc bus to invalid before parsing the next connector to avoid using stale ddc bus data. Should fix fdo bug 28164.
It does, thanks :)
Tested-by Rafał Miłecki <[email protected]>
Signature · 5 lines
Rafał _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel