diff mbox

sna: revert the short-curcuit breaking XShmGetImage

Message ID 1458292394709011.289604980@ums007.ecc.u-tokyo.ac.jp (mailing list archive)
State New, archived
Headers show

Commit Message

Shu Yokoyama March 18, 2016, 9:13 a.m. UTC
The short-curcuit introduced by commit 963b5bb (later modified by commit aacc344) breaks XShmGetImage().
Images captured by ffmpeg's x11grab or x11vnc become choppy, while I use Cinnamon Desktop Environment.


I tested on:
  i5-4570 (Haswell) and B85 Chipset
  Fedora 24 (Developmental Branch) x86_64
  Cinnamon 2.8.7
  xf86-video-intel commit 74cd4d09ae051d3a1f4cb9fe29e656b044f03ece

Signed-off-by: Shu Yokoyama <yokoyama@graco.c.u-tokyo.ac.jp>
---
 src/sna/kgem.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Chris Wilson March 18, 2016, 9:59 a.m. UTC | #1
On Fri, Mar 18, 2016 at 06:13:14PM +0900, Shu Yokoyama wrote:
> The short-curcuit introduced by commit 963b5bb (later modified by commit aacc344) breaks XShmGetImage().
> Images captured by ffmpeg's x11grab or x11vnc become choppy, while I use Cinnamon Desktop Environment.

The idea there (with an exported object) is that bo->rq should not be
NULL as we use that in many places to determine if the buffer is busy or
not.
-Chris
diff mbox

Patch

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 06c1684..b92f8ca 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -7120,9 +7120,6 @@  void kgem_bo_sync__cpu_full(struct kgem *kgem, struct kgem_bo *bo, bool write)
 	assert(bo->refcnt);
 	assert(!bo->purged);
 
-	if (bo->rq == NULL && (kgem->has_llc || bo->snoop) && !write)
-		return;
-
 	if (bo->domain != DOMAIN_CPU || FORCE_MMAP_SYNC & (1 << DOMAIN_CPU)) {
 		struct drm_i915_gem_set_domain set_domain;