drm/radeon/kms: fix suspend on rv530 asics
Subsystems (2)
PATCH 1/1 drm/radeon/kms: fix suspend on rv530 asics
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=34709
--- drivers/gpu/drm/radeon/atom.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/gpu/drm/radeon/atom.c +5 -1
@@ -32,6 +32,7 @@#include "atom.h" #include "atom-names.h" #include "atom-bits.h" +#include "radeon.h" #define ATOM_COND_ABOVE 0#define ATOM_COND_ABOVEOREQUAL 1
@@ -101,7 +102,9 @@ static void debug_print_spaces(int n)static uint32_t atom_iio_execute (struct atom_context *ctx,int base,uint32_t index,uint32_t data) { +struct radeon_device *rdev = ctx->card->dev->dev_private;uint32_t temp =0xCDCDCDCD ; +while (1 )switch (CU8 (base)) {case ATOM_IIO_NOP :
@@ -112,7 +115,8 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base, base +=3 ;break ;case ATOM_IIO_WRITE : - (void )ctx->card->ioreg_read (ctx->card,CU16 (base +1 )); +if (rdev->family ==CHIP_RV515 ) + (void )ctx->card->ioreg_read (ctx->card,CU16 (base +1 )); ctx->card->ioreg_write (ctx->card,CU16 (base +1 ), temp); base +=3 ;break ;
Signature · 1 line
1.7.1.1
Quoted 39 lines · Alex Deucher
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=34709Signed-off-by Alex Deucher <[email protected]>---
drivers/gpu/drm/radeon/atom.c | 6 +++++-1 files changed, 5 insertions(+), 1 deletions(-)drivers/gpu/drm/radeon/atom.c +3
-0@@ -32,6 +32,7 @@ #include "atom.h" #include "atom-names.h" #include "atom-bits.h" +#include "radeon.h" #define ATOM_COND_ABOVE 0 #define ATOM_COND_ABOVEOREQUAL 1@@ -101,7 +102,9 @@ static void debug_print_spaces(int n) static uint32_t atom_iio_execute(struct atom_context *ctx, int base, uint32_t index, uint32_t data) { + struct radeon_device *rdev = ctx->card->dev->dev_private; uint32_t temp = 0xCDCDCDCD; + while (1) switch (CU8(base)) {case
ATOM_IIO_NOP:drivers/gpu/drm/radeon/atom.c +0
-0@@ -112,7 +115,8 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base, base += 3; break;case
ATOM_IIO_WRITE:
Quoted 9 lines
- (void)ctx->card->ioreg_read(ctx->card, CU16(base + 1));
+ if (rdev->family==CHIP_RV515)
+ (void)ctx->card->ioreg_read(ctx->card, CU16(base + 1));ctx->card->ioreg_write(ctx->card, CU16(base + 1), temp); base += 3;
break;
--
1.7.1.1
So this patch enable io write only for one family ? This looks utterly strange.
Cheers,
Jerome
Quoted 44 lines · Jerome Glisse
Quoted 43 lines · Alex Deucher
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=34709Signed-off-by Alex Deucher <[email protected]>---
drivers/gpu/drm/radeon/atom.c | 6 +++++-1 files changed, 5 insertions(+), 1 deletions(-)drivers/gpu/drm/radeon/atom.c +3
-0@@ -32,6 +32,7 @@ #include "atom.h" #include "atom-names.h" #include "atom-bits.h" +#include "radeon.h" #define ATOM_COND_ABOVE 0 #define ATOM_COND_ABOVEOREQUAL 1@@ -101,7 +102,9 @@ static void debug_print_spaces(int n) static uint32_t atom_iio_execute(struct atom_context *ctx, int base, uint32_t index, uint32_t data) { + struct radeon_device *rdev = ctx->card->dev->dev_private; uint32_t temp = 0xCDCDCDCD; + while (1) switch (CU8(base)) {case
ATOM_IIO_NOP:drivers/gpu/drm/radeon/atom.c +0
-0@@ -112,7 +115,8 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base, base += 3; break;case
ATOM_IIO_WRITE:
- (void)ctx->card->ioreg_read(ctx->card, CU16(base + 1));
+ if (rdev->family==CHIP_RV515)
+ (void)ctx->card->ioreg_read(ctx->card, CU16(base + 1));ctx->card->ioreg_write(ctx->card, CU16(base + 1), temp);
Quoted 8 lines
Quoted 5 lines
base += 3;
break;
--
1.7.1.1So this patch enable io write only for one family ? This looks utterly strange.
No, it just does a read before write for rv515. I don't know why it needs it, but it seems to.
Alex
Quoted 4 lines
Cheers,
Jerome
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable
Dave Airlie
maintainerQuoted 54 lines · Alex Deucher
Quoted 44 lines · Jerome Glisse
Quoted 43 lines · Alex Deucher
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=34709Signed-off-by Alex Deucher <[email protected]>---
drivers/gpu/drm/radeon/atom.c | 6 +++++-1 files changed, 5 insertions(+), 1 deletions(-)drivers/gpu/drm/radeon/atom.c +3
-0@@ -32,6 +32,7 @@ #include "atom.h" #include "atom-names.h" #include "atom-bits.h" +#include "radeon.h" #define ATOM_COND_ABOVE 0 #define ATOM_COND_ABOVEOREQUAL 1@@ -101,7 +102,9 @@ static void debug_print_spaces(int n) static uint32_t atom_iio_execute(struct atom_context *ctx, int base, uint32_t index, uint32_t data) { + struct radeon_device *rdev = ctx->card->dev->dev_private; uint32_t temp = 0xCDCDCDCD; + while (1) switch (CU8(base)) {case
ATOM_IIO_NOP:drivers/gpu/drm/radeon/atom.c +0
-0@@ -112,7 +115,8 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base, base += 3; break;case
ATOM_IIO_WRITE:
- (void)ctx->card->ioreg_read(ctx->card, CU16(base + 1));
+ if (rdev->family==CHIP_RV515)
+ (void)ctx->card->ioreg_read(ctx->card, CU16(base + 1));ctx->card->ioreg_write(ctx->card, CU16(base + 1), temp);Quoted 8 lines
Quoted 5 lines
base += 3;
break;
--
1.7.1.1So this patch enable io write only for one family ? This looks utterly strange.
Quoted 3 lines
No, it just does a read before write for rv515. I don't know why it needs it, but it seems to.
Yeah I really wish I knew why either,
Thinkpad T60 with X1300, no resume without this, it failed in the memory initialisation table. this was the only thing I could find to fix it.
My x1300 desktop card works fine without this.
Dave.