xf86-video-intel: src/sna/sna_dri.c
Chris Wilson
ickle at kemper.freedesktop.org
Sat Aug 24 16:58:13 PDT 2013
src/sna/sna_dri.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit d7e6e9b83ce029e81767de35124b84914ad7d54b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sun Aug 25 00:55:19 2013 +0100
sna/dri: Prefer the source ring
When copying from the DRI client onto the scanout, we return the source
buffer back to the client afterwards. Therefore if we force the source
to switch rings, we incur a double ring switch from the client to us and
back. If we force the dst to switch rings, it will likely be then
correct for all subsequent copies as well.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index f31ca4e..5f2811b 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -580,16 +580,16 @@ static void sna_dri_select_mode(struct sna *sna, struct kgem_bo *dst, struct kge
}
VG_CLEAR(busy);
- busy.handle = dst->handle;
+ busy.handle = src->handle;
if (drmIoctl(sna->kgem.fd, DRM_IOCTL_I915_GEM_BUSY, &busy))
return;
- DBG(("%s: dst busy?=%x\n", __FUNCTION__, busy.busy));
+ DBG(("%s: src busy?=%x\n", __FUNCTION__, busy.busy));
if (busy.busy == 0) {
- busy.handle = src->handle;
+ busy.handle = dst->handle;
if (drmIoctl(sna->kgem.fd, DRM_IOCTL_I915_GEM_BUSY, &busy))
return;
- DBG(("%s: src busy?=%x\n", __FUNCTION__, busy.busy));
+ DBG(("%s: dst busy?=%x\n", __FUNCTION__, busy.busy));
if (busy.busy == 0) {
DBG(("%s: src/dst is idle, using defaults\n", __FUNCTION__));
return;
@@ -614,7 +614,7 @@ static void sna_dri_select_mode(struct sna *sna, struct kgem_bo *dst, struct kge
mode = KGEM_RENDER;
if (busy.busy & (1 << 17))
mode = KGEM_BLT;
- kgem_bo_mark_busy(dst, mode);
+ kgem_bo_mark_busy(busy.handle == src->handle ? src : dst, mode);
_kgem_set_mode(&sna->kgem, mode);
}
More information about the xorg-commit
mailing list