[xorg-x11-drv-nouveau/f13/master] nv50: add support for UYVY xvimages

Ben Skeggs bskeggs at fedoraproject.org
Sun Aug 22 22:40:17 UTC 2010


commit 0298122c56a5c8c7d401d3a762b8fca7b950cf40
Author: Ben Skeggs <bskeggs at redhat.com>
Date:   Mon Aug 23 08:39:34 2010 +1000

    nv50: add support for UYVY xvimages

 nouveau-nv50-uyvy.patch   |   72 +++++++++++++++++++++++++++++++++++++++++++++
 xorg-x11-drv-nouveau.spec |    7 ++++-
 2 files changed, 78 insertions(+), 1 deletions(-)
---
diff --git a/nouveau-nv50-uyvy.patch b/nouveau-nv50-uyvy.patch
new file mode 100644
index 0000000..3f0a519
--- /dev/null
+++ b/nouveau-nv50-uyvy.patch
@@ -0,0 +1,72 @@
+From 390f1c86d9583f4ceabd407ee47410073c2a1b55 Mon Sep 17 00:00:00 2001
+From: Ben Skeggs <bskeggs at redhat.com>
+Date: Fri, 20 Aug 2010 09:48:32 +1000
+Subject: [PATCH] nv50/xv: support UYVY
+
+Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
+---
+ src/nouveau_xv.c |    3 ++-
+ src/nv50_xv.c    |   16 ++++++++++++++++
+ 2 files changed, 18 insertions(+), 1 deletions(-)
+
+diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c
+index 4437aa6..b531f10 100644
+--- a/src/nouveau_xv.c
++++ b/src/nouveau_xv.c
+@@ -1983,7 +1983,8 @@ NV50TexturedImages[] =
+ {
+ 	XVIMAGE_YV12,
+ 	XVIMAGE_I420,
+-	XVIMAGE_YUY2
++	XVIMAGE_YUY2,
++	XVIMAGE_UYVY
+ };
+ 
+ static XF86VideoAdaptorPtr
+diff --git a/src/nv50_xv.c b/src/nv50_xv.c
+index 2e0f080..b9349a2 100644
+--- a/src/nv50_xv.c
++++ b/src/nv50_xv.c
+@@ -147,11 +147,19 @@ nv50_xv_state_emit(PixmapPtr ppix, int id, struct nouveau_bo *src,
+ 	OUT_RING  (chan, 0x03000000);
+ 	OUT_RING  (chan, 0x00000000);
+ 	} else {
++	if (id == FOURCC_UYVY) {
++	OUT_RING  (chan, NV50TIC_0_0_MAPA_C1 | NV50TIC_0_0_TYPEA_UNORM |
++			 NV50TIC_0_0_MAPB_ZERO | NV50TIC_0_0_TYPEB_UNORM |
++			 NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM |
++			 NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM |
++			 NV50TIC_0_0_FMT_8_8);
++	} else {
+ 	OUT_RING  (chan, NV50TIC_0_0_MAPA_C0 | NV50TIC_0_0_TYPEA_UNORM |
+ 			 NV50TIC_0_0_MAPB_ZERO | NV50TIC_0_0_TYPEB_UNORM |
+ 			 NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM |
+ 			 NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM |
+ 			 NV50TIC_0_0_FMT_8_8);
++	}
+ 	if (OUT_RELOCl(chan, src, packed_y, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD) ||
+ 	    OUT_RELOC (chan, src, packed_y, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD |
+ 		       NOUVEAU_BO_HIGH | NOUVEAU_BO_OR, mode, mode)) {
+@@ -163,11 +171,19 @@ nv50_xv_state_emit(PixmapPtr ppix, int id, struct nouveau_bo *src,
+ 	OUT_RING  (chan, (1 << NV50TIC_0_5_DEPTH_SHIFT) | src_h);
+ 	OUT_RING  (chan, 0x03000000);
+ 	OUT_RING  (chan, 0x00000000);
++	if (id == FOURCC_UYVY) {
++	OUT_RING  (chan, NV50TIC_0_0_MAPA_C2 | NV50TIC_0_0_TYPEA_UNORM |
++			 NV50TIC_0_0_MAPB_C0 | NV50TIC_0_0_TYPEB_UNORM |
++			 NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM |
++			 NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM |
++			 NV50TIC_0_0_FMT_8_8_8_8);
++	} else {
+ 	OUT_RING  (chan, NV50TIC_0_0_MAPA_C3 | NV50TIC_0_0_TYPEA_UNORM |
+ 			 NV50TIC_0_0_MAPB_C1 | NV50TIC_0_0_TYPEB_UNORM |
+ 			 NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM |
+ 			 NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM |
+ 			 NV50TIC_0_0_FMT_8_8_8_8);
++	}
+ 	if (OUT_RELOCl(chan, src, packed_y, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD) ||
+ 	    OUT_RELOC (chan, src, packed_y, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD |
+ 		       NOUVEAU_BO_HIGH | NOUVEAU_BO_OR, mode, mode)) {
+-- 
+1.7.2.1
+
diff --git a/xorg-x11-drv-nouveau.spec b/xorg-x11-drv-nouveau.spec
index b568a42..f874cec 100644
--- a/xorg-x11-drv-nouveau.spec
+++ b/xorg-x11-drv-nouveau.spec
@@ -19,7 +19,7 @@ Name:      xorg-x11-drv-nouveau
 # need to set an epoch to get version number in sync with upstream
 Epoch:     1
 Version:   %{nouveau_version}
-Release:   7.%{snapshot}%{?dist}
+Release:   8.%{snapshot}%{?dist}
 URL:       http://www.x.org
 License:   MIT
 Group:     User Interface/X Hardware Support
@@ -48,6 +48,7 @@ Patch2: nouveau-no-outputs.patch
 Patch3: nouveau-exa-no-pa_fa.patch
 Patch4: nouveau-zfill-fallback.patch
 Patch5: nouveau-server-regen.patch
+Patch6: nouveau-nv50-uyvy.patch
 
 %description 
 X.Org X11 nouveau video driver.
@@ -61,6 +62,7 @@ X.Org X11 nouveau video driver.
 %patch3 -p1 -b .no_wfb
 %patch4 -p1 -b .zfill
 %patch5 -p1 -b .regen
+%patch6 -p1 -b .uyvy
 
 %build
 autoreconf -v --install
@@ -84,6 +86,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man4/nouveau.4*
 
 %changelog
+* Mon Aug 23 2010 Ben Skeggs <bskeggs at redhat.com> 0.0.16-8.20100423git13c1043
+- nv50: support decoding of UYVY xvimages
+
 * Sat Jun 26 2010 Ben Skeggs <bskeggs at redhat.com> 0.0.16-7.20100423git13c1043
 - disable wfb usage, fixes certain slowdowns and corruption (rh#596393)
 - zfill framebuffer if we can't properly transition for any reason (rh#582489)


More information about the scm-commits mailing list