From 308a84069a88f8f1aa7419791883cf37139408b0 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Sun, 10 Jul 2011 19:09:36 -0400 Subject: [PATCH] r600g: emit SQ_LDS_RESOURCE_MGMT Need to be initialized to a reasonable value. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=39119 NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Alex Deucher --- src/gallium/drivers/r600/evergreen_state.c | 5 +++++ src/gallium/drivers/r600/evergreend.h | 7 +++++++ src/gallium/winsys/r600/drm/evergreen_hw_context.c | 1 + 3 files changed, 13 insertions(+), 0 deletions(-) diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index fbf25fe..d3d7873 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -2026,6 +2026,11 @@ void evergreen_init_config(struct r600_pipe_context *rctx) tmp |= S_008C28_NUM_LS_STACK_ENTRIES(num_ls_stack_entries); r600_pipe_state_add_reg(rstate, R_008C28_SQ_STACK_RESOURCE_MGMT_3, tmp, 0xFFFFFFFF, NULL); + tmp = 0; + tmp |= S_008C2C_NUM_PS_LDS(0x1000); + tmp |= S_008C2C_NUM_LS_LDS(0x1000); + r600_pipe_state_add_reg(rstate, R_008C2C_SQ_LDS_RESOURCE_MGMT, tmp, 0xFFFFFFFF, NULL); + r600_pipe_state_add_reg(rstate, R_009100_SPI_CONFIG_CNTL, 0x0, 0xFFFFFFFF, NULL); r600_pipe_state_add_reg(rstate, R_00913C_SPI_CONFIG_CNTL_1, S_00913C_VTX_DONE_DELAY(4), 0xFFFFFFFF, NULL); diff --git a/src/gallium/drivers/r600/evergreend.h b/src/gallium/drivers/r600/evergreend.h index d795f57..ef31697 100644 --- a/src/gallium/drivers/r600/evergreend.h +++ b/src/gallium/drivers/r600/evergreend.h @@ -216,6 +216,13 @@ #define S_008C28_NUM_LS_STACK_ENTRIES(x) (((x) & 0xFFF) << 16) #define G_008C28_NUM_LS_STACK_ENTRIES(x) (((x) >> 16) & 0xFFF) #define C_008C28_NUM_LS_STACK_ENTRIES(x) 0xF000FFFF +#define R_008C2C_SQ_LDS_RESOURCE_MGMT 0x00008C2C +#define S_008C2C_NUM_PS_LDS(x) (((x) & 0xFFFF) << 0) +#define G_008C2C_NUM_PS_LDS(x) (((x) >> 0) & 0xFFFF) +#define C_008C2C_NUM_PS_LDS(x) 0x0000FFFF +#define S_008C2C_NUM_LS_LDS(x) (((x) & 0xFFFF) << 16) +#define G_008C2C_NUM_LS_LDS(x) (((x) >> 16) & 0xFFFF) +#define C_008C2C_NUM_LS_LDS(x) 0xFFFF0000 #define R_008CF0_SQ_MS_FIFO_SIZES 0x00008CF0 #define S_008CF0_CACHE_FIFO_SIZE(x) (((x) & 0xFF) << 0) diff --git a/src/gallium/winsys/r600/drm/evergreen_hw_context.c b/src/gallium/winsys/r600/drm/evergreen_hw_context.c index 4d9dd50..7a8d912 100644 --- a/src/gallium/winsys/r600/drm/evergreen_hw_context.c +++ b/src/gallium/winsys/r600/drm/evergreen_hw_context.c @@ -54,6 +54,7 @@ static const struct r600_reg evergreen_config_reg_list[] = { {R_008C20_SQ_STACK_RESOURCE_MGMT_1, REG_FLAG_ENABLE_ALWAYS | REG_FLAG_FLUSH_CHANGE, 0, 0}, {R_008C24_SQ_STACK_RESOURCE_MGMT_2, REG_FLAG_ENABLE_ALWAYS | REG_FLAG_FLUSH_CHANGE, 0, 0}, {R_008C28_SQ_STACK_RESOURCE_MGMT_3, REG_FLAG_ENABLE_ALWAYS | REG_FLAG_FLUSH_CHANGE, 0, 0}, + {R_008C2C_SQ_LDS_RESOURCE_MGMT, REG_FLAG_ENABLE_ALWAYS | REG_FLAG_FLUSH_CHANGE, 0, 0}, {R_008D8C_SQ_DYN_GPR_CNTL_PS_FLUSH_REQ, REG_FLAG_ENABLE_ALWAYS | REG_FLAG_FLUSH_CHANGE, 0, 0}, {R_009100_SPI_CONFIG_CNTL, REG_FLAG_ENABLE_ALWAYS | REG_FLAG_FLUSH_CHANGE, 0, 0}, {R_00913C_SPI_CONFIG_CNTL_1, REG_FLAG_ENABLE_ALWAYS | REG_FLAG_FLUSH_CHANGE, 0, 0}, -- 1.7.1.1