xf86-video-intel: 4 commits - src/sna/kgem.c src/sna/sna_dri2.c src/sna/sna_transform.c
Chris Wilson
ickle at kemper.freedesktop.org
Thu Nov 20 05:26:48 PST 2014
src/sna/kgem.c | 2 +-
src/sna/sna_dri2.c | 37 +++++++++++++++++++++++++++----------
src/sna/sna_transform.c | 8 ++++----
3 files changed, 32 insertions(+), 15 deletions(-)
New commits:
commit 0f15b8b45bb6de10ce1926db303247a5bd3c1c08
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Nov 19 18:42:32 2014 +0000
sna/transform: Correctly check for imprecise fractional translations
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_transform.c b/src/sna/sna_transform.c
index 3b54df4..b62b323 100644
--- a/src/sna/sna_transform.c
+++ b/src/sna/sna_transform.c
@@ -135,14 +135,14 @@ sna_transform_is_imprecise_integer_translation(const PictTransform *t,
int f;
f = pixman_fixed_fraction(t->matrix[0][2]);
- if (f < IntToxFixed(1)/4 || f > IntToxFixed(3)/4) {
- DBG(("%s: imprecise, fractional translation X\n", __FUNCTION__));
+ if (f > IntToxFixed(1)/4 && f < IntToxFixed(3)/4) {
+ DBG(("%s: imprecise, fractional translation X: %x\n", __FUNCTION__, f));
return false;
}
f = pixman_fixed_fraction(t->matrix[1][2]);
- if (f < IntToxFixed(1)/4 || f > IntToxFixed(3)/4) {
- DBG(("%s: imprecise, fractional translation Y\n", __FUNCTION__));
+ if (f > IntToxFixed(1)/4 && f < IntToxFixed(3)/4) {
+ DBG(("%s: imprecise, fractional translation Y: %x\n", __FUNCTION__, f));
return false;
}
}
commit 7725c423cda217e0dbd95003bb7a80b4b3a73bb4
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Nov 19 18:30:20 2014 +0000
sna/dri2: Improve precision of completion event for no-op swaps
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index 5e9f284..d0760fc 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -1948,8 +1948,8 @@ static void frame_swap_complete(struct sna_dri2_event *frame, int type)
assert(frame->client);
swap = sna_crtc_last_swap(frame->crtc);
- DBG(("%s: draw=%ld, pipe=%d, frame=%lld [msc=%lld], tv=%d.%06d\n",
- __FUNCTION__, (long)frame->draw, frame->pipe,
+ DBG(("%s(type=%d): draw=%ld, pipe=%d, frame=%lld [msc=%lld], tv=%d.%06d\n",
+ __FUNCTION__, type, (long)frame->draw, frame->pipe,
(long long)swap->msc,
(long long)draw_current_msc(frame->draw, frame->crtc, swap->msc),
swap->tv_sec, swap->tv_usec));
@@ -1967,8 +1967,8 @@ static void fake_swap_complete(struct sna *sna, ClientPtr client,
const struct ust_msc *swap;
swap = sna_crtc_last_swap(crtc);
- DBG(("%s: draw=%ld, pipe=%d, frame=%lld [msc %lld], tv=%d.%06d\n",
- __FUNCTION__, (long)draw->id, crtc ? sna_crtc_to_pipe(crtc) : -1,
+ DBG(("%s(type=%d): draw=%ld, pipe=%d, frame=%lld [msc %lld], tv=%d.%06d\n",
+ __FUNCTION__, type, (long)draw->id, crtc ? sna_crtc_to_pipe(crtc) : -1,
(long long)swap->msc,
(long long)draw_current_msc(draw, crtc, swap->msc),
swap->tv_sec, swap->tv_usec));
@@ -2802,6 +2802,7 @@ sna_dri2_schedule_swap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
union drm_wait_vblank vbl;
xf86CrtcPtr crtc = NULL;
struct sna_dri2_event *info = NULL;
+ int type = DRI2_EXCHANGE_COMPLETE;
CARD64 current_msc;
DBG(("%s: draw=%lu %dx%d, pixmap=%ld %dx%d, back=%u (refs=%d/%d, flush=%d) , front=%u (refs=%d/%d, flush=%d)\n",
@@ -2973,15 +2974,17 @@ blit:
DBG(("%s -- blit\n", __FUNCTION__));
if (info)
sna_dri2_event_free(info);
- if (can_xchg(sna, draw, front, back))
+ if (can_xchg(sna, draw, front, back)) {
sna_dri2_xchg(draw, front, back);
- else
+ } else {
__sna_dri2_copy_region(sna, draw, NULL, back, front, false);
+ type = DRI2_BLIT_COMPLETE;
+ }
skip:
DBG(("%s: unable to show frame, unblocking client\n", __FUNCTION__));
if (crtc == NULL)
crtc = sna_mode_first_crtc(sna);
- fake_swap_complete(sna, client, draw, crtc, DRI2_BLIT_COMPLETE, func, data);
+ fake_swap_complete(sna, client, draw, crtc, type, func, data);
*target_msc = 0; /* offscreen, so zero out target vblank count */
return TRUE;
}
commit f367f3dee5e2ecba265a8ff7e98e196189793613
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Nov 19 18:19:13 2014 +0000
sna/dri2: Add more DBG to explain invalid frames
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index f3395ce..5e9f284 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -2831,11 +2831,18 @@ sna_dri2_schedule_swap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
assert(get_private(front)->bo->refcnt);
assert(get_private(back)->bo->refcnt);
- if (get_private(front)->pixmap != get_drawable_pixmap(draw))
+ if (get_private(front)->pixmap != get_drawable_pixmap(draw)) {
+ DBG(("%s: decoupled DRI2 front pixmap=%ld, actual pixmap=%ld\n",
+ __FUNCTION__,
+ get_private(front)->pixmap->drawable.serialNumber,
+ get_drawable_pixmap(draw)->drawable.serialNumber));
goto skip;
+ }
- if (get_private(back)->stale)
+ if (get_private(back)->stale) {
+ DBG(("%s: stale back buffer\n", __FUNCTION__));
goto skip;
+ }
assert(sna_pixmap_from_drawable(draw)->flush);
@@ -2849,8 +2856,15 @@ sna_dri2_schedule_swap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
priv->front = NULL;
}
if (win->clipList.extents.x2 <= win->clipList.extents.x1 ||
- win->clipList.extents.y2 <= win->clipList.extents.y1)
+ win->clipList.extents.y2 <= win->clipList.extents.y1) {
+ DBG(("%s: window clipped (%d, %d), (%d, %d)\n",
+ __FUNCTION__,
+ win->clipList.extents.x1,
+ win->clipList.extents.y1,
+ win->clipList.extents.x2,
+ win->clipList.extents.y2));
goto skip;
+ }
}
/* Drawable not displayed... just complete the swap */
commit 05a1aba1ab5d288918d6689080170fc83a80db61
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Nov 19 18:12:10 2014 +0000
sna: DBG compile fix
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 72ffb04..bea2295 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3287,7 +3287,7 @@ expire:
goto retry;
ERR(("%s: failed to write batch (handle=%d): %d\n",
- __FUNCTION__, handle, -ret));
+ __FUNCTION__, bo->handle, -ret));
return ret;
}
More information about the xorg-commit
mailing list