xf86-video-intel: 2 commits - src/sna/blt.c src/sna/sna_present.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Apr 6 21:55:51 UTC 2016
src/sna/blt.c | 12 ++++--------
src/sna/sna_present.c | 14 +++++++++-----
2 files changed, 13 insertions(+), 13 deletions(-)
New commits:
commit 74b755fe0a786d330d121c435d274e2418003581
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Apr 6 22:50:28 2016 +0100
sna/present: Clear flags on the vblank event's CRTC early
We store a flag on the vblank's CRTC to indicate whether we have marked
the target CRTC as having an immediately pending vblank. We should clear
this set of flags early so that we don't have to worry about the flag
whilst processing the vblank, and so that we don't get confused if we
have to requeue the vblank.
Reported-by: Christoph Haag <haagch at frickel.club>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94829#c32
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_present.c b/src/sna/sna_present.c
index 3998043..6e1beae 100644
--- a/src/sna/sna_present.c
+++ b/src/sna/sna_present.c
@@ -126,7 +126,7 @@ static void vblank_complete(struct sna_present_event *info,
DBG(("%s: %d events complete\n", __FUNCTION__, info->n_event_id));
for (n = 0; n < info->n_event_id; n++) {
DBG(("%s: pipe=%d tv=%d.%06d msc=%lld (target=%lld), event=%lld complete%s\n", __FUNCTION__,
- sna_crtc_pipe(unmask_crtc(info->crtc)),
+ sna_crtc_pipe(info->crtc),
(int)(ust / 1000000), (int)(ust % 1000000),
(long long)msc, (long long)info->target_msc,
(long long)info->event_id[n],
@@ -360,18 +360,22 @@ void
sna_present_vblank_handler(struct drm_event_vblank *event)
{
struct sna_present_event *info = to_present_event(event->user_data);
- xf86CrtcPtr crtc = info->crtc;
if (!info->queued) {
DBG(("%s: arrived unexpectedly early (not queued)\n", __FUNCTION__));
+ assert(!has_vblank(info->crtc));
return;
}
+ if (has_vblank(info->crtc)) {
+ DBG(("%s: clearing immediate flag\n", __FUNCTION__));
+ info->crtc = unmask_crtc(info->crtc);
+ sna_crtc_clear_vblank(info->crtc);
+ }
+
vblank_complete(info,
ust64(event->tv_sec, event->tv_usec),
- sna_crtc_record_event(unmask_crtc(crtc), event));
- if (has_vblank(crtc))
- sna_crtc_clear_vblank(unmask_crtc(crtc));
+ sna_crtc_record_event(info->crtc, event));
}
static int
commit 2077272b12ab299e1f25a16408476da0b51477b7
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Apr 6 20:48:43 2016 +0100
sna/blt: Don't skip the final src/dst_stride adjustment
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/blt.c b/src/sna/blt.c
index fc84113..c92fc8b 100644
--- a/src/sna/blt.c
+++ b/src/sna/blt.c
@@ -467,10 +467,8 @@ memcpy_to_tiled_x__swizzle_0__sse2(const void *src, void *dst, int bpp,
src = (const uint8_t *)src + 16;
w -= 16;
}
- if (w) {
- memcpy(tile_row, src, w);
- src = (const uint8_t *)src + src_stride + w;
- }
+ memcpy(tile_row, src, w);
+ src = (const uint8_t *)src + src_stride + w;
dst_y++;
}
}
@@ -546,10 +544,8 @@ memcpy_from_tiled_x__swizzle_0__sse2(const void *src, void *dst, int bpp,
dst = (uint8_t *)dst + 16;
w -= 16;
}
- if (w) {
- memcpy(dst, assume_aligned(tile_row, tile_width), w);
- dst = (uint8_t *)dst + dst_stride + w;
- }
+ memcpy(dst, assume_aligned(tile_row, tile_width), w);
+ dst = (uint8_t *)dst + dst_stride + w;
src_y++;
}
}
More information about the xorg-commit
mailing list