[PATCH] drm/radeon: 9800 SE has only one quadpipe
Tormod Volden
debian.tormod at gmail.com
Thu Apr 22 13:57:32 PDT 2010
Although these cards have 2 pipelines on the silicon only
the first passed the QA and the other should be disabled.
http://www.digital-daily.com/video/ati-radeon9800se/
http://www.rojakpot.com/showarticle.aspx?artno=101&pgno=1
agd5f: add some other SE cards as well; fix up kms
Signed-off-by: Tormod Volden <debian.tormod at gmail.com>
Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
---
drivers/gpu/drm/radeon/r300.c | 5 ++---
drivers/gpu/drm/radeon/r420.c | 6 ++++++
drivers/gpu/drm/radeon/radeon_cp.c | 9 +++++++--
3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
index bb005bf..590f6a8 100644
--- a/drivers/gpu/drm/radeon/r300.c
+++ b/drivers/gpu/drm/radeon/r300.c
@@ -328,13 +328,12 @@ void r300_gpu_init(struct radeon_device *rdev)
{
uint32_t gb_tile_config, tmp;
- /* FIXME: rv380 one pipes ? */
if ((rdev->family == CHIP_R300 && rdev->pdev->device != 0x4144) ||
- (rdev->family == CHIP_R350)) {
+ (rdev->family == CHIP_R350 && rdev->pdev->device != 0x4148)) {
/* r300,r350 */
rdev->num_gb_pipes = 2;
} else {
- /* rv350,rv370,rv380,r300 AD */
+ /* rv350,rv370,rv380,r300 AD, r350 AH */
rdev->num_gb_pipes = 1;
}
rdev->num_z_pipes = 1;
diff --git a/drivers/gpu/drm/radeon/r420.c b/drivers/gpu/drm/radeon/r420.c
index 3759d83..be092d2 100644
--- a/drivers/gpu/drm/radeon/r420.c
+++ b/drivers/gpu/drm/radeon/r420.c
@@ -59,6 +59,12 @@ void r420_pipes_init(struct radeon_device *rdev)
/* get max number of pipes */
gb_pipe_select = RREG32(0x402C);
num_pipes = ((gb_pipe_select >> 12) & 3) + 1;
+
+ /* SE chips have 1 pipe */
+ if ((rdev->pdev->device == 0x5e4c) ||
+ (rdev->pdev->device == 0x5e4f))
+ num_pipes = 1;
+
rdev->num_gb_pipes = num_pipes;
tmp = 0;
switch (num_pipes) {
diff --git a/drivers/gpu/drm/radeon/radeon_cp.c
b/drivers/gpu/drm/radeon/radeon_cp.c
index 419630d..2f042a3 100644
--- a/drivers/gpu/drm/radeon/radeon_cp.c
+++ b/drivers/gpu/drm/radeon/radeon_cp.c
@@ -435,14 +435,19 @@ static void radeon_init_pipes(struct drm_device *dev)
if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R420) {
gb_pipe_sel = RADEON_READ(R400_GB_PIPE_SELECT);
dev_priv->num_gb_pipes = ((gb_pipe_sel >> 12) & 0x3) + 1;
+ /* SE cards have 1 pipe */
+ if ((dev->pdev->device == 0x5e4c) ||
+ (dev->pdev->device == 0x5e4f))
+ dev_priv->num_gb_pipes = 1;
} else {
/* R3xx */
if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R300 &&
dev->pdev->device != 0x4144) ||
- ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R350)) {
+ ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R350 &&
+ dev->pdev->device != 0x4148)) {
dev_priv->num_gb_pipes = 2;
} else {
- /* RV3xx/R300 AD */
+ /* RV3xx/R300 AD/R350 AH */
dev_priv->num_gb_pipes = 1;
}
}
--
1.5.6.3
--001485f27f9461f19a0484d99a55
Content-Type: text/plain; charset=US-ASCII;
name="0001-drm-radeon-9800-SE-has-only-one-quadpipe.patch"
Content-Disposition: attachment;
filename="0001-drm-radeon-9800-SE-has-only-one-quadpipe.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_g8c240j70
RnJvbSAzODZkYjM5YWRiMzRlMGM1ZWExY2EzYTAzNDEwNjJiZWQxNzdlM2NkIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBUb3Jtb2QgVm9sZGVuIDxkZWJpYW4udG9ybW9kQGdtYWlsLmNv
bT4KRGF0ZTogVGh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FNFIGNh
cmRzIGhhdmUgMSBwaXBlICovCisJCWlmICgoZGV2LT5wZGV2LT5kZXZpY2UgPT0gMHg1ZTRjKSB8
fAorCQkgICAgKGRldi0+cGRldi0+ZGV2aWNlID09IDB4NWU0ZikpCisJCQlkZXZfcHJpdi0+bnVt
X2diX3BpcGVzID0gMTsKIAl9IGVsc2UgewogCQkvKiBSM3h4ICovCiAJCWlmICgoKGRldl9wcml2
LT5mbGFncyAmIFJBREVPTl9GQU1JTFlfTUFTSykgPT0gQ0hJUF9SMzAwICYmCiAJCSAgICAgZGV2
LT5wZGV2LT5kZXZpY2UgIT0gMHg0MTQ0KSB8fAotCQkgICAgKChkZXZfcHJpdi0+ZmxhZ3MgJiBS
QURFT05fRkFNSUxZX01BU0spID09IENISVBfUjM1MCkpIHsKKwkJICAgICgoZGV2X3ByaXYtPmZs
YWdzICYgUkFERU9OX0ZBTUlMWV9NQVNLKSA9PSBDSElQX1IzNTAgJiYKKwkJICAgICBkZXYtPnBk
ZXYtPmRldmljZSAhPSAweDQxNDgpKSB7CiAJCQlkZXZfcHJpdi0+bnVtX2diX3BpcGVzID0gMjsK
IAkJfSBlbHNlIHsKLQkJCS8qIFJWM3h4L1IzMDAgQUQgKi8KKwkJCS8qIFJWM3h4L1IzMDAgQUQv
UjM1MCBBSCAqLwogCQkJZGV2X3ByaXYtPm51bV9nYl9waXBlcyA9IDE7CiAJCX0KIAl9Ci0tIAox
LjUuNi4zCgo=
--001485f27f9461f19a0484d99a55--
More information about the dri-devel
mailing list