summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-02-07 20:25:01 +0100
committerMarek Olšák <[email protected]>2016-02-09 15:26:40 +0100
commit83b4d701c082bb43dc710be9ec423171ea11e8d1 (patch)
treee549564616c09969a500f6347e4303f0b8a42fc2
parent1aae5e8cedcb4b9635965d784f3e3803007b2047 (diff)
winsys/radeon: fix a wrong NUM_TILE_PIPES value from the kernel
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94019 Tested-by: Nick Sarnie <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_winsys.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
index 35dc7e69dcf..49c310cfdf7 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
@@ -405,6 +405,12 @@ static boolean do_winsys_init(struct radeon_drm_winsys *ws)
radeon_get_drm_value(ws->fd, RADEON_INFO_NUM_TILE_PIPES, NULL,
&ws->info.num_tile_pipes);
+ /* The kernel returns 12 for some cards for an unknown reason.
+ * I thought this was supposed to be a power of two.
+ */
+ if (ws->gen == DRV_SI && ws->info.num_tile_pipes == 12)
+ ws->info.num_tile_pipes = 8;
+
if (radeon_get_drm_value(ws->fd, RADEON_INFO_BACKEND_MAP, NULL,
&ws->info.r600_gb_backend_map))
ws->info.r600_gb_backend_map_valid = TRUE;