diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2009-01-09 14:52:21 +1100 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2009-01-09 14:52:21 +1100 |
commit | 28568062e3cc08e0dea44d63a2248c40b371e704 (patch) | |
tree | f32c680bb2fcbaf6f54c0566dcf6d4cd57d53b28 | |
parent | bc48a691261d64f71ec49dad4cc89050159eb290 (diff) | |
download | xorg-driver-xf86-video-nouveau-28568062e3cc08e0dea44d63a2248c40b371e704.tar.gz |
nv50/exa: reemit surface state in hostdata UTS if a flush occurs
This is just so the bufmgr knows we used the surface again, unlike
earlier chips nv5x doesn't require us to resubmit the source point
etc. again :)
How this looks is closer to how all the flush hooks should look. We
have per-app contexts, it's a shame to do full re-emits. Though,
the impact seems rather minimal so far.
-rw-r--r-- | src/nv50_exa.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nv50_exa.c b/src/nv50_exa.c index 3afdcb5..1755fdf 100644 --- a/src/nv50_exa.c +++ b/src/nv50_exa.c @@ -341,6 +341,15 @@ NV50EXADoneCopy(PixmapPtr pdpix) chan->flush_notify = NULL; } +static void +NV50EXAStateSIFCReEmit(struct nouveau_channel *chan) +{ + NVPtr pNv = chan->user_private; + + /* Just to tell bufmgr we're using the buffer again */ + NV50EXAAcquireSurface2D(pNv->dst_pixmap, 0); +} + Bool NV50EXAUploadSIFC(const char *src, int src_pitch, PixmapPtr pdpix, int x, int y, int w, int h, int cpp) @@ -349,6 +358,8 @@ NV50EXAUploadSIFC(const char *src, int src_pitch, int line_dwords = (w * cpp + 3) / 4; uint32_t sifc_fmt; + RING_SPACE(chan, 64); + if (!NV50EXA2DSurfaceFormat(pdpix, &sifc_fmt)) NOUVEAU_FALLBACK("hostdata format\n"); if (!NV50EXAAcquireSurface2D(pdpix, 0)) @@ -374,6 +385,9 @@ NV50EXAUploadSIFC(const char *src, int src_pitch, OUT_RING (chan, 0); OUT_RING (chan, y); + chan->flush_notify = NV50EXAStateSIFCReEmit; + pNv->dst_pixmap = pdpix; + while (h--) { int count = line_dwords; const char *p = src; @@ -392,6 +406,7 @@ NV50EXAUploadSIFC(const char *src, int src_pitch, src += src_pitch; } + chan->flush_notify = NULL; return TRUE; } |