From: Jean Delvare Subject: Re: [PATCH] drm/radeon/kms: fix up gpio i2c mask bits for r4xx for real Date: Tue, 22 Nov 2011 09:15:24 +0100 Message-ID: <20111122091524.18a26896@endymion.delvare> References: <1321895414-1632-1-git-send-email-alexdeucher@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from services.gcu-squad.org (zone0.gcu-squad.org [212.85.147.21]) by gabe.freedesktop.org (Postfix) with ESMTP id E2EE7A09FD for ; Tue, 22 Nov 2011 00:15:37 -0800 (PST) In-Reply-To: <1321895414-1632-1-git-send-email-alexdeucher@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: alexdeucher@gmail.com Cc: Alex Deucher , stable@kernel.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Mon, 21 Nov 2011 12:10:14 -0500, alexdeucher@gmail.com wrote: > From: Alex Deucher > > 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 > Cc: stable@kernel.org > Cc: Jean Delvare Acked-by: Jean Delvare And the fix was tested successfully by one openSUSE 11.4 user, see: https://bugzilla.novell.com/show_bug.cgi?id=691052#c37 Thanks Alex! Note for stable: now that this missing part is ready, the first part (6c47e5c23aa2a7c54ad7ac13af4bd56cd9e703bf) can finally find its way to stable trees too. > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/radeon/radeon_atombios.c | 12 ++++++++++++ > 1 files changed, 12 insertions(+), 0 deletions(-) > > diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c > index fecd705..933a2cd 100644 > --- a/drivers/gpu/drm/radeon/radeon_atombios.c > +++ b/drivers/gpu/drm/radeon/radeon_atombios.c > @@ -181,6 +181,18 @@ void radeon_atombios_i2c_init(struct radeon_device *rdev) > gpio = &i2c_info->asGPIO_Info[i]; > i2c.valid = false; > > + /* r4xx mask is technically not used by the hw, so patch in the legacy mask bits */ > + if ((rdev->family == CHIP_R420) || > + (rdev->family == CHIP_R423) || > + (rdev->family == CHIP_RV410)) { > + if ((le16_to_cpu(gpio->usClkMaskRegisterIndex) == 0x0018) || > + (le16_to_cpu(gpio->usClkMaskRegisterIndex) == 0x0019) || > + (le16_to_cpu(gpio->usClkMaskRegisterIndex) == 0x001a)) { > + gpio->ucClkMaskShift = 0x19; > + gpio->ucDataMaskShift = 0x18; > + } > + } > + > /* some evergreen boards have bad data for this entry */ > if (ASIC_IS_DCE4(rdev)) { > if ((i == 7) && -- Jean Delvare