summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/radeon_exa_render.c1
-rw-r--r--src/radeon_textured_videofuncs.c71
-rw-r--r--src/radeon_video.c2
3 files changed, 45 insertions, 29 deletions
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index f8f6600..1d95600 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -992,7 +992,6 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture,
OUT_ACCEL_REG(R300_VAP_VTE_CNTL, 0x300);
OUT_ACCEL_REG(R300_VAP_PSC_SGN_NORM_CNTL, 0x0);
-
if (has_tcl) {
OUT_ACCEL_REG(R300_VAP_PROG_STREAM_CNTL_0, 0x4a014001);
OUT_ACCEL_REG(R300_VAP_PROG_STREAM_CNTL_1, 0x6b01);
diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c
index 3e2bc30..36951d5 100644
--- a/src/radeon_textured_videofuncs.c
+++ b/src/radeon_textured_videofuncs.c
@@ -128,7 +128,7 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv
FINISH_VIDEO();
if (IS_R300_VARIANT || IS_AVIVO_VARIANT) {
-
+ int has_tcl = (info->ChipFamily != CHIP_FAMILY_RS690 && info->ChipFamily != CHIP_FAMILY_RS400);
switch (pPixmap->drawable.bitsPerPixel) {
case 16:
if (pPixmap->drawable.depth == 15)
@@ -184,39 +184,56 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv
txenable = R300_TEX_0_ENABLE;
/* setup vertex shader */
- BEGIN_VIDEO(26);
- OUT_VIDEO_REG(R300_VAP_CNTL_STATUS, 0x0);
- OUT_VIDEO_REG(R300_VAP_PVS_STATE_FLUSH_REG, 0x0);
- OUT_VIDEO_REG(R300_VAP_CNTL, 0x300456);
+ if (has_tcl) {
+ BEGIN_VIDEO(26);
+ OUT_VIDEO_REG(R300_VAP_CNTL_STATUS, 0x0);
+ OUT_VIDEO_REG(R300_VAP_PVS_STATE_FLUSH_REG, 0x0);
+ OUT_VIDEO_REG(R300_VAP_CNTL, 0x300456);
+ } else {
+ BEGIN_VIDEO(8);
+ OUT_VIDEO_REG(R300_VAP_CNTL_STATUS, 1<<8);
+ OUT_VIDEO_REG(R300_VAP_CNTL, 0x14045a);
+ }
+
OUT_VIDEO_REG(R300_VAP_VTE_CNTL, 0x300);
OUT_VIDEO_REG(R300_VAP_PSC_SGN_NORM_CNTL, 0x0);
- OUT_VIDEO_REG(R300_VAP_PROG_STREAM_CNTL_0, 0x6a014001);
- OUT_VIDEO_REG(R300_VAP_PROG_STREAM_CNTL_EXT_0, 0xf688f688);
- OUT_VIDEO_REG(R300_VAP_PVS_CODE_CNTL_0, 0x100400);
- OUT_VIDEO_REG(R300_VAP_PVS_CODE_CNTL_1, 0x1);
- OUT_VIDEO_REG(R300_VAP_PVS_VECTOR_INDX_REG, 0);
- OUT_VIDEO_REG(R300_VAP_PVS_VECTOR_DATA_REG,0x00f00203);
- OUT_VIDEO_REG(R300_VAP_PVS_VECTOR_DATA_REG,0x00d10001);
- OUT_VIDEO_REG(R300_VAP_PVS_VECTOR_DATA_REG,0x01248001);
- OUT_VIDEO_REG(R300_VAP_PVS_VECTOR_DATA_REG,0x01248001);
- OUT_VIDEO_REG(R300_VAP_PVS_VECTOR_DATA_REG,0x00f02203);
- OUT_VIDEO_REG(R300_VAP_PVS_VECTOR_DATA_REG,0x00d10141);
- OUT_VIDEO_REG(R300_VAP_PVS_VECTOR_DATA_REG,0x01248141);
- OUT_VIDEO_REG(R300_VAP_PVS_VECTOR_DATA_REG,0x01248141);
-
- OUT_VIDEO_REG(R300_VAP_PVS_FLOW_CNTL_OPC, 0x0);
+
+ if (has_tcl) {
+ OUT_VIDEO_REG(R300_VAP_PROG_STREAM_CNTL_0, 0x6a014001);
+ OUT_VIDEO_REG(R300_VAP_PROG_STREAM_CNTL_EXT_0, 0xf688f688);
+ } else {
+ OUT_VIDEO_REG(R300_VAP_PROG_STREAM_CNTL_0, 0x66014001);
+ OUT_VIDEO_REG(R300_VAP_PROG_STREAM_CNTL_EXT_0, 0x3b083b08);
+ }
+
+ if (has_tcl) {
+ OUT_VIDEO_REG(R300_VAP_PVS_CODE_CNTL_0, 0x100400);
+ OUT_VIDEO_REG(R300_VAP_PVS_CODE_CNTL_1, 0x1);
+ OUT_VIDEO_REG(R300_VAP_PVS_VECTOR_INDX_REG, 0);
+ OUT_VIDEO_REG(R300_VAP_PVS_VECTOR_DATA_REG,0x00f00203);
+ OUT_VIDEO_REG(R300_VAP_PVS_VECTOR_DATA_REG,0x00d10001);
+ OUT_VIDEO_REG(R300_VAP_PVS_VECTOR_DATA_REG,0x01248001);
+ OUT_VIDEO_REG(R300_VAP_PVS_VECTOR_DATA_REG,0x01248001);
+ OUT_VIDEO_REG(R300_VAP_PVS_VECTOR_DATA_REG,0x00f02203);
+ OUT_VIDEO_REG(R300_VAP_PVS_VECTOR_DATA_REG,0x00d10141);
+ OUT_VIDEO_REG(R300_VAP_PVS_VECTOR_DATA_REG,0x01248141);
+ OUT_VIDEO_REG(R300_VAP_PVS_VECTOR_DATA_REG,0x01248141);
+ OUT_VIDEO_REG(R300_VAP_PVS_FLOW_CNTL_OPC, 0x0);
+
+
+ OUT_VIDEO_REG(R300_VAP_GB_VERT_CLIP_ADJ, 0x3f800000);
+ OUT_VIDEO_REG(R300_VAP_GB_VERT_DISC_ADJ, 0x3f800000);
+ OUT_VIDEO_REG(R300_VAP_GB_HORZ_CLIP_ADJ, 0x3f800000);
+ OUT_VIDEO_REG(R300_VAP_GB_HORZ_DISC_ADJ, 0x3f800000);
+ OUT_VIDEO_REG(R300_VAP_CLIP_CNTL, 0x10000);
+ }
+
OUT_VIDEO_REG(R300_VAP_OUT_VTX_FMT_0, 0x1);
OUT_VIDEO_REG(R300_VAP_OUT_VTX_FMT_1, 0x2);
-
- OUT_VIDEO_REG(R300_VAP_GB_VERT_CLIP_ADJ, 0x3f800000);
- OUT_VIDEO_REG(R300_VAP_GB_VERT_DISC_ADJ, 0x3f800000);
- OUT_VIDEO_REG(R300_VAP_GB_HORZ_CLIP_ADJ, 0x3f800000);
- OUT_VIDEO_REG(R300_VAP_GB_HORZ_DISC_ADJ, 0x3f800000);
- OUT_VIDEO_REG(R300_VAP_CLIP_CNTL, 0x10000);
FINISH_VIDEO();
/* setup pixel shader */
- if (IS_R300_VARIANT) {
+ if (IS_R300_VARIANT || info->ChipFamily == CHIP_FAMILY_RS690) {
BEGIN_VIDEO(16);
OUT_VIDEO_REG(R300_RS_COUNT, 0x40002);
OUT_VIDEO_REG(R300_RS_IP_0, 0x1610000);
diff --git a/src/radeon_video.c b/src/radeon_video.c
index 1b7d924..487f064 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -285,7 +285,7 @@ void RADEONInitVideo(ScreenPtr pScreen)
RADEONInitOffscreenImages(pScreen);
}
- if (info->ChipFamily != CHIP_FAMILY_RS400 && info->ChipFamily != CHIP_FAMILY_RS690) {
+ if (info->ChipFamily != CHIP_FAMILY_RS400) {
texturedAdaptor = RADEONSetupImageTexturedVideo(pScreen);
if (texturedAdaptor != NULL) {
adaptors[num_adaptors++] = texturedAdaptor;