From: Alex Deucher Subject: Re: [PATCH] drm/radeon/kms: fix suspend on rv530 asics Date: Wed, 13 Apr 2011 10:52:18 -0400 Message-ID: References: <1302629607-11637-1-git-send-email-alexdeucher@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: stable-bounces@linux.kernel.org Errors-To: stable-bounces@linux.kernel.org To: Jerome Glisse Cc: airlied@gmail.com, stable@kernel.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Wed, Apr 13, 2011 at 10:46 AM, Jerome Glisse wrote: > On Tue, Apr 12, 2011 at 1:33 PM, Alex Deucher wro= te: >> Apparently only rv515 asics need the workaround >> added in f24d86f1a49505cdea56728b853a5d0a3f8e3d11 >> (drm/radeon/kms: fix resume regression for some r5xx laptops). >> >> Fixes: >> https://bugs.freedesktop.org/show_bug.cgi?id=3D34709 >> >> Signed-off-by: Alex Deucher >> Cc: stable@kernel.org >> --- >> =A0drivers/gpu/drm/radeon/atom.c | =A0 =A06 +++++- >> =A01 files changed, 5 insertions(+), 1 deletions(-) >> >> diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom= .c >> index 258fa5e..d71d375 100644 >> --- a/drivers/gpu/drm/radeon/atom.c >> +++ b/drivers/gpu/drm/radeon/atom.c >> @@ -32,6 +32,7 @@ >> =A0#include "atom.h" >> =A0#include "atom-names.h" >> =A0#include "atom-bits.h" >> +#include "radeon.h" >> >> =A0#define ATOM_COND_ABOVE =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A00 >> =A0#define ATOM_COND_ABOVEOREQUAL 1 >> @@ -101,7 +102,9 @@ static void debug_print_spaces(int n) >> =A0static uint32_t atom_iio_execute(struct atom_context *ctx, int base, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 uint32_t= index, uint32_t data) >> =A0{ >> + =A0 =A0 =A0 struct radeon_device *rdev =3D ctx->card->dev->dev_private; >> =A0 =A0 =A0 =A0uint32_t temp =3D 0xCDCDCDCD; >> + >> =A0 =A0 =A0 =A0while (1) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0switch (CU8(base)) { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case ATOM_IIO_NOP: >> @@ -112,7 +115,8 @@ static uint32_t atom_iio_execute(struct atom_context= *ctx, int base, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0base +=3D 3; >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case ATOM_IIO_WRITE: >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (void)ctx->card->ioreg_rea= d(ctx->card, CU16(base + 1)); >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (rdev->family =3D=3D CH= IP_RV515) >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (void)ctx-= >card->ioreg_read(ctx->card, CU16(base + 1)); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ctx->card->ioreg_write(ct= x->card, CU16(base + 1), temp); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0base +=3D 3; >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; >> -- >> 1.7.1.1 >> > > > So this patch enable io write only for one family ? This looks utterly st= range. No, it just does a read before write for rv515. I don't know why it needs it, but it seems to. Alex > > Cheers, > Jerome > _______________________________________________ stable mailing list stable@linux.kernel.org http://linux.kernel.org/mailman/listinfo/stable