xserver-xorg-video-nouveau: Changes to 'debian-unstable'
ChangeLog | 30 +++++++++++++++++
configure.ac | 2 -
debian/changelog | 9 +++++
src/Makefile.am | 48 ++++++++++++++++++++--------
src/nouveau_exa.c | 91 +++++++++++++++++++++++++++++++++---------------------
src/nouveau_xv.c | 5 --
src/nv50_accel.h | 8 ++--
src/nv_driver.c | 25 +-------------
src/nv_type.h | 7 +---
9 files changed, 141 insertions(+), 84 deletions(-)
New commits:
commit ec72a0fb8df31ac71b56d4b5bf554dc60c1eb858
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date: Mon Jun 18 09:23:20 2012 +0200
New upstream snapshot.
* New upstream snapshot.
- Bump to 1.0.0 release.
- Pick up a firefox tab draw fix on nv50.
diff --git a/ChangeLog b/ChangeLog
index d40e05b..5cd2248 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,33 @@
+commit 6dbf4ea12600275775123f9f564469454415da55
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date: Mon Jun 18 13:28:07 2012 +1000
+
+ bump version to 1.0.0
+
+ Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+
+commit 5e74cee90eeb4e8e638b371a5f1a2c6737be70ff
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date: Mon Jun 18 15:36:47 2012 +1000
+
+ distcheck fixes
+
+commit 383aef5a8882a65efdf34e8d2681cd5ccec51b22
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date: Mon Jun 18 13:31:37 2012 +1000
+
+ exa: drop massive gart allocation in favour of smaller ones, as needed
+
+ Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+
+commit 52836c15b1c0e4f28d92ca9e6c76872481917fd4
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date: Mon Jun 18 13:20:18 2012 +1000
+
+ nv50/exa: somehow fix firefox tabs not being drawn properly since vp xfrm
+
+ Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+
commit 36d3f8c28c55c05ccf4efa985831d2d249bad2fe
Author: Ben Skeggs <bskeggs@redhat.com>
Date: Wed Jun 13 22:41:58 2012 +1000
diff --git a/debian/changelog b/debian/changelog
index fc8a582..c69ac0b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+xserver-xorg-video-nouveau (1:1.0.0-1) UNRELEASED; urgency=low
+
+ [ Maarten Lankhorst ]
+ * New upstream snapshot.
+ - Bump to 1.0.0 release.
+ - Pick up a firefox tab draw fix for nv50 cards.
+
+ -- Maarten Lankhorst <maarten.lankhorst@canonical.com> Mon, 18 Jun 2012 09:20:34 +0200
+
xserver-xorg-video-nouveau (1:0.0.16+git20120614+36d3f8c-1) unstable; urgency=low
[ Maarten Lankhorst ]
commit 6dbf4ea12600275775123f9f564469454415da55
Author: Ben Skeggs <bskeggs@redhat.com>
Date: Mon Jun 18 13:28:07 2012 +1000
bump version to 1.0.0
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
diff --git a/configure.ac b/configure.ac
index afb6cde..cc8732b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
AC_PREREQ([2.60])
AC_INIT([xf86-video-nouveau],
- [0.0.16],
+ [1.0.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xf86-video-nouveau])
commit 5e74cee90eeb4e8e638b371a5f1a2c6737be70ff
Author: Ben Skeggs <bskeggs@redhat.com>
Date: Mon Jun 18 15:36:47 2012 +1000
distcheck fixes
diff --git a/src/Makefile.am b/src/Makefile.am
index 6aeb486..bf9c967 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -30,19 +30,12 @@ nouveau_drv_la_LDFLAGS = -module -avoid-version @LIBDRM_NOUVEAU_LIBS@ \
nouveau_drv_ladir = @moduledir@/drivers
nouveau_drv_la_SOURCES = \
- nouveau_class.h nouveau_local.h \
nouveau_exa.c nouveau_xv.c nouveau_dri2.c \
nouveau_wfb.c \
- nv_accel_common.c nv04_accel.h \
- nv_const.h \
+ nv_accel_common.c \
nv_dma.c \
- nv_dma.h \
nv_driver.c \
- nv_include.h \
- nv_proto.h \
- nv_rop.h \
nv_shadow.c \
- nv_type.h \
nv04_exa.c \
nv04_xv_ovl.c \
nv04_xv_blit.c \
@@ -52,15 +45,42 @@ nouveau_drv_la_SOURCES = \
nv30_xv_tex.c \
nv40_exa.c \
nv40_xv_tex.c \
- nv50_accel.c nv50_accel.h \
+ nv50_accel.c \
nv50_exa.c \
nv50_xv.c \
- nv50_texture.h \
- nvc0_accel.c nvc0_accel.h \
+ nvc0_accel.c \
nvc0_exa.c \
nvc0_xv.c \
drmmode_display.c \
- compat-api.h \
- vl_hwmc.c \
- vl_hwmc.h
+ vl_hwmc.c
+
+EXTRA_DIST = hwdefs/nv_3ddefs.xml.h \
+ hwdefs/nv_m2mf.xml.h \
+ hwdefs/nv_object.xml.h \
+ hwdefs/nv01_2d.xml.h \
+ hwdefs/nv10_3d.xml.h \
+ hwdefs/nv30-40_3d.xml.h \
+ hwdefs/nv50_2d.xml.h \
+ hwdefs/nv50_3d.xml.h \
+ hwdefs/nv50_defs.xml.h \
+ hwdefs/nv50_texture.h \
+ hwdefs/nvc0_3d.xml.h \
+ hwdefs/nvc0_m2mf.xml.h \
+ nouveau_local.h \
+ nv_const.h \
+ nv_dma.h \
+ nv_include.h \
+ nv_proto.h \
+ nv_rop.h \
+ nv_type.h \
+ nv04_accel.h \
+ nv50_accel.h \
+ nvc0_accel.h \
+ nvc0_shader.h \
+ nve0_shader.h \
+ compat-api.h \
+ vl_hwmc.c \
+ vl_hwmc.h
+
+
commit 383aef5a8882a65efdf34e8d2681cd5ccec51b22
Author: Ben Skeggs <bskeggs@redhat.com>
Date: Mon Jun 18 13:31:37 2012 +1000
exa: drop massive gart allocation in favour of smaller ones, as needed
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c
index fb27b1e..55dce99 100644
--- a/src/nouveau_exa.c
+++ b/src/nouveau_exa.c
@@ -164,6 +164,34 @@ nv50_style_tiled_pixmap(PixmapPtr ppix)
nouveau_pixmap_bo(ppix)->config.nv50.memtype;
}
+static int
+nouveau_exa_scratch(NVPtr pNv, int size, struct nouveau_bo **pbo, int *off)
+{
+ struct nouveau_bo *bo;
+ int ret;
+
+ if (!pNv->transfer ||
+ pNv->transfer->size <= pNv->transfer_offset + size) {
+ ret = nouveau_bo_new(pNv->dev, NOUVEAU_BO_GART | NOUVEAU_BO_MAP,
+ 0, NOUVEAU_ALIGN(size, 1 * 1024 * 1024),
+ NULL, &bo);
+ if (ret == 0)
+ ret = nouveau_bo_map(bo, NOUVEAU_BO_RDWR, pNv->client);
+ if (ret != 0)
+ return ret;
+
+ nouveau_bo_ref(bo, &pNv->transfer);
+ pNv->transfer_offset = 0;
+ }
+
+ *off = pNv->transfer_offset;
+ *pbo = pNv->transfer;
+
+ pNv->transfer_offset += size + 0xff;
+ pNv->transfer_offset &= ~0xff;
+ return 0;
+}
+
static Bool
nouveau_exa_download_from_screen(PixmapPtr pspix, int x, int y, int w, int h,
char *dst, int dst_pitch)
@@ -171,38 +199,36 @@ nouveau_exa_download_from_screen(PixmapPtr pspix, int x, int y, int w, int h,
ScrnInfoPtr pScrn = xf86ScreenToScrn(pspix->drawable.pScreen);
NVPtr pNv = NVPTR(pScrn);
struct nouveau_bo *bo;
- int src_pitch, tmp_pitch, cpp, offset;
- int max_lines, lines, i;
+ int src_pitch, tmp_pitch, cpp, i;
const char *src;
Bool ret;
- src_pitch = exaGetPixmapPitch(pspix);
cpp = pspix->drawable.bitsPerPixel >> 3;
- offset = (y * src_pitch) + (x * cpp);
-
- if (!pNv->GART)
- goto memcpy;
-
+ src_pitch = exaGetPixmapPitch(pspix);
tmp_pitch = w * cpp;
- max_lines = pNv->GART->size / tmp_pitch;
+
while (h) {
- lines = max_lines;
- if (lines > h)
- lines = h;
+ const int lines = (h > 2047) ? 2047 : h;
+ struct nouveau_bo *tmp;
+ int tmp_offset;
- if (!NVAccelM2MF(pNv, w, lines, cpp, 0, 0,
+ if (nouveau_exa_scratch(pNv, lines * tmp_pitch,
+ &tmp, &tmp_offset))
+ goto memcpy;
+
+ if (!NVAccelM2MF(pNv, w, lines, cpp, 0, tmp_offset,
nouveau_pixmap_bo(pspix), NOUVEAU_BO_VRAM,
src_pitch, pspix->drawable.height, x, y,
- pNv->GART, NOUVEAU_BO_GART, tmp_pitch,
+ tmp, NOUVEAU_BO_GART, tmp_pitch,
lines, 0, 0))
goto memcpy;
- nouveau_bo_map(pNv->GART, NOUVEAU_BO_RD, pNv->client);
+ nouveau_bo_wait(tmp, NOUVEAU_BO_RD, pNv->client);
if (src_pitch == tmp_pitch) {
- memcpy(dst, pNv->GART->map, dst_pitch * lines);
+ memcpy(dst, tmp->map + tmp_offset, dst_pitch * lines);
dst += dst_pitch * lines;
} else {
- src = pNv->GART->map;
+ src = tmp->map + tmp_offset;
for (i = 0; i < lines; i++) {
memcpy(dst, src, tmp_pitch);
src += tmp_pitch;
@@ -219,7 +245,7 @@ memcpy:
bo = nouveau_pixmap_bo(pspix);
if (nouveau_bo_map(bo, NOUVEAU_BO_RD, pNv->client))
return FALSE;
- src = (char *)bo->map + offset;
+ src = (char *)bo->map + (y * src_pitch) + (x * cpp);
ret = NVAccelMemcpyRect(dst, src, h, dst_pitch, src_pitch, w*cpp);
return ret;
}
@@ -230,14 +256,14 @@ nouveau_exa_upload_to_screen(PixmapPtr pdpix, int x, int y, int w, int h,
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(pdpix->drawable.pScreen);
NVPtr pNv = NVPTR(pScrn);
- int dst_pitch, tmp_pitch, cpp;
- int max_lines, lines, i;
+ int dst_pitch, tmp_pitch, cpp, i;
struct nouveau_bo *bo;
char *dst;
Bool ret;
- dst_pitch = exaGetPixmapPitch(pdpix);
cpp = pdpix->drawable.bitsPerPixel >> 3;
+ dst_pitch = exaGetPixmapPitch(pdpix);
+ tmp_pitch = w * cpp;
/* try hostdata transfer */
if (w * h * cpp < 16*1024) /* heuristic */
@@ -264,23 +290,20 @@ nouveau_exa_upload_to_screen(PixmapPtr pdpix, int x, int y, int w, int h,
}
}
- /* try gart-based transfer */
- if (!pNv->GART)
- goto memcpy;
-
- tmp_pitch = w * cpp;
- max_lines = pNv->GART->size / tmp_pitch;
while (h) {
- lines = max_lines;
- if (lines > h)
- lines = h;
+ const int lines = (h > 2047) ? 2047 : h;
+ struct nouveau_bo *tmp;
+ int tmp_offset;
+
+ if (nouveau_exa_scratch(pNv, lines * tmp_pitch,
+ &tmp, &tmp_offset))
+ goto memcpy;
- nouveau_bo_map(pNv->GART, NOUVEAU_BO_WR, pNv->client);
if (src_pitch == tmp_pitch) {
- memcpy(pNv->GART->map, src, src_pitch * lines);
+ memcpy(tmp->map + tmp_offset, src, src_pitch * lines);
src += src_pitch * lines;
} else {
- dst = pNv->GART->map;
+ dst = tmp->map + tmp_offset;
for (i = 0; i < lines; i++) {
memcpy(dst, src, tmp_pitch);
src += src_pitch;
@@ -288,7 +311,7 @@ nouveau_exa_upload_to_screen(PixmapPtr pdpix, int x, int y, int w, int h,
}
}
- if (!NVAccelM2MF(pNv, w, lines, cpp, 0, 0, pNv->GART,
+ if (!NVAccelM2MF(pNv, w, lines, cpp, tmp_offset, 0, tmp,
NOUVEAU_BO_GART, tmp_pitch, lines, 0, 0,
nouveau_pixmap_bo(pdpix), NOUVEAU_BO_VRAM,
dst_pitch, pdpix->drawable.height, x, y))
diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c
index 11248e6..f7dc2bc 100644
--- a/src/nouveau_xv.c
+++ b/src/nouveau_xv.c
@@ -1054,12 +1054,7 @@ NVPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x,
if (pPriv->currentHostBuffer != NO_PRIV_HOST_BUFFER_AVAILABLE) {
destination_buffer =
pPriv->TT_mem_chunk[pPriv->currentHostBuffer];
- } else {
- /* Otherwise we fall back on DDX's GARTScratch */
- destination_buffer = pNv->GART;
}
-
- /* If we have no GART at all... */
if (!destination_buffer) {
if (pNv->Architecture >= NV_ARCH_50) {
NOUVEAU_ERR("No scratch buffer for tiled upload\n");
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 9a7b9c2..beef789 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -935,8 +935,7 @@ static Bool
NVMapMem(ScrnInfoPtr pScrn)
{
NVPtr pNv = NVPTR(pScrn);
- struct nouveau_device *dev = pNv->dev;
- int ret, pitch, size;
+ int ret, pitch;
ret = nouveau_allocate_surface(pScrn, pScrn->virtualX, pScrn->virtualY,
pScrn->bitsPerPixel,
@@ -953,25 +952,6 @@ NVMapMem(ScrnInfoPtr pScrn)
if (pNv->NoAccel)
return TRUE;
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "GART: %dMiB available\n",
- (unsigned int)(dev->gart_size >> 20));
- if (dev->gart_size > (16 * 1024 * 1024))
- size = 16 * 1024 * 1024;
- else
- /* always leave 512kb for other things like the fifos */
- size = dev->gart_size - 512*1024;
-
- if (nouveau_bo_new(dev, NOUVEAU_BO_GART | NOUVEAU_BO_MAP,
- 0, size, NULL, &pNv->GART)) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "Unable to allocate GART memory\n");
- }
- if (pNv->GART) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "GART: Allocated %dMiB as a scratch buffer\n",
- (unsigned int)(pNv->GART->size >> 20));
- }
-
return TRUE;
}
@@ -986,9 +966,8 @@ NVUnmapMem(ScrnInfoPtr pScrn)
drmmode_remove_fb(pScrn);
+ nouveau_bo_ref(NULL, &pNv->transfer);
nouveau_bo_ref(NULL, &pNv->scanout);
- nouveau_bo_ref(NULL, &pNv->offscreen);
- nouveau_bo_ref(NULL, &pNv->GART);
return TRUE;
}
diff --git a/src/nv_type.h b/src/nv_type.h
index 02fa383..e1ea494 100644
--- a/src/nv_type.h
+++ b/src/nv_type.h
@@ -35,11 +35,7 @@ typedef struct _NVRec {
Bool Primary;
Bool Secondary;
- /* Various pinned memory regions */
struct nouveau_bo * scanout;
- struct nouveau_bo * offscreen;
- void * offscreen_map;
- struct nouveau_bo * GART;
Bool NoAccel;
Bool HWCursor;
@@ -83,6 +79,9 @@ typedef struct _NVRec {
/* GPU context */
struct nouveau_client *client;
+ struct nouveau_bo *transfer;
+ CARD32 transfer_offset;
+
struct nouveau_object *channel;
struct nouveau_pushbuf *pushbuf;
struct nouveau_bufctx *bufctx;
commit 52836c15b1c0e4f28d92ca9e6c76872481917fd4
Author: Ben Skeggs <bskeggs@redhat.com>
Date: Mon Jun 18 13:20:18 2012 +1000
nv50/exa: somehow fix firefox tabs not being drawn properly since vp xfrm
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
diff --git a/src/nv50_accel.h b/src/nv50_accel.h
index 6a09fbe..24f0fa8 100644
--- a/src/nv50_accel.h
+++ b/src/nv50_accel.h
@@ -60,9 +60,11 @@ static __inline__ void
PUSH_VTX2s(struct nouveau_pushbuf *push,
int x1, int y1, int x2, int y2, int dx, int dy)
{
- BEGIN_NV04(push, NV50_3D(VTX_ATTR_2I(8)), 2);
- PUSH_DATA (push, (y1 << 16) | x1);
- PUSH_DATA (push, (y2 << 16) | x2);
+ BEGIN_NV04(push, NV50_3D(VTX_ATTR_2F_X(8)), 4);
+ PUSH_DATAf(push, x1);
+ PUSH_DATAf(push, y1);
+ PUSH_DATAf(push, x2);
+ PUSH_DATAf(push, y2);
BEGIN_NV04(push, NV50_3D(VTX_ATTR_2I(0)), 1);
PUSH_DATA (push, (dy << 16) | dx);
}
Reply to: