summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2014-02-10 01:35:50 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2014-02-10 01:35:50 +0000
commit5b4b0136d2b2d79ba2d369f670df72e69a0d68fc (patch)
tree8225a504f88b51288c5d2ea873335d0f5eccc294 /sys
parent3363fb571ebc7cd4b16980e232ca5a37e1a4f6cc (diff)
drm/radeon: fix render backend setup for SI and CIK
From Marek Olsak 88aa6194df73e8dff9f2a1ee47d2775df3d99411 in ubuntu 3.8 9fadb352ed73edd7801a280b552d33a6040c8721 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/radeon/si.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/pci/drm/radeon/si.c b/sys/dev/pci/drm/radeon/si.c
index 72716788f49..43a1d231a5f 100644
--- a/sys/dev/pci/drm/radeon/si.c
+++ b/sys/dev/pci/drm/radeon/si.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: si.c,v 1.11 2014/02/10 00:47:20 jsg Exp $ */
+/* $OpenBSD: si.c,v 1.12 2014/02/10 01:35:49 jsg Exp $ */
/*
* Copyright 2011 Advanced Micro Devices, Inc.
*
@@ -1460,7 +1460,7 @@ static void si_setup_spi(struct radeon_device *rdev,
}
static u32 si_get_rb_disabled(struct radeon_device *rdev,
- u32 max_rb_num, u32 se_num,
+ u32 max_rb_num_per_se,
u32 sh_per_se)
{
u32 data, mask;
@@ -1474,14 +1474,14 @@ static u32 si_get_rb_disabled(struct radeon_device *rdev,
data >>= BACKEND_DISABLE_SHIFT;
- mask = si_create_bitmask(max_rb_num / se_num / sh_per_se);
+ mask = si_create_bitmask(max_rb_num_per_se / sh_per_se);
return data & mask;
}
static void si_setup_rb(struct radeon_device *rdev,
u32 se_num, u32 sh_per_se,
- u32 max_rb_num)
+ u32 max_rb_num_per_se)
{
int i, j;
u32 data, mask;
@@ -1491,14 +1491,14 @@ static void si_setup_rb(struct radeon_device *rdev,
for (i = 0; i < se_num; i++) {
for (j = 0; j < sh_per_se; j++) {
si_select_se_sh(rdev, i, j);
- data = si_get_rb_disabled(rdev, max_rb_num, se_num, sh_per_se);
+ data = si_get_rb_disabled(rdev, max_rb_num_per_se, sh_per_se);
disabled_rbs |= data << ((i * sh_per_se + j) * TAHITI_RB_BITMAP_WIDTH_PER_SH);
}
}
si_select_se_sh(rdev, 0xffffffff, 0xffffffff);
mask = 1;
- for (i = 0; i < max_rb_num; i++) {
+ for (i = 0; i < max_rb_num_per_se * se_num; i++) {
if (!(disabled_rbs & mask))
enabled_rbs |= mask;
mask <<= 1;