aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r100.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-10-27 01:02:35 -0400
committerDave Airlie <airlied@redhat.com>2010-10-27 21:27:04 -0400
commit43b93fbffc2c080dba2e84df6fce8d7e6c0a2581 (patch)
tree10b747157c8fb249b7b86807281d6d61fe5a39d3 /drivers/gpu/drm/radeon/r100.c
parent135cba0dc399fdd47bd3ae305c1db75fcd77243f (diff)
drm/radeon/kms: fix handling of tex lookup disable in cs checker on r2xx
There are cases when multiple texture units have to be enabled, but not actually used to sample. This patch checks to see if the lookup_disable bit is set and if so, skips the texture check. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=25544 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r100.c')
-rw-r--r--drivers/gpu/drm/radeon/r100.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index 6d1540c0bfed..0e8f28a68927 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -3180,6 +3180,8 @@ static int r100_cs_track_texture_check(struct radeon_device *rdev,
3180 for (u = 0; u < track->num_texture; u++) { 3180 for (u = 0; u < track->num_texture; u++) {
3181 if (!track->textures[u].enabled) 3181 if (!track->textures[u].enabled)
3182 continue; 3182 continue;
3183 if (track->textures[u].lookup_disable)
3184 continue;
3183 robj = track->textures[u].robj; 3185 robj = track->textures[u].robj;
3184 if (robj == NULL) { 3186 if (robj == NULL) {
3185 DRM_ERROR("No texture bound to unit %u\n", u); 3187 DRM_ERROR("No texture bound to unit %u\n", u);
@@ -3414,6 +3416,7 @@ void r100_cs_track_clear(struct radeon_device *rdev, struct r100_cs_track *track
3414 track->textures[i].robj = NULL; 3416 track->textures[i].robj = NULL;
3415 /* CS IB emission code makes sure texture unit are disabled */ 3417 /* CS IB emission code makes sure texture unit are disabled */
3416 track->textures[i].enabled = false; 3418 track->textures[i].enabled = false;
3419 track->textures[i].lookup_disable = false;
3417 track->textures[i].roundup_w = true; 3420 track->textures[i].roundup_w = true;
3418 track->textures[i].roundup_h = true; 3421 track->textures[i].roundup_h = true;
3419 if (track->separate_cube) 3422 if (track->separate_cube)