[Mesa-dev] [PATCH 40/42] winsys/radeon: add a flag telling how gfx IBs should be padded
Marek Olšák
maraeo at gmail.com
Sun Aug 30 12:12:10 PDT 2015
From: Marek Olšák <marek.olsak at amd.com>
This is always false on amdgpu (set by calloc).
---
src/gallium/drivers/radeon/radeon_winsys.h | 1 +
src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 4 +---
src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 4 ++++
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/radeon/radeon_winsys.h b/src/gallium/drivers/radeon/radeon_winsys.h
index a4a2ae1..00accd5 100644
--- a/src/gallium/drivers/radeon/radeon_winsys.h
+++ b/src/gallium/drivers/radeon/radeon_winsys.h
@@ -223,6 +223,7 @@ struct radeon_info {
boolean has_uvd;
uint32_t vce_fw_version;
boolean has_userptr;
+ bool gfx_ib_pad_with_type2;
uint32_t r300_num_gb_pipes;
uint32_t r300_num_z_pipes;
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
index 341af55..2e30ee6 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
@@ -471,9 +471,7 @@ static void radeon_drm_cs_flush(struct radeon_winsys_cs *rcs,
* 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 384d728..a65f308 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
@@ -469,6 +469,10 @@ static boolean do_winsys_init(struct radeon_drm_winsys *ws)
ws->info.cik_macrotile_mode_array_valid = TRUE;
}
+ ws->info.gfx_ib_pad_with_type2 = ws->info.chip_class <= SI ||
+ (ws->info.family == CHIP_HAWAII &&
+ ws->accel_working2 < 3);
+
return TRUE;
}
--
2.1.4
More information about the mesa-dev
mailing list