diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 6 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 10 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_winsys.h | 1 |
3 files changed, 16 insertions, 1 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c index a06ecb203f2..dd109af68fb 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c @@ -446,8 +446,12 @@ static void radeon_drm_cs_flush(struct radeon_winsys_cs *rcs, case RING_GFX: /* pad DMA ring to 8 DWs to meet CP fetch alignment requirements * r6xx, requires at least 4 dw alignment to avoid a hw bug. + * hawaii with old firmware needs type2 nop packet. + * accel_working2 with value 2 indicates the new firmware. */ - if (cs->ws->info.chip_class <= SI) { + if (cs->ws->info.chip_class <= SI || + (cs->ws->info.family == CHIP_HAWAII && + cs->ws->accel_working2 < 3)) { while (rcs->cdw & 7) OUT_CS(&cs->base, 0x80000000); /* type2 nop packet */ } else { diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c index 21567bbcf01..820cc90cda0 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c @@ -415,6 +415,16 @@ static boolean do_winsys_init(struct radeon_drm_winsys *ws) radeon_get_drm_value(ws->fd, RADEON_INFO_MAX_SH_PER_SE, NULL, &ws->info.max_sh_per_se); + radeon_get_drm_value(ws->fd, RADEON_INFO_ACCEL_WORKING2, NULL, + &ws->accel_working2); + if (ws->info.family == CHIP_HAWAII && ws->accel_working2 < 2) { + fprintf(stderr, "radeon: GPU acceleration for Hawaii disabled, " + "returned accel_working2 value %u is smaller than 2. " + "Please install a newer kernel.\n", + ws->accel_working2); + return FALSE; + } + if (radeon_get_drm_value(ws->fd, RADEON_INFO_SI_TILE_MODE_ARRAY, NULL, ws->info.si_tile_mode_array)) { ws->info.si_tile_mode_array_valid = TRUE; diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h index ea6f7f01f14..aebc391c6bf 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h @@ -55,6 +55,7 @@ struct radeon_drm_winsys { enum radeon_generation gen; struct radeon_info info; uint32_t va_start; + uint32_t accel_working2; struct pb_manager *kman; struct pb_manager *cman_vram; |