summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-12-20 11:58:42 +1000
committerBen Skeggs <bskeggs@redhat.com>2010-12-20 11:58:42 +1000
commit64f0e1d0e9e29c5437ad4e52d01ccfb0b03a2ae9 (patch)
tree1fbbd57d6535b9fbbf70618be8e40aba04a5ef5f
parenteba7e173a5006ff50b950d0e8b8154564471a9ce (diff)
parentc2092a458401377f421d9bdfe1d97ce580b99508 (diff)
downloadxorg-driver-xf86-video-nouveau-64f0e1d0e9e29c5437ad4e52d01ccfb0b03a2ae9.tar.gz
Merge branch 'master' into nvc0
Conflicts: src/nv_dma.c
-rw-r--r--src/nouveau_dri2.c1
-rw-r--r--src/nouveau_exa.c1
-rw-r--r--src/nouveau_xv.c2
-rw-r--r--src/nv04_exa.c2
-rw-r--r--src/nv04_xv_blit.c2
-rw-r--r--src/nv10_exa.c1
-rw-r--r--src/nv30_exa.c1
-rw-r--r--src/nv30_shaders.c1
-rw-r--r--src/nv30_xv_tex.c1
-rw-r--r--src/nv40_exa.c1
-rw-r--r--src/nv40_xv_tex.c1
-rw-r--r--src/nv50_accel.c27
-rw-r--r--src/nv50_accel.h2
-rw-r--r--src/nv50_exa.c1
-rw-r--r--src/nv_accel_common.c1
-rw-r--r--src/nv_dma.c30
-rw-r--r--src/nv_driver.c4
-rw-r--r--src/nv_include.h1
-rw-r--r--src/nv_proto.h1
19 files changed, 32 insertions, 49 deletions
diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
index 2dd6da4..45add0f 100644
--- a/src/nouveau_dri2.c
+++ b/src/nouveau_dri2.c
@@ -5,6 +5,7 @@
#include "xorg-server.h"
#include "nv_include.h"
+#include "nouveau_pushbuf.h"
#ifdef DRI2
#include "dri2.h"
#endif
diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c
index 407c025..dc46d60 100644
--- a/src/nouveau_exa.c
+++ b/src/nouveau_exa.c
@@ -21,6 +21,7 @@
*/
#include "nv_include.h"
+#include "nv04_pushbuf.h"
#include "exa.h"
static inline Bool
diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c
index b9f24ee..e9ccd56 100644
--- a/src/nouveau_xv.c
+++ b/src/nouveau_xv.c
@@ -35,6 +35,8 @@
#include "nv_include.h"
#include "nv_dma.h"
+#include "nv04_pushbuf.h"
+
#include "vl_hwmc.h"
#define IMAGE_MAX_W 2046
diff --git a/src/nv04_exa.c b/src/nv04_exa.c
index 2760d4b..f2819d2 100644
--- a/src/nv04_exa.c
+++ b/src/nv04_exa.c
@@ -23,6 +23,8 @@
#include "nv_include.h"
#include "nv_rop.h"
+#include "nv04_pushbuf.h"
+
static void
NV04EXASetPattern(ScrnInfoPtr pScrn, CARD32 clr0, CARD32 clr1,
CARD32 pat0, CARD32 pat1)
diff --git a/src/nv04_xv_blit.c b/src/nv04_xv_blit.c
index be39c0d..1b8de4f 100644
--- a/src/nv04_xv_blit.c
+++ b/src/nv04_xv_blit.c
@@ -34,6 +34,8 @@
#include "nv_include.h"
#include "nv_dma.h"
+#include "nv04_pushbuf.h"
+
#define FOURCC_RGB 0x0000003
#define VSYNC_POSSIBLE (pNv->dev->chipset >= 0x11)
diff --git a/src/nv10_exa.c b/src/nv10_exa.c
index 1acb583..1cf7a5b 100644
--- a/src/nv10_exa.c
+++ b/src/nv10_exa.c
@@ -28,6 +28,7 @@
#endif
#include "nv_include.h"
+#include "nv04_pushbuf.h"
/* Texture/Render target formats. */
static struct pict_format {
diff --git a/src/nv30_exa.c b/src/nv30_exa.c
index b34b29c..a4dd37d 100644
--- a/src/nv30_exa.c
+++ b/src/nv30_exa.c
@@ -25,6 +25,7 @@
#include "nv_include.h"
#include "nv30_shaders.h"
+#include "nv04_pushbuf.h"
typedef struct nv_pict_surface_format {
int pict_fmt;
diff --git a/src/nv30_shaders.c b/src/nv30_shaders.c
index 7316082..fb93ef8 100644
--- a/src/nv30_shaders.c
+++ b/src/nv30_shaders.c
@@ -22,6 +22,7 @@
#include "nv30_shaders.h"
+#include "nv04_pushbuf.h"
void NV30_UploadFragProg(NVPtr pNv, nv_shader_t *shader, int *hw_offset)
{
diff --git a/src/nv30_xv_tex.c b/src/nv30_xv_tex.c
index ffa68e4..6d4e089 100644
--- a/src/nv30_xv_tex.c
+++ b/src/nv30_xv_tex.c
@@ -37,6 +37,7 @@
#include "nv_dma.h"
#include "nv30_shaders.h"
+#include "nv04_pushbuf.h"
extern Atom xvSyncToVBlank, xvSetDefaults;
diff --git a/src/nv40_exa.c b/src/nv40_exa.c
index ffee0e6..b14a829 100644
--- a/src/nv40_exa.c
+++ b/src/nv40_exa.c
@@ -22,6 +22,7 @@
#include "nv_include.h"
#include "nv30_shaders.h"
+#include "nv04_pushbuf.h"
typedef struct nv_pict_surface_format {
int pict_fmt;
diff --git a/src/nv40_xv_tex.c b/src/nv40_xv_tex.c
index e0444e8..0910e12 100644
--- a/src/nv40_xv_tex.c
+++ b/src/nv40_xv_tex.c
@@ -37,6 +37,7 @@
#include "nv_dma.h"
#include "nv30_shaders.h"
+#include "nv04_pushbuf.h"
extern Atom xvSyncToVBlank, xvSetDefaults;
diff --git a/src/nv50_accel.c b/src/nv50_accel.c
index 0369839..d6c7528 100644
--- a/src/nv50_accel.c
+++ b/src/nv50_accel.c
@@ -352,7 +352,7 @@ NVAccelInitNV50TCL(ScrnInfoPtr pScrn)
OUT_RING (chan, (0 << NV50TCL_CB_DEF_SET_BUFFER_SHIFT) | 0x4000);
BEGIN_RING(chan, tesla, NV50TCL_CB_ADDR, 1);
OUT_RING (chan, 0);
- BEGIN_RING_NI(chan, tesla, NV50TCL_CB_DATA(0), 28);
+ BEGIN_RING_NI(chan, tesla, NV50TCL_CB_DATA(0), 24);
OUT_RING (chan, 0x80000008);
OUT_RING (chan, 0x90000408);
OUT_RING (chan, 0x82010400);
@@ -367,20 +367,17 @@ NVAccelInitNV50TCL(ScrnInfoPtr pScrn)
OUT_RING (chan, 0x82040404);
OUT_RING (chan, 0xf0400201);
OUT_RING (chan, 0x0000c784);
- OUT_RING (chan, 0xc0840008);
- OUT_RING (chan, 0xb002060c);
- OUT_RING (chan, 0xc0850008);
- OUT_RING (chan, 0xb0020810);
- OUT_RING (chan, 0xc0860008);
- OUT_RING (chan, 0xb0020a14);
- OUT_RING (chan, 0xc0870208);
- OUT_RING (chan, 0xb0020600);
- OUT_RING (chan, 0xc0890208);
- OUT_RING (chan, 0xb0020a08);
- OUT_RING (chan, 0xc0880205);
- OUT_RING (chan, 0x00000780);
- OUT_RING (chan, 0xb0000805);
- OUT_RING (chan, 0x00004781);
+ OUT_RING (chan, 0xe084000c);
+ OUT_RING (chan, 0xe0850010);
+ OUT_RING (chan, 0xe0860015);
+ OUT_RING (chan, 0x00014780);
+ OUT_RING (chan, 0xe0870201);
+ OUT_RING (chan, 0x0000c780);
+ OUT_RING (chan, 0xe0890209);
+ OUT_RING (chan, 0x00014780);
+ OUT_RING (chan, 0xe0880205);
+ OUT_RING (chan, 0x00010781);
+
/* HPOS.xy = ($o0, $o1), HPOS.zw = (0.0, 1.0), then map $o2 - $o5 */
BEGIN_RING(chan, tesla, NV50TCL_VP_RESULT_MAP(0), 2);
OUT_RING (chan, 0x41400100);
diff --git a/src/nv50_accel.h b/src/nv50_accel.h
index 9cdbbab..fac5cbb 100644
--- a/src/nv50_accel.h
+++ b/src/nv50_accel.h
@@ -1,6 +1,8 @@
#ifndef __NV50_ACCEL_H__
#define __NV50_ACCEL_H__
+#include "nv04_pushbuf.h"
+
/* "Tesla scratch buffer" offsets */
#define PVP_OFFSET 0x00000000 /* Vertex program */
#define PFP_OFFSET 0x00001000 /* Fragment program */
diff --git a/src/nv50_exa.c b/src/nv50_exa.c
index e86f903..e8ff5aa 100644
--- a/src/nv50_exa.c
+++ b/src/nv50_exa.c
@@ -24,6 +24,7 @@
#include "nv_include.h"
#include "nv_rop.h"
+#include "nv04_pushbuf.h"
#include "nv50_accel.h"
#include "nv50_texture.h"
diff --git a/src/nv_accel_common.c b/src/nv_accel_common.c
index 57ecd81..e193f1f 100644
--- a/src/nv_accel_common.c
+++ b/src/nv_accel_common.c
@@ -21,6 +21,7 @@
*/
#include "nv_include.h"
+#include "nv04_pushbuf.h"
Bool
nouveau_allocate_surface(ScrnInfoPtr scrn, int width, int height, int bpp,
diff --git a/src/nv_dma.c b/src/nv_dma.c
index 612215c..49ed40a 100644
--- a/src/nv_dma.c
+++ b/src/nv_dma.c
@@ -45,36 +45,6 @@ NVChannelHangNotify(struct nouveau_channel *chan)
NVLockedUp(pScrn);
}
-void NVSync(ScrnInfoPtr pScrn)
-{
- NVPtr pNv = NVPTR(pScrn);
- struct nouveau_channel *chan = pNv->chan;
- struct nouveau_grobj *gr = pNv->Nv2D ? pNv->Nv2D : pNv->NvImageBlit;
-
- if (pNv->NoAccel)
- return;
-
- return; /* XXX */
-
- /* Wait for nvchannel to go completely idle */
- nouveau_notifier_reset(pNv->notify0, 0);
- if (pNv->Architecture >= NV_ARCH_C0) {
- BEGIN_RING_NVC0(chan, NvSub2D, 0x0104, 1);
- OUT_RING (chan, 0);
- BEGIN_RING_NVC0(chan, NvSub2D, 0x0100, 1);
- OUT_RING (chan, 0);
- } else {
- BEGIN_RING(chan, gr, 0x104, 1);
- OUT_RING (chan, 0);
- BEGIN_RING(chan, gr, 0x100, 1);
- OUT_RING (chan, 0);
- }
- FIRE_RING (chan);
- if (nouveau_notifier_wait_status(pNv->notify0, 0,
- NV_NOTIFY_STATE_STATUS_COMPLETED, 2.0))
- NVLockedUp(pScrn);
-}
-
Bool
NVInitDma(ScrnInfoPtr pScrn)
{
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 91b2be8..5286ff4 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -24,6 +24,8 @@
#include "nv_include.h"
+#include "nouveau_pushbuf.h"
+
#include "xorg-server.h"
#include "xf86int10.h"
#include "xf86drm.h"
@@ -358,8 +360,6 @@ NVLeaveVT(int scrnIndex, int flags)
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "NVLeaveVT is called.\n");
- NVSync(pScrn);
-
ret = drmDropMaster(nouveau_device(pNv->dev)->fd);
if (ret)
ErrorF("Error dropping master: %d\n", ret);
diff --git a/src/nv_include.h b/src/nv_include.h
index 48f0b21..9cb697a 100644
--- a/src/nv_include.h
+++ b/src/nv_include.h
@@ -75,7 +75,6 @@
#include "nouveau_drmif.h"
#include "nouveau_device.h"
#include "nouveau_channel.h"
-#include "nouveau_pushbuf.h"
#include "nouveau_bo.h"
#include "nouveau_grobj.h"
#include "nouveau_notifier.h"
diff --git a/src/nv_proto.h b/src/nv_proto.h
index 5eebf29..c596b1d 100644
--- a/src/nv_proto.h
+++ b/src/nv_proto.h
@@ -36,7 +36,6 @@ void NVSetPortDefaults (ScrnInfoPtr pScrn, NVPortPrivPtr pPriv);
unsigned int nv_window_belongs_to_crtc(ScrnInfoPtr, int, int, int, int);
/* in nv_dma.c */
-void NVSync(ScrnInfoPtr pScrn);
Bool NVInitDma(ScrnInfoPtr pScrn);
void NVTakedownDma(ScrnInfoPtr pScrn);