summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_cp.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-08-19 19:11:39 -0400
committerDave Airlie <airlied@redhat.com>2009-08-21 19:10:30 +1000
commitf779b3e513478218cbaaaa0a506d7801cab6fd14 (patch)
tree977258791900e68ed2fbcd78d631c22f4185e48a /drivers/gpu/drm/radeon/radeon_cp.c
parent17782d99502851dc7e48114ee9c5a6d6741cba18 (diff)
downloadop-kernel-dev-f779b3e513478218cbaaaa0a506d7801cab6fd14.zip
op-kernel-dev-f779b3e513478218cbaaaa0a506d7801cab6fd14.tar.gz
drm/radeon: add GET_PARAM/INFO support for Z pipes
Needed for occlusion queries on rv530 chips. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_cp.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_cp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cp.c b/drivers/gpu/drm/radeon/radeon_cp.c
index d835682..7a52c46 100644
--- a/drivers/gpu/drm/radeon/radeon_cp.c
+++ b/drivers/gpu/drm/radeon/radeon_cp.c
@@ -406,6 +406,15 @@ static void radeon_init_pipes(drm_radeon_private_t *dev_priv)
{
uint32_t gb_tile_config, gb_pipe_sel = 0;
+ if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV530) {
+ uint32_t z_pipe_sel = RADEON_READ(RV530_GB_PIPE_SELECT2);
+ if ((z_pipe_sel & 3) == 3)
+ dev_priv->num_z_pipes = 2;
+ else
+ dev_priv->num_z_pipes = 1;
+ } else
+ dev_priv->num_z_pipes = 1;
+
/* RS4xx/RS6xx/R4xx/R5xx */
if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R420) {
gb_pipe_sel = RADEON_READ(R400_GB_PIPE_SELECT);
OpenPOWER on IntegriCloud