Skip to content

Commit 24966e9

Browse files
alexdeuchergregkh
authored andcommitted
drm/radeon/kms: fix up gpio i2c mask bits for r4xx for real
commit d724502 upstream. Fixes i2c test failures when i2c_algo_bit.bit_test=1. The hw doesn't actually require a mask, so just set it to the default mask bits for r1xx-r4xx radeon ddc. I missed this part the first time through. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent 02a04b9 commit 24966e9

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎drivers/gpu/drm/radeon/radeon_atombios.c‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,18 @@ void radeon_atombios_i2c_init(struct radeon_device *rdev)
169169
gpio = &i2c_info->asGPIO_Info[i];
170170
i2c.valid = false;
171171

172+
/* r4xx mask is technically not used by the hw, so patch in the legacy mask bits */
173+
if ((rdev->family == CHIP_R420) ||
174+
(rdev->family == CHIP_R423) ||
175+
(rdev->family == CHIP_RV410)) {
176+
if ((le16_to_cpu(gpio->usClkMaskRegisterIndex) == 0x0018) ||
177+
(le16_to_cpu(gpio->usClkMaskRegisterIndex) == 0x0019) ||
178+
(le16_to_cpu(gpio->usClkMaskRegisterIndex) == 0x001a)) {
179+
gpio->ucClkMaskShift = 0x19;
180+
gpio->ucDataMaskShift = 0x18;
181+
}
182+
}
183+
172184
/* some evergreen boards have bad data for this entry */
173185
if (ASIC_IS_DCE4(rdev)) {
174186
if ((i == 7) &&

0 commit comments

Comments
 (0)