diff options
author | Marek Olšák <marek.olsak@amd.com> | 2014-01-08 18:16:26 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2014-01-08 12:25:43 -0500 |
commit | 56492e0fac2dbaf7735ffd66b206a90624917789 (patch) | |
tree | dfa38151837fab7817b94e29d0652c7d7bf308be /drivers/gpu/drm/radeon/evergreen_cs.c | |
parent | 370169516e736edad3b3c5aa49858058f8b55195 (diff) | |
download | linux-rt-56492e0fac2dbaf7735ffd66b206a90624917789.tar.gz |
drm/radeon: skip colorbuffer checking if COLOR_INFO.FORMAT is set to INVALID
This fixes a bug which was causing rejections of valid GPU commands
from userspace.
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/evergreen_cs.c')
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen_cs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c index eb8ac315f92f..c7cac07f139b 100644 --- a/drivers/gpu/drm/radeon/evergreen_cs.c +++ b/drivers/gpu/drm/radeon/evergreen_cs.c @@ -967,7 +967,10 @@ static int evergreen_cs_track_check(struct radeon_cs_parser *p) if (track->cb_dirty) { tmp = track->cb_target_mask; for (i = 0; i < 8; i++) { - if ((tmp >> (i * 4)) & 0xF) { + u32 format = G_028C70_FORMAT(track->cb_color_info[i]); + + if (format != V_028C70_COLOR_INVALID && + (tmp >> (i * 4)) & 0xF) { /* at least one component is enabled */ if (track->cb_color_bo[i] == NULL) { dev_warn(p->dev, "%s:%d mask 0x%08X | 0x%08X no cb for %d\n", |