summaryrefslogtreecommitdiff
path: root/src/nouveau_xv.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-01-17 09:14:31 +1000
committerBen Skeggs <bskeggs@redhat.com>2011-01-17 09:14:31 +1000
commit38e8809bb415bae5c182fc79c8fc62992c5e4ed0 (patch)
treeadaebd7f2468db182678aa50db4b2706c3c5ef50 /src/nouveau_xv.c
parentb795ca6e97fae9735843748585401098dae1c3e1 (diff)
nvc0: merge initial acceleration support
Squashed commit of the following: commit e8ce1ef351ee51bec51211dca6fda88fdbfbefee Author: Ben Skeggs <bskeggs@redhat.com> Date: Mon Jan 17 08:55:04 2011 +1000 fix hardcoding of nvc0 wfb path commit b414b1f948da18d96309bad84c54948d877efaa6 Author: Ben Skeggs <bskeggs@redhat.com> Date: Mon Jan 17 08:52:53 2011 +1000 general tidy-ups in preparation for merge to master commit 73bf71d5de0cb990178a1d2a31e0ea1717c214a4 Merge: fb499a4 b795ca6 Author: Ben Skeggs <bskeggs@redhat.com> Date: Mon Jan 17 08:47:40 2011 +1000 Merge branch 'master' into nvc0 commit fb499a4e9d95650dc89f4c1820b94d01344733f6 Author: Ben Skeggs <bskeggs@redhat.com> Date: Mon Dec 20 12:54:43 2010 +1000 nvc0: switch to "standard" RING macros commit 64f0e1d0e9e29c5437ad4e52d01ccfb0b03a2ae9 Merge: eba7e17 c2092a4 Author: Ben Skeggs <bskeggs@redhat.com> Date: Mon Dec 20 11:58:42 2010 +1000 Merge branch 'master' into nvc0 Conflicts: src/nv_dma.c commit eba7e173a5006ff50b950d0e8b8154564471a9ce Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Dec 17 11:04:40 2010 +1000 nvc0/xv: use mad in nv12 shader, rather than mul+add Signed-off-by: Ben Skeggs <bskeggs@redhat.com> commit b025ceb40a5e94a3657f3c7f76044c49a1a05e8d Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Thu Dec 16 23:34:29 2010 +0100 nvc0: fix offset of 17bc buffer I had messed it up in 5e4da3451c3c0f645f98fea7fb0ce2629b1bfd2f. commit 6ff5a9a7f3411ef218f17fa481c583596ffde2cc Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Thu Dec 16 01:07:25 2010 +0100 nvc0/xv: bind textures for the FP, not the TEP commit 5e4da3451c3c0f645f98fea7fb0ce2629b1bfd2f Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Thu Dec 16 01:02:58 2010 +0100 nvc0: switch to rnn headers commit 0839041e79dbb0e629326d0f240220b33921db1a Author: Ben Skeggs <bskeggs@redhat.com> Date: Wed Dec 15 16:42:41 2010 +1000 nvc0/exa: fix m2mf dfs commit 88c1c43302331e1cb8b7035bfb4677a5e7da3090 Author: Ben Skeggs <bskeggs@redhat.com> Date: Mon Dec 13 12:00:23 2010 +1000 nvc0: add Xv implementation commit ad5b4cfe388a102a0c93f7281cb4bba532b1796b Merge: 1942a81 b6cb21b Author: Ben Skeggs <bskeggs@redhat.com> Date: Wed Dec 15 14:57:04 2010 +1000 Merge branch 'master' into nvc0 commit 1942a81c0eb592972d4a3e8c46b80192ae8d1a59 Author: Ben Skeggs <bskeggs@redhat.com> Date: Thu Dec 9 12:48:27 2010 +1000 nvc0: call grobj_alloc for all used object classes Though the hardware has no concept of object handles any more, the nouveau DRM still uses this call to know what engines are in use. commit 0c670a6d406fe0a57373fa9e03005be6f28ecc3e Author: Ben Skeggs <bskeggs@redhat.com> Date: Thu Dec 9 12:44:41 2010 +1000 nvc0: don't try and create DmaNotifier0 commit 5d3d20d908a50ad7742567d58969c7f12dd944f7 Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Thu Dec 9 01:36:32 2010 +0100 nvc0: change tile_mode to contain 0xZYX instead of 0xZY Warning: the kernel will not like that (EVO) commit dd7fd8263e0e9f92412fb20086e4c8acf8cab099 Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Thu Dec 9 00:29:58 2010 +0100 exa: don't fall back to nv04 m2mf if nvc0 m2mf fails commit b4cf5a8f2276392945c2530f0d6fe96b5ab4b5da Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Thu Dec 9 00:07:59 2010 +0100 nvc0/exa: remove noisy debug messages commit 5419ef6d2cfabb7329982cb8dbdb5bbc8e973fe3 Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Wed Dec 8 23:55:51 2010 +0100 nvc0/accel: remove unneeded scratch method 0x3420 init It was intended be read by a MACRO method to get the address for constants upload. commit 178356391ff6831599eba257a5912079894641a1 Merge: 8573280 8bb8231 Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Thu Dec 9 01:31:40 2010 +0100 Merge remote branch 'origin/master' into nvc0 Conflicts: src/drmmode_display.c src/nouveau_exa.c src/nv_driver.c src/nv_type.h commit 8573280871401e29f27fa24d0b7c6ac5e35b2cc1 Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Sat Jul 3 14:27:36 2010 +0200 nvc0: initial implementation EXA should work, Xv not yet done.
Diffstat (limited to 'src/nouveau_xv.c')
-rw-r--r--src/nouveau_xv.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c
index c1d4ccb..30753fa 100644
--- a/src/nouveau_xv.c
+++ b/src/nouveau_xv.c
@@ -245,8 +245,13 @@ nouveau_xv_bo_realloc(ScrnInfoPtr pScrn, unsigned flags, unsigned size,
}
tile_flags = 0;
- if (pNv->Architecture >= NV_ARCH_50 && (flags & NOUVEAU_BO_VRAM))
- tile_flags = 0x7000;
+ if (flags & NOUVEAU_BO_VRAM) {
+ if (pNv->Architecture == NV_ARCH_50)
+ tile_flags = 0x7000;
+ else
+ if (pNv->Architecture == NV_ARCH_C0)
+ tile_flags = 0xfe00;
+ }
ret = nouveau_bo_new_tile(pNv->dev, flags | NOUVEAU_BO_MAP, 0,
size, 0, tile_flags, pbo);
@@ -1106,6 +1111,12 @@ NVPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x,
nouveau_bo_unmap(destination_buffer);
+ if (pNv->Architecture >= NV_ARCH_C0) {
+ nvc0_xv_m2mf(m2mf, pPriv->video_mem, uv_offset, dstPitch,
+ nlines, destination_buffer, line_len);
+ goto put_image;
+ }
+
if (MARK_RING(chan, 64, 4))
return FALSE;
@@ -1245,6 +1256,7 @@ CPU_copy:
if (pPriv->currentHostBuffer != NO_PRIV_HOST_BUFFER_AVAILABLE)
pPriv->currentHostBuffer ^= 1;
+put_image:
/* If we're not using the hw overlay, we're rendering into a pixmap
* and need to take a couple of additional steps...
*/
@@ -1315,6 +1327,13 @@ CPU_copy:
xb, yb, npixels, nlines,
src_w, src_h, drw_w, drw_h,
clipBoxes, ppix, pPriv);
+ } else {
+ ret = nvc0_xv_image_put(pScrn, pPriv->video_mem,
+ offset, uv_offset,
+ id, dstPitch, &dstBox, 0, 0,
+ xb, yb, npixels, nlines,
+ src_w, src_h, drw_w, drw_h,
+ clipBoxes, ppix, pPriv);
}
if (ret != Success)
@@ -2041,7 +2060,6 @@ NV50SetupTexturedVideo (ScreenPtr pScreen)
return adapt;
}
-
/**
* NVInitVideo
* tries to initialize the various supported adapters
@@ -2084,7 +2102,7 @@ NVInitVideo(ScreenPtr pScreen)
textureAdaptor[0] = NV40SetupTexturedVideo(pScreen, FALSE);
textureAdaptor[1] = NV40SetupTexturedVideo(pScreen, TRUE);
} else
- if (pNv->Architecture == NV_ARCH_50) {
+ if (pNv->Architecture >= NV_ARCH_50) {
textureAdaptor[0] = NV50SetupTexturedVideo(pScreen);
}
}