summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-03-29 14:25:15 +1000
committerBen Skeggs <bskeggs@redhat.com>2012-04-14 02:07:56 +1000
commit1c7651532975cf738b3aac4ec3c3b46187e24eea (patch)
treeece57de01abdd7d4a4fefebd1bf99cc684bcdee6
parent180d8778764913ed061e68520603c0925477faba (diff)
nvc0: do tic/tsc binding only once, at startup
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--src/nvc0_accel.c8
-rw-r--r--src/nvc0_exa.c8
-rw-r--r--src/nvc0_xv.c5
3 files changed, 5 insertions, 16 deletions
diff --git a/src/nvc0_accel.c b/src/nvc0_accel.c
index d92dff1..31e2507 100644
--- a/src/nvc0_accel.c
+++ b/src/nvc0_accel.c
@@ -165,9 +165,6 @@ NVAccelInit3D_NVC0(ScrnInfoPtr pScrn)
BEGIN_NVC0(push, SUBC_3D(0x1590), 1);
PUSH_DATA (push, 0);
- BEGIN_NVC0(push, NVC0_3D(LINKED_TSC), 1);
- PUSH_DATA (push, 1);
-
BEGIN_NVC0(push, NVC0_3D(VIEWPORT_TRANSFORM_EN), 1);
PUSH_DATA (push, 0);
BEGIN_NVC0(push, NVC0_3D(VIEW_VOLUME_CLIP_CTRL), 1);
@@ -184,8 +181,13 @@ NVAccelInit3D_NVC0(ScrnInfoPtr pScrn)
PUSH_DATA (push, (bo->offset + TSC_OFFSET) >> 32);
PUSH_DATA (push, (bo->offset + TSC_OFFSET));
PUSH_DATA (push, 0);
+ BEGIN_NVC0(push, NVC0_3D(LINKED_TSC), 1);
+ PUSH_DATA (push, 1);
BEGIN_NVC0(push, NVC0_3D(TEX_LIMITS(4)), 1);
PUSH_DATA (push, 0x54);
+ BEGIN_NIC0(push, NVC0_3D(BIND_TIC(4)), 2);
+ PUSH_DATA (push, (0 << 9) | (0 << 1) | NVC0_3D_BIND_TIC_ACTIVE);
+ PUSH_DATA (push, (1 << 9) | (1 << 1) | NVC0_3D_BIND_TIC_ACTIVE);
BEGIN_NVC0(push, NVC0_3D(BLEND_ENABLE(0)), 8);
PUSH_DATA (push, 1);
diff --git a/src/nvc0_exa.c b/src/nvc0_exa.c
index ae2a523..4ba862d 100644
--- a/src/nvc0_exa.c
+++ b/src/nvc0_exa.c
@@ -779,17 +779,12 @@ NVC0EXAPrepareComposite(int op,
if (!NVC0EXATexture(pspix, pspict, 0))
NOUVEAU_FALLBACK("src picture invalid\n");
- BEGIN_NVC0(push, NVC0_3D(BIND_TIC(4)), 1);
- PUSH_DATA (push, (0 << 9) | (0 << 1) | NVC0_3D_BIND_TIC_ACTIVE);
if (pmpict) {
if (!NVC0EXATexture(pmpix, pmpict, 1))
NOUVEAU_FALLBACK("mask picture invalid\n");
state->have_mask = TRUE;
- BEGIN_NVC0(push, NVC0_3D(BIND_TIC(4)), 1);
- PUSH_DATA (push, (1 << 9) | (1 << 1) | NVC0_3D_BIND_TIC_ACTIVE);
-
BEGIN_NVC0(push, NVC0_3D(SP_START_ID(5)), 1);
if (pdpict->format == PICT_a8) {
PUSH_DATA (push, PFP_C_A8);
@@ -807,9 +802,6 @@ NVC0EXAPrepareComposite(int op,
} else {
state->have_mask = FALSE;
- BEGIN_NVC0(push, NVC0_3D(BIND_TIC(4)), 1);
- PUSH_DATA (push, (1 << 1) | 0);
-
BEGIN_NVC0(push, NVC0_3D(SP_START_ID(5)), 1);
if (pdpict->format == PICT_a8)
PUSH_DATA (push, PFP_S_A8);
diff --git a/src/nvc0_xv.c b/src/nvc0_xv.c
index 1378170..3c08a7f 100644
--- a/src/nvc0_xv.c
+++ b/src/nvc0_xv.c
@@ -208,11 +208,6 @@ nvc0_xv_image_put(ScrnInfoPtr pScrn,
BEGIN_NVC0(push, NVC0_3D(TEX_CACHE_CTL), 1);
PUSH_DATA (push, 0);
- BEGIN_NVC0(push, NVC0_3D(BIND_TIC(4)), 1);
- PUSH_DATA (push, 1);
- BEGIN_NVC0(push, NVC0_3D(BIND_TIC(4)), 1);
- PUSH_DATA (push, 0x203);
-
if (0 && pPriv->SyncToVBlank) {
NV50SyncToVBlank(ppix, dstBox);
}