summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r600_cs.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2012-07-29 16:24:57 +0200
committerDave Airlie <airlied@redhat.com>2012-08-09 09:53:13 +1000
commit0f457e488c79922dfd646f94ed058764f7ba758c (patch)
tree9c8321bd37ffaab3316df4811c32b8643efee03f /drivers/gpu/drm/radeon/r600_cs.c
parent0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (diff)
downloadlinux-0f457e488c79922dfd646f94ed058764f7ba758c.tar.gz
linux-0f457e488c79922dfd646f94ed058764f7ba758c.tar.bz2
linux-0f457e488c79922dfd646f94ed058764f7ba758c.zip
drm/radeon/kms: allow "invalid" DB formats as a means to disable DB
Signed-off-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r600_cs.c')
-rw-r--r--drivers/gpu/drm/radeon/r600_cs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c
index ca87f7afaf23..1119e31e5c2f 100644
--- a/drivers/gpu/drm/radeon/r600_cs.c
+++ b/drivers/gpu/drm/radeon/r600_cs.c
@@ -764,8 +764,10 @@ static int r600_cs_track_check(struct radeon_cs_parser *p)
}
/* Check depth buffer */
- if (track->db_dirty && (G_028800_STENCIL_ENABLE(track->db_depth_control) ||
- G_028800_Z_ENABLE(track->db_depth_control))) {
+ if (track->db_dirty &&
+ G_028010_FORMAT(track->db_depth_info) != V_028010_DEPTH_INVALID &&
+ (G_028800_STENCIL_ENABLE(track->db_depth_control) ||
+ G_028800_Z_ENABLE(track->db_depth_control))) {
r = r600_cs_track_validate_db(p);
if (r)
return r;