Skip to contentSkip to conversation

exa: Flush (S)IFC to the frontbuffer immediately.

PATCH In review Maarten Maathuis 1 participant 2 messages Feb 7, 2011 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 exa: Flush (S)IFC to the frontbuffer immediately.

- NV50+: This avoids high latency while typing with core fonts for example.

---
 src/nv04_exa.c |    4 ++++
 src/nv50_exa.c |    4 ++++
 src/nvc0_exa.c |    4 ++++
 3 files changed, 12 insertions(+), 0 deletions(-)
src/nv04_exa.c +4 -0
index 267c7b5..2603bd4 100644
@@ -340,6 +340,7 @@ NV04EXAUploadIFC(ScrnInfoPtr pScrn, const char *src, int src_pitch,
 		 PixmapPtr pDst, int x, int y, int w, int h, int cpp)
 {
 	NVPtr pNv = NVPTR(pScrn);
+	ScreenPtr pScreen = pDst->drawable.pScreen;
 	struct nouveau_channel *chan = pNv->chan;
 	struct nouveau_grobj *clip = pNv->NvClipRectangle;
 	struct nouveau_grobj *ifc = pNv->NvImageFromCpu;
@@ -413,6 +414,9 @@ NV04EXAUploadIFC(ScrnInfoPtr pScrn, const char *src, int src_pitch,
 	}
 
 	chan->flush_notify = NULL;
+
+	if (pDst == pScreen->GetScreenPixmap(pScreen))
+		FIRE_RING(chan);
 	return TRUE;
 }
 
src/nv50_exa.c +4 -0
index e8ff5aa..85baa68 100644
@@ -372,6 +372,7 @@ NV50EXAUploadSIFC(const char *src, int src_pitch,
 		  PixmapPtr pdpix, int x, int y, int w, int h, int cpp)
 {
 	NV50EXA_LOCALS(pdpix);
+	ScreenPtr pScreen = pdpix->drawable.pScreen;
 	int line_dwords = (w * cpp + 3) / 4;
 	uint32_t sifc_fmt;
 
@@ -428,6 +429,9 @@ NV50EXAUploadSIFC(const char *src, int src_pitch,
 	}
 
 	chan->flush_notify = NULL;
+
+	if (pdpix == pScreen->GetScreenPixmap(pScreen))
+		FIRE_RING(chan);
 	return TRUE;
 }
 
src/nvc0_exa.c +4 -0
index 45647ce..85cb5d2 100644
@@ -550,6 +550,7 @@ NVC0EXAUploadSIFC(const char *src, int src_pitch,
 		  PixmapPtr pdpix, int x, int y, int w, int h, int cpp)
 {
 	NVC0EXA_LOCALS(pdpix);
+	ScreenPtr pScreen = pdpix->drawable.pScreen;
 	int line_dwords = (w * cpp + 3) / 4;
 	uint32_t sifc_fmt;
 
@@ -608,6 +609,9 @@ NVC0EXAUploadSIFC(const char *src, int src_pitch,
 	}
 
 	chan->flush_notify = NULL;
+
+	if (pdpix == pScreen->GetScreenPixmap(pScreen))
+		FIRE_RING(chan);
 	return TRUE;
 }
 
Signature · 1 line
1.7.4.rc3

A message that is not in the archive (sent off-list or not yet received): 1297103867-5718-1-git-send-email-madman2003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw

The reason for NV50+ is obvious, but i'm not sure NV04-NV4X should be included for consistency or not.

Quoted 79 lines · Maarten Maathuis

- NV50+: This avoids high latency while typing with core fonts for example.

---

 src/nv04_exa.c |    4 ++++
 src/nv50_exa.c |    4 ++++
 src/nvc0_exa.c |    4 ++++
 3 files changed, 12 insertions(+), 0 deletions(-)
src/nv04_exa.c +4 -0
index 267c7b5..2603bd4 100644
@@ -340,6 +340,7 @@ NV04EXAUploadIFC(ScrnInfoPtr pScrn, const char *src, int src_pitch,
                 PixmapPtr pDst, int x, int y, int w, int h, int cpp)
  {
        NVPtr pNv = NVPTR(pScrn);
+       ScreenPtr pScreen = pDst->drawable.pScreen;
        struct nouveau_channel *chan = pNv->chan;
        struct nouveau_grobj *clip = pNv->NvClipRectangle;
        struct nouveau_grobj *ifc = pNv->NvImageFromCpu;
@@ -413,6 +414,9 @@ NV04EXAUploadIFC(ScrnInfoPtr pScrn, const char *src, int src_pitch,
        }
 
        chan->flush_notify = NULL;
+
+       if (pDst == pScreen->GetScreenPixmap(pScreen))
+               FIRE_RING(chan);
        return TRUE;
  }
 
src/nv50_exa.c +4 -0
index e8ff5aa..85baa68 100644
@@ -372,6 +372,7 @@ NV50EXAUploadSIFC(const char *src, int src_pitch,
                  PixmapPtr pdpix, int x, int y, int w, int h, int cpp)
  {
        NV50EXA_LOCALS(pdpix);
+       ScreenPtr pScreen = pdpix->drawable.pScreen;
        int line_dwords = (w * cpp + 3) / 4;
        uint32_t sifc_fmt;
 
@@ -428,6 +429,9 @@ NV50EXAUploadSIFC(const char *src, int src_pitch,
        }
 
        chan->flush_notify = NULL;
+
+       if (pdpix == pScreen->GetScreenPixmap(pScreen))
+               FIRE_RING(chan);
        return TRUE;
  }
 
src/nvc0_exa.c +4 -1
index 45647ce..85cb5d2 100644
@@ -550,6 +550,7 @@ NVC0EXAUploadSIFC(const char *src, int src_pitch,
                  PixmapPtr pdpix, int x, int y, int w, int h, int cpp)
  {
        NVC0EXA_LOCALS(pdpix);
+       ScreenPtr pScreen = pdpix->drawable.pScreen;
        int line_dwords = (w * cpp + 3) / 4;
        uint32_t sifc_fmt;
 
@@ -608,6 +609,9 @@ NVC0EXAUploadSIFC(const char *src, int src_pitch,
        }
 
        chan->flush_notify = NULL;
+
+       if (pdpix == pScreen->GetScreenPixmap(pScreen))
+               FIRE_RING(chan);
        return TRUE;
  }
 
--

1.7.4.rc3

Signature · 2 lines
Far away from the primal instinct, the song seems to fade away, the
river get wider between your thoughts and the things we do and say.