radeonsi/gfx9: don't read back non-existent register SRBM_STATUS2
authorMarek Olšák <marek.olsak@amd.com>
Sun, 9 Jul 2017 23:33:38 +0000 (01:33 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 17 Jul 2017 14:56:56 +0000 (10:56 -0400)
It looks like there is no way to monitor SDMA busyness on GFX9.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeon/r600_gpu_load.c

index 3b45545b7b6f3c5884b288609d0b258976950da7..d8f7c3d90b71c72d82ee79d1178dc7b1da8c9ae7 100644 (file)
@@ -105,7 +105,7 @@ static void r600_update_mmio_counters(struct r600_common_screen *rscreen,
        UPDATE_COUNTER(gui, GUI_ACTIVE);
        gui_busy = GUI_ACTIVE(value);
 
-       if (rscreen->chip_class >= CIK) {
+       if (rscreen->chip_class == CIK || rscreen->chip_class == VI) {
                /* SRBM_STATUS2 */
                rscreen->ws->read_registers(rscreen->ws, SRBM_STATUS2, 1, &value);