Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: radeon add a tcl state flush before accessing tcl vector space

Do a tcl state flush before accessing tcl vector space. This fixes some
more problems with flickering (bug #6637). drm may not be appropriate
place for this, since doing that flush there might both be overkill and
insufficient in some cases. However, it's hard to figure out when that
flush is needed, so this has to suffice. There does not seem to be a
performance penalty associated with it.

From: Roland Scheidegger (DRM CVS)
Signed-off-by: Dave Airlie <airlied@linux.ie>

+5 -2
+3 -1
drivers/char/drm/radeon_drv.h
··· 38 38 39 39 #define DRIVER_NAME "radeon" 40 40 #define DRIVER_DESC "ATI Radeon" 41 - #define DRIVER_DATE "20060225" 41 + #define DRIVER_DATE "20060519" 42 42 43 43 /* Interface history: 44 44 * ··· 883 883 #define RADEON_PP_CUBIC_OFFSET_T0_0 0x1dd0 /* bits [31:5] */ 884 884 #define RADEON_PP_CUBIC_OFFSET_T1_0 0x1e00 885 885 #define RADEON_PP_CUBIC_OFFSET_T2_0 0x1e14 886 + 887 + #define RADEON_SE_TCL_STATE_FLUSH 0x2284 886 888 887 889 #define SE_VAP_CNTL__TCL_ENA_MASK 0x00000001 888 890 #define SE_VAP_CNTL__FORCE_W_TO_ONE_MASK 0x00010000
+2 -1
drivers/char/drm/radeon_state.c
··· 2595 2595 int stride = header.vectors.stride; 2596 2596 RING_LOCALS; 2597 2597 2598 - BEGIN_RING(3 + sz); 2598 + BEGIN_RING(5 + sz); 2599 + OUT_RING_REG(RADEON_SE_TCL_STATE_FLUSH, 0); 2599 2600 OUT_RING(CP_PACKET0(RADEON_SE_TCL_VECTOR_INDX_REG, 0)); 2600 2601 OUT_RING(start | (stride << RADEON_VEC_INDX_OCTWORD_STRIDE_SHIFT)); 2601 2602 OUT_RING(CP_PACKET0_TABLE(RADEON_SE_TCL_VECTOR_DATA_REG, (sz - 1)));