summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r420.c
diff options
context:
space:
mode:
authorAlex Deucher2009-08-20 01:11:39 +0200
committerDave Airlie2009-08-21 11:10:30 +0200
commitf779b3e513478218cbaaaa0a506d7801cab6fd14 (patch)
tree977258791900e68ed2fbcd78d631c22f4185e48a /drivers/gpu/drm/radeon/r420.c
parentdrm/radeon/kms: add r100/r200 OQ support. (diff)
downloadkernel-qcow2-linux-f779b3e513478218cbaaaa0a506d7801cab6fd14.tar.gz
kernel-qcow2-linux-f779b3e513478218cbaaaa0a506d7801cab6fd14.tar.xz
kernel-qcow2-linux-f779b3e513478218cbaaaa0a506d7801cab6fd14.zip
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/r420.c')
-rw-r--r--drivers/gpu/drm/radeon/r420.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/r420.c b/drivers/gpu/drm/radeon/r420.c
index dea497a979f2..97426a6f370f 100644
--- a/drivers/gpu/drm/radeon/r420.c
+++ b/drivers/gpu/drm/radeon/r420.c
@@ -165,7 +165,18 @@ void r420_pipes_init(struct radeon_device *rdev)
printk(KERN_WARNING "Failed to wait GUI idle while "
"programming pipes. Bad things might happen.\n");
}
- DRM_INFO("radeon: %d pipes initialized.\n", rdev->num_gb_pipes);
+
+ if (rdev->family == CHIP_RV530) {
+ tmp = RREG32(RV530_GB_PIPE_SELECT2);
+ if ((tmp & 3) == 3)
+ rdev->num_z_pipes = 2;
+ else
+ rdev->num_z_pipes = 1;
+ } else
+ rdev->num_z_pipes = 1;
+
+ DRM_INFO("radeon: %d quad pipes, %d z pipes initialized.\n",
+ rdev->num_gb_pipes, rdev->num_z_pipes);
}
void r420_gpu_init(struct radeon_device *rdev)