summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-01-17 08:47:40 +1000
committerBen Skeggs <bskeggs@redhat.com>2011-01-17 08:47:40 +1000
commit73bf71d5de0cb990178a1d2a31e0ea1717c214a4 (patch)
treeaf0cbdbdb5025921633099735acbc729037b0690
parentfb499a4e9d95650dc89f4c1820b94d01344733f6 (diff)
parentb795ca6e97fae9735843748585401098dae1c3e1 (diff)
downloadxorg-driver-xf86-video-nouveau-73bf71d5de0cb990178a1d2a31e0ea1717c214a4.tar.gz
Merge branch 'master' into nvc0
-rw-r--r--src/nv04_exa.c2
-rw-r--r--src/nv_accel_common.c27
-rw-r--r--src/nv_include.h1
3 files changed, 21 insertions, 9 deletions
diff --git a/src/nv04_exa.c b/src/nv04_exa.c
index f2819d2..267c7b5 100644
--- a/src/nv04_exa.c
+++ b/src/nv04_exa.c
@@ -150,7 +150,6 @@ NV04EXASolid (PixmapPtr pPixmap, int x1, int y1, int x2, int y2)
int width = x2-x1;
int height = y2-y1;
- WAIT_RING (chan, 3);
BEGIN_RING(chan, rect,
NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT(0), 2);
OUT_RING (chan, (x1 << 16) | y1);
@@ -280,7 +279,6 @@ NV04EXACopy(PixmapPtr pDstPixmap, int srcX, int srcY, int dstX, int dstY,
dstY = 0;
}
- WAIT_RING (chan, 4);
BEGIN_RING(chan, blit, NV01_IMAGE_BLIT_POINT_IN, 3);
OUT_RING (chan, (srcY << 16) | srcX);
OUT_RING (chan, (dstY << 16) | dstX);
diff --git a/src/nv_accel_common.c b/src/nv_accel_common.c
index e193f1f..42ddef1 100644
--- a/src/nv_accel_common.c
+++ b/src/nv_accel_common.c
@@ -32,13 +32,26 @@ nouveau_allocate_surface(ScrnInfoPtr scrn, int width, int height, int bpp,
Bool tiled = (usage_hint & NOUVEAU_CREATE_PIXMAP_TILED);
int tile_mode = 0, tile_flags = 0;
int flags = NOUVEAU_BO_MAP | (bpp >= 8 ? NOUVEAU_BO_VRAM : 0);
- int ret;
-
- if ((scanout && pNv->tiled_scanout) ||
- (!scanout && pNv->Architecture >= NV_ARCH_50 && bpp >= 8))
- tiled = TRUE;
-
- *pitch = NOUVEAU_ALIGN(width * bpp, 512) / 8;
+ int cpp = bpp / 8, ret;
+
+ if (pNv->Architecture >= NV_ARCH_50) {
+ if (scanout) {
+ if (pNv->tiled_scanout) {
+ tiled = TRUE;
+ *pitch = NOUVEAU_ALIGN(width * cpp, 64);
+ } else {
+ *pitch = NOUVEAU_ALIGN(width * cpp, 256);
+ }
+ } else {
+ if (bpp >= 8)
+ tiled = TRUE;
+ *pitch = NOUVEAU_ALIGN(width * cpp, 64);
+ }
+ } else {
+ if (scanout && pNv->tiled_scanout)
+ tiled = TRUE;
+ *pitch = NOUVEAU_ALIGN(width * cpp, 64);
+ }
if (tiled) {
if (pNv->Architecture >= NV_ARCH_C0) {
diff --git a/src/nv_include.h b/src/nv_include.h
index 9cb697a..de76d92 100644
--- a/src/nv_include.h
+++ b/src/nv_include.h
@@ -79,5 +79,6 @@
#include "nouveau_grobj.h"
#include "nouveau_notifier.h"
#include "nouveau_local.h"
+#include "nouveau_pushbuf.h"
#endif /* __NV_INCLUDE_H__ */