diff options
author | Marek Olšák <[email protected]> | 2015-08-30 17:41:23 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-09-01 21:51:15 +0200 |
commit | 8a9ab86ca6d510763bfe8532071c5fcfd977e3c4 (patch) | |
tree | d123e2c659cd385f2adeb2910b786b8418fa0e60 /src/gallium/winsys | |
parent | ba79ff7fa8c202ea9c55c0764118be481beb8a83 (diff) |
winsys/radeon: add a flag telling how gfx IBs should be padded
This is always false on amdgpu (set by calloc).
Reviewed-by: Alex Deucher <[email protected]>
Acked-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 8 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 7 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c index 341af55df8b..2c4f990944c 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c @@ -466,14 +466,10 @@ static void radeon_drm_cs_flush(struct radeon_winsys_cs *rcs, } break; case RING_GFX: - /* pad DMA ring to 8 DWs to meet CP fetch alignment requirements + /* pad GFX 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 3 indicates the new firmware. */ - if (cs->ws->info.chip_class <= SI || - (cs->ws->info.family == CHIP_HAWAII && - cs->ws->accel_working2 < 3)) { + if (cs->ws->info.gfx_ib_pad_with_type2) { 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 384d7280380..5d440eb7696 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c @@ -469,6 +469,13 @@ static boolean do_winsys_init(struct radeon_drm_winsys *ws) ws->info.cik_macrotile_mode_array_valid = TRUE; } + /* Hawaii with old firmware needs type2 nop packet. + * accel_working2 with value 3 indicates the new firmware. + */ + ws->info.gfx_ib_pad_with_type2 = ws->info.chip_class <= SI || + (ws->info.family == CHIP_HAWAII && + ws->accel_working2 < 3); + return TRUE; } |