xf86-video-intel: 3 commits - src/sna/sna_accel.c src/sna/sna_video_overlay.c src/sna/sna_video_sprite.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Apr 29 05:56:45 PDT 2014
src/sna/sna_accel.c | 17 +++++++++++------
src/sna/sna_video_overlay.c | 1 +
src/sna/sna_video_sprite.c | 6 ++++--
3 files changed, 16 insertions(+), 8 deletions(-)
New commits:
commit 2fd1a05ac50ac4ba7cf09225f9133a8141aef302
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Apr 29 13:51:33 2014 +0100
sna/video: Initialise pitch before query
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_video_overlay.c b/src/sna/sna_video_overlay.c
index 72b290a..e0af919 100644
--- a/src/sna/sna_video_overlay.c
+++ b/src/sna/sna_video_overlay.c
@@ -642,6 +642,7 @@ sna_video_overlay_query(ClientPtr client,
case FOURCC_XVMC:
*h = (*h + 1) & ~1;
sna_video_frame_init(video, format->id, *w, *h, &frame);
+ sna_video_frame_set_rotation(video, &frame, RR_Rotate_0);
size = sizeof(uint32_t);
if (pitches) {
pitches[0] = frame.pitch[1];
diff --git a/src/sna/sna_video_sprite.c b/src/sna/sna_video_sprite.c
index 0a1c545..de04638 100644
--- a/src/sna/sna_video_sprite.c
+++ b/src/sna/sna_video_sprite.c
@@ -557,9 +557,11 @@ static int sna_video_sprite_query(ClientPtr client,
switch (format->id) {
case FOURCC_RGB888:
case FOURCC_RGB565:
- sna_video_frame_init(video, format->id, *w, *h, &frame);
- if (pitches)
+ if (pitches) {
+ sna_video_frame_init(video, format->id, *w, *h, &frame);
+ sna_video_frame_set_rotation(video, &frame, RR_Rotate_0);
pitches[0] = frame.pitch[0];
+ }
size = 4;
break;
commit 41a573c15ca1a1e775a2060be117374a5bc6f9b9
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Apr 29 13:30:14 2014 +0100
sna: Discard TearFree damage on partial migration
If we are overwriting part of the framebuffer, we know we do not need to
read that portion back from the scanout.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index b64855c..00db82f 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2531,9 +2531,14 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
return _sna_pixmap_move_to_cpu(pixmap, flags | MOVE_READ);
}
- if (priv->move_to_gpu && !priv->move_to_gpu(sna, priv, MOVE_READ)) {
- DBG(("%s: move-to-gpu override failed\n", __FUNCTION__));
- return false;
+
+ if (priv->move_to_gpu) {
+ if ((flags & MOVE_READ) == 0)
+ sna_pixmap_discard_shadow_damage(priv, region);
+ if (!priv->move_to_gpu(sna, priv, MOVE_READ)) {
+ DBG(("%s: move-to-gpu override failed\n", __FUNCTION__));
+ return NULL;
+ }
}
if (get_drawable_deltas(drawable, pixmap, &dx, &dy)) {
commit d75501572a4ea95fc126314718468345630723a1
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Apr 29 13:29:45 2014 +0100
sna: Preserve cpu hint for compatible mmapping of the GPU bo
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 677db40..b64855c 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2028,7 +2028,7 @@ _sna_pixmap_move_to_cpu(PixmapPtr pixmap, unsigned int flags)
assert(!priv->shm);
assert(priv->cpu_bo == NULL || !priv->cpu_bo->flush);
sna_pixmap_free_cpu(sna, priv, priv->cpu);
- priv->cpu = false;
+ priv->cpu &= priv->mapped == MAPPED_CPU;
assert_pixmap_damage(pixmap);
return true;
@@ -2089,7 +2089,7 @@ skip_inplace_map:
list_del(&priv->flush_list);
priv->clear = false;
}
- priv->cpu = false;
+ priv->cpu &= priv->mapped == MAPPED_CPU;
assert_pixmap_damage(pixmap);
DBG(("%s: operate inplace (GTT)\n", __FUNCTION__));
@@ -2579,7 +2579,7 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
}
priv->clear = false;
}
- priv->cpu = false;
+ priv->cpu &= priv->mapped == MAPPED_CPU;
assert_pixmap_damage(pixmap);
if (dx | dy)
RegionTranslate(region, -dx, -dy);
More information about the xorg-commit
mailing list