Skip to content

Commit d724502

Browse files
alexdeucherairlied
authored andcommitted
drm/radeon/kms: fix up gpio i2c mask bits for r4xx for real
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: stable@kernel.org Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
1 parent 26cc40a commit d724502

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
@@ -181,6 +181,18 @@ void radeon_atombios_i2c_init(struct radeon_device *rdev)
181181
gpio = &i2c_info->asGPIO_Info[i];
182182
i2c.valid = false;
183183

184+
/* r4xx mask is technically not used by the hw, so patch in the legacy mask bits */
185+
if ((rdev->family == CHIP_R420) ||
186+
(rdev->family == CHIP_R423) ||
187+
(rdev->family == CHIP_RV410)) {
188+
if ((le16_to_cpu(gpio->usClkMaskRegisterIndex) == 0x0018) ||
189+
(le16_to_cpu(gpio->usClkMaskRegisterIndex) == 0x0019) ||
190+
(le16_to_cpu(gpio->usClkMaskRegisterIndex) == 0x001a)) {
191+
gpio->ucClkMaskShift = 0x19;
192+
gpio->ucDataMaskShift = 0x18;
193+
}
194+
}
195+
184196
/* some evergreen boards have bad data for this entry */
185197
if (ASIC_IS_DCE4(rdev)) {
186198
if ((i == 7) &&

0 commit comments

Comments
 (0)