Module: Mesa
Branch: 7.11
Commit: ef9f16f6322a89fb699fbe3da868b10f9acaef98
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ef9f16f6322a89fb699fbe3da868b10f9acaef98

Author: Alex Deucher <alexdeuc...@gmail.com>
Date:   Tue Jul 12 12:00:10 2011 -0400

r600g: emit SQ_LDS_RESOURCE_MGMT

Need to be initialized to a reasonable value as
compute code may change it.

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 <alexdeuc...@gmail.com>

---

 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 dc18261..f7450bc 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -1454,6 +1454,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_008E2C_NUM_PS_LDS(0x1000);
+       tmp |= S_008E2C_NUM_LS_LDS(0x1000);
+       r600_pipe_state_add_reg(rstate, R_008E2C_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..96dbd4d 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_008E2C_SQ_LDS_RESOURCE_MGMT                0x00008E2C
+#define   S_008E2C_NUM_PS_LDS(x)                       (((x) & 0xFFFF) << 0)
+#define   G_008E2C_NUM_PS_LDS(x)                       (((x) >> 0) & 0xFFFF)
+#define   C_008E2C_NUM_PS_LDS(x)                       0x0000FFFF
+#define   S_008E2C_NUM_LS_LDS(x)                       (((x) & 0xFFFF) << 16)
+#define   G_008E2C_NUM_LS_LDS(x)                       (((x) >> 16) & 0xFFFF)
+#define   C_008E2C_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..60d2e28 100644
--- a/src/gallium/winsys/r600/drm/evergreen_hw_context.c
+++ b/src/gallium/winsys/r600/drm/evergreen_hw_context.c
@@ -55,6 +55,7 @@ static const struct r600_reg evergreen_config_reg_list[] = {
        {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_008D8C_SQ_DYN_GPR_CNTL_PS_FLUSH_REQ, REG_FLAG_ENABLE_ALWAYS | 
REG_FLAG_FLUSH_CHANGE, 0, 0},
+       {R_008E2C_SQ_LDS_RESOURCE_MGMT, 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},
 };

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to