[xorg-x11-drv-nouveau/f18] upstream snapshot + prime support

Dave Airlie airlied at fedoraproject.org
Thu Aug 16 00:56:55 UTC 2012


commit fc7e9de9fd2b6e5b76eb01b9dacaf0500007a9fb
Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Aug 16 10:56:06 2012 +1000

    upstream snapshot + prime support

 .gitignore                     |    1 +
 nouveau-prime.patch            |  510 ++++++++++++++++++++++++++++++++++++++++
 sources                        |    1 +
 xorg-x11-drv-nouveau-ppc.patch |   39 ---
 xorg-x11-drv-nouveau.spec      |   16 +-
 5 files changed, 521 insertions(+), 46 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 066c675..b474f05 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@ xf86-video-nouveau-0.0.16-20100615gitdb98ad2.tar.bz2
 /xf86-video-nouveau-20120426.tar.xz
 /xf86-video-nouveau-1.0.0.tar.bz2
 /xf86-video-nouveau-1.0.1.tar.bz2
+/xf86-video-nouveau-20120816.tar.xz
diff --git a/nouveau-prime.patch b/nouveau-prime.patch
new file mode 100644
index 0000000..d50cbe9
--- /dev/null
+++ b/nouveau-prime.patch
@@ -0,0 +1,510 @@
+diff --git a/src/drmmode_display.c b/src/drmmode_display.c
+index 62838fa..71f38c9 100644
+--- a/src/drmmode_display.c
++++ b/src/drmmode_display.c
+@@ -1199,6 +1199,8 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp)
+ 	for (i = 0; i < drmmode->mode_res->count_connectors; i++)
+ 		drmmode_output_init(pScrn, drmmode, i);
+ 
++	xf86ProviderSetup(pScrn, NULL, "nouveau");
++
+ 	xf86InitialConfiguration(pScrn, TRUE);
+ 
+ 	return TRUE;
+diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
+index 62333b1..fbcc35c 100644
+--- a/src/nouveau_dri2.c
++++ b/src/nouveau_dri2.c
+@@ -22,33 +22,27 @@ nouveau_dri2_buffer(DRI2BufferPtr buf)
+ }
+ 
+ DRI2BufferPtr
+-nouveau_dri2_create_buffer(DrawablePtr pDraw, unsigned int attachment,
++nouveau_dri2_create_buffer2(ScreenPtr pScreen, DrawablePtr pDraw, unsigned int attachment,
+ 			   unsigned int format)
+ {
+-	ScreenPtr pScreen = pDraw->pScreen;
+ 	NVPtr pNv = NVPTR(xf86ScreenToScrn(pScreen));
+ 	struct nouveau_dri2_buffer *nvbuf;
+ 	struct nouveau_pixmap *nvpix;
+-	PixmapPtr ppix;
++	PixmapPtr ppix = NULL;
+ 
+ 	nvbuf = calloc(1, sizeof(*nvbuf));
+ 	if (!nvbuf)
+ 		return NULL;
+ 
+ 	if (attachment == DRI2BufferFrontLeft) {
+-		if (pDraw->type == DRAWABLE_PIXMAP) {
+-			ppix = (PixmapPtr)pDraw;
+-		} else {
+-			WindowPtr pwin = (WindowPtr)pDraw;
+-			ppix = pScreen->GetWindowPixmap(pwin);
+-
++		if (pDraw->type == DRAWABLE_WINDOW) {
+ #if DRI2INFOREC_VERSION >= 6
+ 			/* Set initial swap limit on drawable. */
+ 			DRI2SwapLimit(pDraw, pNv->swap_limit);
+ #endif
+ 		}
+-
+-		ppix->refcnt++;
++		if (ppix)
++			ppix->refcnt++;
+ 	} else {
+ 		int bpp;
+ 		unsigned int usage_hint = NOUVEAU_CREATE_PIXMAP_TILED;
+@@ -67,31 +61,43 @@ nouveau_dri2_create_buffer(DrawablePtr pDraw, unsigned int attachment,
+ 					     usage_hint);
+ 	}
+ 
+-	pNv->exa_force_cp = TRUE;
+-	exaMoveInPixmap(ppix);
+-	pNv->exa_force_cp = FALSE;
++	if (ppix) {
++		pNv->exa_force_cp = TRUE;
++		exaMoveInPixmap(ppix);
++		pNv->exa_force_cp = FALSE;
++
++		nvbuf->base.pitch = ppix->devKind;
++		nvbuf->base.cpp = ppix->drawable.bitsPerPixel / 8;
++	}
+ 
+ 	nvbuf->base.attachment = attachment;
+-	nvbuf->base.pitch = ppix->devKind;
+-	nvbuf->base.cpp = ppix->drawable.bitsPerPixel / 8;
+ 	nvbuf->base.driverPrivate = nvbuf;
+ 	nvbuf->base.format = format;
+ 	nvbuf->base.flags = 0;
+ 	nvbuf->ppix = ppix;
+ 
+-	nvpix = nouveau_pixmap(ppix);
+-	if (!nvpix || !nvpix->bo ||
+-	    nouveau_bo_name_get(nvpix->bo, &nvbuf->base.name)) {
+-		pScreen->DestroyPixmap(nvbuf->ppix);
+-		free(nvbuf);
+-		return NULL;
++	if (ppix) {
++		nvpix = nouveau_pixmap(ppix);
++		if (!nvpix || !nvpix->bo ||
++		    nouveau_bo_name_get(nvpix->bo, &nvbuf->base.name)) {
++			pScreen->DestroyPixmap(nvbuf->ppix);
++			free(nvbuf);
++			return NULL;
++		}
+ 	}
+-
+ 	return &nvbuf->base;
+ }
+ 
++DRI2BufferPtr
++nouveau_dri2_create_buffer(DrawablePtr pDraw, unsigned int attachment,
++			   unsigned int format)
++{
++	return nouveau_dri2_create_buffer2(pDraw->pScreen, pDraw,
++					   attachment, format);
++}
++
+ void
+-nouveau_dri2_destroy_buffer(DrawablePtr pDraw, DRI2BufferPtr buf)
++nouveau_dri2_destroy_buffer2(ScreenPtr pScreen, DrawablePtr pDraw, DRI2BufferPtr buf)
+ {
+ 	struct nouveau_dri2_buffer *nvbuf;
+ 
+@@ -99,38 +105,80 @@ nouveau_dri2_destroy_buffer(DrawablePtr pDraw, DRI2BufferPtr buf)
+ 	if (!nvbuf)
+ 		return;
+ 
+-	pDraw->pScreen->DestroyPixmap(nvbuf->ppix);
++	if (nvbuf->ppix)
++	    pScreen->DestroyPixmap(nvbuf->ppix);
+ 	free(nvbuf);
+ }
+ 
+ void
+-nouveau_dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion,
++nouveau_dri2_destroy_buffer(DrawablePtr pDraw, DRI2BufferPtr buf)
++{
++	nouveau_dri2_destroy_buffer2(pDraw->pScreen, pDraw, buf);
++}
++
++void
++nouveau_dri2_copy_region2(ScreenPtr pScreen, DrawablePtr pDraw, RegionPtr pRegion,
+ 			 DRI2BufferPtr pDstBuffer, DRI2BufferPtr pSrcBuffer)
+ {
+ 	struct nouveau_dri2_buffer *src = nouveau_dri2_buffer(pSrcBuffer);
+ 	struct nouveau_dri2_buffer *dst = nouveau_dri2_buffer(pDstBuffer);
+-	PixmapPtr pspix = src->ppix, pdpix = dst->ppix;
+-	ScreenPtr pScreen = pDraw->pScreen;
+ 	RegionPtr pCopyClip;
+ 	GCPtr pGC;
+-
++	DrawablePtr src_draw, dst_draw;
++	Bool translate = FALSE;
++	int off_x = 0, off_y = 0;
++
++	src_draw = &src->ppix->drawable;
++	dst_draw = &dst->ppix->drawable;
++#if 0
++	ErrorF("attachments src %d, dst %d, drawable %p %p pDraw %p\n",
++	       src->base.attachment, dst->base.attachment,
++	       src_draw, dst_draw, pDraw);
++#endif
+ 	if (src->base.attachment == DRI2BufferFrontLeft)
+-		pspix = (PixmapPtr)pDraw;
+-	if (dst->base.attachment == DRI2BufferFrontLeft)
+-		pdpix = (PixmapPtr)pDraw;
++		src_draw = pDraw;
++	if (dst->base.attachment == DRI2BufferFrontLeft) {
++		if (pDraw->pScreen != pScreen) {
++			dst_draw = DRI2UpdatePrime(pDraw, pDstBuffer);
++			if (!dst_draw)
++				return;
++		} 
++		else
++			dst_draw = pDraw;
++	}
++
++	if (dst_draw != pDraw)
++		translate = TRUE;
++
++	if (translate && pDraw->type == DRAWABLE_WINDOW) {
++		WindowPtr pWin = (WindowPtr)pDraw;
++		off_x = pWin->origin.x;
++		off_y = pWin->origin.y;
++	}
+ 
+ 	pGC = GetScratchGC(pDraw->depth, pScreen);
+ 	pCopyClip = REGION_CREATE(pScreen, NULL, 0);
+ 	REGION_COPY(pScreen, pCopyClip, pRegion);
+-	pGC->funcs->ChangeClip(pGC, CT_REGION, pCopyClip, 0);
+-	ValidateGC(&pdpix->drawable, pGC);
+ 
+-	pGC->ops->CopyArea(&pspix->drawable, &pdpix->drawable, pGC, 0, 0,
+-			   pDraw->width, pDraw->height, 0, 0);
++	if (translate) {
++		REGION_TRANSLATE(pScreen, pCopyClip, off_x, off_y);
++	}
++	pGC->funcs->ChangeClip(pGC, CT_REGION, pCopyClip, 0);
++	ValidateGC(dst_draw, pGC);
++	pGC->ops->CopyArea(src_draw, dst_draw, pGC, 0, 0,
++			   pDraw->width, pDraw->height, off_x, off_y);
+ 
+ 	FreeScratchGC(pGC);
+ }
+ 
++void
++nouveau_dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion,
++			 DRI2BufferPtr pDstBuffer, DRI2BufferPtr pSrcBuffer)
++{
++    return nouveau_dri2_copy_region2(pDraw->pScreen, pDraw, pRegion,
++				     pDstBuffer, pSrcBuffer);
++}
++
+ struct nouveau_dri2_vblank_state {
+ 	enum {
+ 		SWAP,
+@@ -169,7 +217,9 @@ update_front(DrawablePtr draw, DRI2BufferPtr front)
+ 		return FALSE;
+ 	}
+ 
+-	(*draw->pScreen->DestroyPixmap)(nvbuf->ppix);
++	if (nvbuf->ppix)
++		(*draw->pScreen->DestroyPixmap)(nvbuf->ppix);
++
+ 	front->pitch = pixmap->devKind;
+ 	front->cpp = pixmap->drawable.bitsPerPixel / 8;
+ 	nvbuf->ppix = pixmap;
+@@ -689,6 +739,17 @@ nouveau_dri2_init(ScreenPtr pScreen)
+ 	dri2.SwapLimitValidate = nouveau_dri2_swap_limit_validate;
+ #endif
+ 
++#if DRI2INFOREC_VERSION >= 7
++	dri2.version = 7;
++	dri2.GetParam = NULL;
++#endif
++
++#if DRI2INFOREC_VERSION >= 9
++	dri2.version = 9;
++	dri2.CreateBuffer2 = nouveau_dri2_create_buffer2;
++	dri2.DestroyBuffer2 = nouveau_dri2_destroy_buffer2;
++	dri2.CopyRegion2 = nouveau_dri2_copy_region2;
++#endif
+ 	return DRI2ScreenInit(pScreen, &dri2);
+ }
+ 
+diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c
+index 9b6b1f3..29bf003 100644
+--- a/src/nouveau_exa.c
++++ b/src/nouveau_exa.c
+@@ -154,6 +154,45 @@ nouveau_exa_destroy_pixmap(ScreenPtr pScreen, void *priv)
+ 	free(nvpix);
+ }
+ 
++static Bool
++nouveau_exa_share_pixmap_backing(PixmapPtr ppix, ScreenPtr slave, void **handle_p)
++{
++	struct nouveau_bo *bo = nouveau_pixmap_bo(ppix);
++	struct nouveau_pixmap *nvpix = nouveau_pixmap(ppix);
++	int ret;
++	int handle;
++
++	ret = nouveau_bo_set_prime(bo, &handle);
++	if (ret != 0) {
++		ErrorF("%s: ret is %d errno is %d\n", __func__, ret, errno);
++		return FALSE;
++	}
++	nvpix->shared = TRUE;
++	*handle_p = (void *)(long)handle;
++	return TRUE;
++}
++
++static Bool
++nouveau_exa_set_shared_pixmap_backing(PixmapPtr ppix, void *handle)
++{
++	ScrnInfoPtr pScrn = xf86ScreenToScrn(ppix->drawable.pScreen);
++	NVPtr pNv = NVPTR(pScrn);
++	struct nouveau_bo *bo = nouveau_pixmap_bo(ppix);
++	struct nouveau_pixmap *nvpix = nouveau_pixmap(ppix);
++	int ret;
++	int ihandle = (int)(long)(handle);
++
++	ret = nouveau_bo_prime_handle_ref(pNv->dev, ihandle, &bo);
++	if (ret) {
++		ErrorF("failed to get BO with handle %d\n", ihandle);
++		return FALSE;
++	}
++	nvpix->bo = bo;
++	nvpix->shared = TRUE;
++	close(ihandle);
++	return TRUE;
++}
++
+ bool
+ nv50_style_tiled_pixmap(PixmapPtr ppix)
+ {
+@@ -381,6 +420,8 @@ nouveau_exa_init(ScreenPtr pScreen)
+ 
+ 	exa->CreatePixmap2 = nouveau_exa_create_pixmap;
+ 	exa->DestroyPixmap = nouveau_exa_destroy_pixmap;
++	exa->SharePixmapBacking = nouveau_exa_share_pixmap_backing;
++	exa->SetSharedPixmapBacking = nouveau_exa_set_shared_pixmap_backing;
+ 
+ 	if (pNv->Architecture >= NV_ARCH_50) {
+ 		exa->maxX = 8192;
+diff --git a/src/nv50_exa.c b/src/nv50_exa.c
+index 2a25e74..d6f38eb 100644
+--- a/src/nv50_exa.c
++++ b/src/nv50_exa.c
+@@ -94,10 +94,11 @@ NV50EXAAcquireSurface2D(PixmapPtr ppix, int is_src, uint32_t fmt)
+ {
+ 	NV50EXA_LOCALS(ppix);
+ 	struct nouveau_bo *bo = nouveau_pixmap_bo(ppix);
++	struct nouveau_pixmap *nvpix = nouveau_pixmap(ppix);
+ 	int mthd = is_src ? NV50_2D_SRC_FORMAT : NV50_2D_DST_FORMAT;
+ 	uint32_t bo_flags;
+ 
+-	bo_flags  = NOUVEAU_BO_VRAM;
++	bo_flags = nvpix->shared ? NOUVEAU_BO_GART : NOUVEAU_BO_VRAM;
+ 	bo_flags |= is_src ? NOUVEAU_BO_RD : NOUVEAU_BO_WR;
+ 
+ 	if (!nv50_style_tiled_pixmap(ppix)) {
+diff --git a/src/nv_driver.c b/src/nv_driver.c
+index e8725f5..e17be19 100644
+--- a/src/nv_driver.c
++++ b/src/nv_driver.c
+@@ -73,6 +73,39 @@ static Bool NVPciProbe (	DriverPtr 		drv,
+ 				struct pci_device	*dev,
+ 				intptr_t		match_data	);
+ 
++#ifdef XSERVER_PLATFORM_BUS
++static Bool
++NVPlatformProbe(DriverPtr driver,
++            int entity_num, int flags, struct xf86_platform_device *dev, intptr_t dev_match_data)
++{
++	ScrnInfoPtr scrn = NULL;
++	uint32_t scr_flags = 0;
++
++	if (!dev->pdev)
++		return FALSE;
++
++        if (flags & PLATFORM_PROBE_GPU_SCREEN)
++               scr_flags = XF86_ALLOCATE_GPU_SCREEN;
++
++	scrn = xf86AllocateScreen(driver, scr_flags);
++	xf86AddEntityToScreen(scrn, entity_num);
++
++	scrn->driverVersion    = NV_VERSION;
++	scrn->driverName       = NV_DRIVER_NAME;
++	scrn->name             = NV_NAME;
++
++	scrn->Probe            = NULL;
++	scrn->PreInit          = NVPreInit;
++	scrn->ScreenInit       = NVScreenInit;
++	scrn->SwitchMode       = NVSwitchMode;
++	scrn->AdjustFrame      = NVAdjustFrame;
++	scrn->EnterVT          = NVEnterVT;
++	scrn->LeaveVT          = NVLeaveVT;
++	scrn->FreeScreen       = NVFreeScreen;
++	return scrn != NULL;
++}
++#endif
++
+ /*
+  * This contains the functions needed by the server after loading the
+  * driver module.  It must be supplied, and gets added the driver list by
+@@ -91,7 +124,10 @@ _X_EXPORT DriverRec NV = {
+ 	0,
+ 	NVDriverFunc,
+ 	nouveau_device_match,
+-	NVPciProbe
++	NVPciProbe,
++#ifdef XSERVER_PLATFORM_BUS
++	NVPlatformProbe,
++#endif
+ };
+ 
+ struct NvFamily
+@@ -392,6 +428,37 @@ NVFlushCallback(CallbackListPtr *list, pointer user_data, pointer call_data)
+ 		nouveau_pushbuf_kick(pNv->pushbuf, pNv->pushbuf->channel);
+ }
+ 
++static void
++redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty)
++{
++	RegionRec pixregion;
++
++	PixmapRegionInit(&pixregion, dirty->slave_dst->master_pixmap);
++
++	PixmapSyncDirtyHelper(dirty, &pixregion);
++
++	DamageRegionAppend(&dirty->slave_dst->drawable, &pixregion);
++	RegionUninit(&pixregion);
++}
++
++static void
++nouveau_dirty_update(ScreenPtr screen)
++{
++	RegionPtr region;
++	PixmapDirtyUpdatePtr ent;
++
++	if (xorg_list_is_empty(&screen->pixmap_dirty_list))
++		return;
++
++	xorg_list_for_each_entry(ent, &screen->pixmap_dirty_list, ent) {
++		region = DamageRegion(ent->damage);
++		if (RegionNotEmpty(region)) {
++			redisplay_dirty(screen, ent);
++			DamageEmpty(ent->damage);
++		}
++	}
++}
++
+ static void 
+ NVBlockHandler (BLOCKHANDLER_ARGS_DECL)
+ {
+@@ -399,6 +466,8 @@ NVBlockHandler (BLOCKHANDLER_ARGS_DECL)
+ 	ScrnInfoPtr pScrn   = xf86ScreenToScrn(pScreen);
+ 	NVPtr pNv = NVPTR(pScrn);
+ 
++	nouveau_dirty_update(pScreen);
++
+ 	pScreen->BlockHandler = pNv->BlockHandler;
+ 	(*pScreen->BlockHandler) (BLOCKHANDLER_ARGS);
+ 	pScreen->BlockHandler = NVBlockHandler;
+@@ -570,6 +639,23 @@ NVDRIGetVersion(ScrnInfoPtr pScrn)
+ 	return TRUE;
+ }
+ 
++static void
++nouveau_setup_capabilities(ScrnInfoPtr pScrn)
++{
++	NVPtr pNv = NVPTR(pScrn);
++	uint64_t value;
++	int ret;
++
++	pScrn->capabilities = 0;
++	ret = drmGetCap(pNv->dev->fd, DRM_CAP_PRIME, &value);
++	if (ret == 0) {
++		if (value & DRM_PRIME_CAP_EXPORT)
++			pScrn->capabilities |= RR_Capability_SourceOutput;
++		if (value & DRM_PRIME_CAP_IMPORT)
++			pScrn->capabilities |= RR_Capability_SourceOffload;
++	}
++}
++
+ static Bool
+ NVPreInitDRM(ScrnInfoPtr pScrn)
+ {
+@@ -654,7 +740,7 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
+ 
+ 	/* Get the entity, and make sure it is PCI. */
+ 	pNv->pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
+-	if (pNv->pEnt->location.type != BUS_PCI)
++	if (pNv->pEnt->location.type != BUS_PCI && pNv->pEnt->location.type != BUS_PLATFORM)
+ 		return FALSE;
+ 
+ 	if (xf86IsEntityShared(pScrn->entityList[0])) {
+@@ -674,6 +760,8 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
+ 		NVPreInitFail("\n");
+ 	dev = pNv->dev;
+ 
++	nouveau_setup_capabilities(pScrn);
++
+ 	pScrn->chipset = malloc(sizeof(char) * 25);
+ 	sprintf(pScrn->chipset, "NVIDIA NV%02x", dev->chipset);
+ 	xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Chipset: \"%s\"\n", pScrn->chipset);
+@@ -1238,6 +1326,9 @@ NVScreenInit(SCREEN_INIT_ARGS_DECL)
+ 	pNv->CreateScreenResources = pScreen->CreateScreenResources;
+ 	pScreen->CreateScreenResources = NVCreateScreenResources;
+ 
++	pScreen->StartPixmapTracking = PixmapStartDirtyTracking;
++	pScreen->StopPixmapTracking = PixmapStopDirtyTracking;
++
+ 	if (!xf86CrtcScreenInit(pScreen))
+ 		return FALSE;
+ 
+diff --git a/src/nv_include.h b/src/nv_include.h
+index 1e382b2..3984227 100644
+--- a/src/nv_include.h
++++ b/src/nv_include.h
+@@ -20,6 +20,10 @@
+ /* Drivers that need to access the PCI config space directly need this */
+ #include "xf86Pci.h"
+ 
++#ifdef XSERVER_PLATFORM_BUS
++#include "xf86platformBus.h"
++#endif
++
+ /* All drivers initialising the SW cursor need this */
+ #include "mipointer.h"
+ 
+diff --git a/src/nv_type.h b/src/nv_type.h
+index 930b7ee..b6007e5 100644
+--- a/src/nv_type.h
++++ b/src/nv_type.h
+@@ -165,6 +165,7 @@ struct nouveau_pixmap {
+ 	struct nouveau_bo *bo;
+ 	void *linear;
+ 	unsigned size;
++	Bool shared;
+ };
+ 
+ static inline struct nouveau_pixmap *
+diff --git a/src/nvc0_exa.c b/src/nvc0_exa.c
+index 6a8f1a1..dc8ba0b 100644
+--- a/src/nvc0_exa.c
++++ b/src/nvc0_exa.c
+@@ -95,10 +95,11 @@ NVC0EXAAcquireSurface2D(PixmapPtr ppix, int is_src, uint32_t fmt)
+ {
+ 	NVC0EXA_LOCALS(ppix);
+ 	struct nouveau_bo *bo = nouveau_pixmap_bo(ppix);
++	struct nouveau_pixmap *nvpix = nouveau_pixmap(ppix);
+ 	int mthd = is_src ? NV50_2D_SRC_FORMAT : NV50_2D_DST_FORMAT;
+ 	uint32_t bo_flags;
+ 
+-	bo_flags  = NOUVEAU_BO_VRAM;
++	bo_flags = nvpix->shared ? NOUVEAU_BO_GART : NOUVEAU_BO_VRAM;
+ 	bo_flags |= is_src ? NOUVEAU_BO_RD : NOUVEAU_BO_WR;
+ 
+ 	if (!nv50_style_tiled_pixmap(ppix)) {
diff --git a/sources b/sources
index c33f134..124602d 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
 d120bdd4ee9fc3581f3b93e3b31c4574  xf86-video-nouveau-1.0.1.tar.bz2
+608d314e7bda7a13c140e01d534e11f9  xf86-video-nouveau-20120816.tar.xz
diff --git a/xorg-x11-drv-nouveau.spec b/xorg-x11-drv-nouveau.spec
index 33ef399..d1c4393 100644
--- a/xorg-x11-drv-nouveau.spec
+++ b/xorg-x11-drv-nouveau.spec
@@ -1,28 +1,29 @@
 %define tarball xf86-video-nouveau
 %define moduledir %(pkg-config xorg-server --variable=moduledir )
 %define driverdir %{moduledir}/drivers
-#define gitdate 20120426
+%define gitdate 20120816
 
 Summary:   Xorg X11 nouveau video driver for NVIDIA graphics chipsets
 Name:      xorg-x11-drv-nouveau
 # need to set an epoch to get version number in sync with upstream
 Epoch:     1
 Version:   1.0.1
-Release:   4%{?dist}
+Release:   5%{?dist}
 URL:       http://www.x.org
 License:   MIT
 Group:     User Interface/X Hardware Support
 
 # Fedora specific snapshot no upstream release
 %if 0%{?gitdate}
-Source0: xf86-video-nouveau-%{gitdate}.tar.bz2
+Source0: xf86-video-nouveau-%{gitdate}.tar.xz
 %else
 Source0: http://nouveau.freedesktop.org/release/xf86-video-nouveau-%{version}.tar.bz2
 %endif
 Source1: make-git-snapshot.sh
 
+Patch1:  nouveau-prime.patch
+
 ExcludeArch: s390 s390x %{?rhel:ppc ppc64}
-Patch0:  xorg-x11-drv-nouveau-ppc.patch
 
 BuildRequires: libtool automake autoconf
 BuildRequires: xorg-x11-server-devel > 1.7.99.3-3
@@ -50,9 +51,7 @@ X.Org X11 nouveau video driver.
 
 %prep
 %setup -q -n xf86-video-nouveau-%{dirsuffix}
-%ifarch ppc %{power64}
-%patch0 -p1
-%endif
+%patch1 -p1 -b .prime
 
 %build
 autoreconf -v --install
@@ -76,6 +75,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man4/nouveau.4*
 
 %changelog
+* Thu Aug 16 2012 Dave Airlie <airlied at redhat.com> 1.0.1-5
+- upstream snapshot + prime support
+
 * Sun Jul 22 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1:1.0.1-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list