From: Roland Scheidegger <srol...@vmware.com>

fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=28459

agd5f: apply to r1xx/r2xx as well.

Signed-off-by: Roland Scheidegger <sroland at vmware.com>
Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
Cc: stable <stable at kernel.org>
---
 drivers/gpu/drm/radeon/r100.c |    3 +++
 drivers/gpu/drm/radeon/r200.c |    3 +++
 drivers/gpu/drm/radeon/r300.c |    5 +++++
 3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index cf89aa2..d66ae7d 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -1628,6 +1628,7 @@ static int r100_packet0_check(struct radeon_cs_parser *p,
                case RADEON_TXFORMAT_RGB332:
                case RADEON_TXFORMAT_Y8:
                        track->textures[i].cpp = 1;
+                       track->textures[i].compress_format = 
R100_TRACK_COMP_NONE;
                        break;
                case RADEON_TXFORMAT_AI88:
                case RADEON_TXFORMAT_ARGB1555:
@@ -1639,12 +1640,14 @@ static int r100_packet0_check(struct radeon_cs_parser 
*p,
                case RADEON_TXFORMAT_LDUDV655:
                case RADEON_TXFORMAT_DUDV88:
                        track->textures[i].cpp = 2;
+                       track->textures[i].compress_format = 
R100_TRACK_COMP_NONE;
                        break;
                case RADEON_TXFORMAT_ARGB8888:
                case RADEON_TXFORMAT_RGBA8888:
                case RADEON_TXFORMAT_SHADOW32:
                case RADEON_TXFORMAT_LDUDUV8888:
                        track->textures[i].cpp = 4;
+                       track->textures[i].compress_format = 
R100_TRACK_COMP_NONE;
                        break;
                case RADEON_TXFORMAT_DXT1:
                        track->textures[i].cpp = 1;
diff --git a/drivers/gpu/drm/radeon/r200.c b/drivers/gpu/drm/radeon/r200.c
index 85617c3..a03f893 100644
--- a/drivers/gpu/drm/radeon/r200.c
+++ b/drivers/gpu/drm/radeon/r200.c
@@ -450,6 +450,7 @@ int r200_packet0_check(struct radeon_cs_parser *p,
                case R200_TXFORMAT_RGB332:
                case R200_TXFORMAT_Y8:
                        track->textures[i].cpp = 1;
+                       track->textures[i].compress_format = 
R100_TRACK_COMP_NONE;
                        break;
                case R200_TXFORMAT_AI88:
                case R200_TXFORMAT_ARGB1555:
@@ -461,6 +462,7 @@ int r200_packet0_check(struct radeon_cs_parser *p,
                case R200_TXFORMAT_DVDU88:
                case R200_TXFORMAT_AVYU4444:
                        track->textures[i].cpp = 2;
+                       track->textures[i].compress_format = 
R100_TRACK_COMP_NONE;
                        break;
                case R200_TXFORMAT_ARGB8888:
                case R200_TXFORMAT_RGBA8888:
@@ -468,6 +470,7 @@ int r200_packet0_check(struct radeon_cs_parser *p,
                case R200_TXFORMAT_BGR111110:
                case R200_TXFORMAT_LDVDU8888:
                        track->textures[i].cpp = 4;
+                       track->textures[i].compress_format = 
R100_TRACK_COMP_NONE;
                        break;
                case R200_TXFORMAT_DXT1:
                        track->textures[i].cpp = 1;
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
index b2f9efe..7e81db5 100644
--- a/drivers/gpu/drm/radeon/r300.c
+++ b/drivers/gpu/drm/radeon/r300.c
@@ -881,6 +881,7 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
                case R300_TX_FORMAT_Y4X4:
                case R300_TX_FORMAT_Z3Y3X2:
                        track->textures[i].cpp = 1;
+                       track->textures[i].compress_format = 
R100_TRACK_COMP_NONE;
                        break;
                case R300_TX_FORMAT_X16:
                case R300_TX_FORMAT_Y8X8:
@@ -892,6 +893,7 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
                case R300_TX_FORMAT_B8G8_B8G8:
                case R300_TX_FORMAT_G8R8_G8B8:
                        track->textures[i].cpp = 2;
+                       track->textures[i].compress_format = 
R100_TRACK_COMP_NONE;
                        break;
                case R300_TX_FORMAT_Y16X16:
                case R300_TX_FORMAT_Z11Y11X10:
@@ -902,14 +904,17 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
                case R300_TX_FORMAT_FL_I32:
                case 0x1e:
                        track->textures[i].cpp = 4;
+                       track->textures[i].compress_format = 
R100_TRACK_COMP_NONE;
                        break;
                case R300_TX_FORMAT_W16Z16Y16X16:
                case R300_TX_FORMAT_FL_R16G16B16A16:
                case R300_TX_FORMAT_FL_I32A32:
                        track->textures[i].cpp = 8;
+                       track->textures[i].compress_format = 
R100_TRACK_COMP_NONE;
                        break;
                case R300_TX_FORMAT_FL_R32G32B32A32:
                        track->textures[i].cpp = 16;
+                       track->textures[i].compress_format = 
R100_TRACK_COMP_NONE;
                        break;
                case R300_TX_FORMAT_DXT1:
                        track->textures[i].cpp = 1;
-- 
1.7.0.1

Reply via email to