xf86-video-intel: 2 commits - src/sna/sna_blt.c src/sna/sna_display.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Mar 1 18:22:30 UTC 2019


 src/sna/sna_blt.c     |    7 +++++--
 src/sna/sna_display.c |   20 ++++++--------------
 2 files changed, 11 insertions(+), 16 deletions(-)

New commits:
commit 6afed33b2d673d88674f0c76efe500ae414e8e1b
Author: Ville Syrjälä <ville.syrjala at linux.intel.com>
Date:   Fri Mar 1 11:26:07 2019 +0000

    sna: Switch back to hwcursor on the next cursor update
    
    Once we've switched to using the swcursor (possibly
    due to the cursor ioctl failing) we currently keep
    using the swcursor until the modeset.
    
    That's not particularly great as the swcursor has several
    issues. Apart from the (presumably expected) flicker,
    the cursor also tends to leave horrible trails behind
    around dri2/3 windows (happens with tearfree at least).
    
    To avoid some of that let's try to switch back to the hwcursor
    a bit sooner. We can do that neatly via the convenient swcursor
    block handler.
    
    v2 [ickle]: Apply the restoration after the screen update is complete.
    v3 [vsyrjala]: Push it back to restore_swcursor and remove the
    fullscreen redraw -- prevents terrible flickering in v2!
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=106935
    Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index fe67f85b..119ea981 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -6286,23 +6286,15 @@ sna_realize_cursor(xf86CursorInfoPtr info, CursorPtr cursor)
 	return NULL;
 }
 
-static void enable_fb_access(ScrnInfoPtr scrn, int state)
-{
-	scrn->EnableDisableFBAccess(
-#ifdef XF86_HAS_SCRN_CONV
-				    scrn,
-#else
-				    scrn->scrnIndex,
-#endif
-				    state);
-}
-
-
 static void __restore_swcursor(ScrnInfoPtr scrn)
 {
+	struct sna *sna = to_sna(scrn);
+
 	DBG(("%s: attempting to restore SW cursor\n", __FUNCTION__));
-	enable_fb_access(scrn, FALSE);
-	enable_fb_access(scrn, TRUE);
+	xf86CursorResetCursor(scrn->pScreen);
+
+	/* Try to switch back to the HW cursor on the next cursor update */
+	sna->cursor.disable = false;
 
 	RemoveBlockAndWakeupHandlers((void *)__restore_swcursor,
 				     (void *)NoopDDA,
commit a63b6a22981f4add450132ac617b0ef07e103705
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Feb 26 10:15:41 2019 +0000

    sna: Supply 64b reloc versions for threaded composite blts
    
    Apparently we never take this path or else it would have failed before
    (we don't take it as we prefer render for these chipsets).
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c
index ddd2586d..61e2b0fe 100644
--- a/src/sna/sna_blt.c
+++ b/src/sna/sna_blt.c
@@ -261,7 +261,7 @@ noinline static void __sna_blt_fill_begin(struct sna *sna,
 		b[1] = blt->br13;
 		b[2] = 0;
 		b[3] = 0;
-		*(uint32_t *)(b+4) =
+		*(uint64_t *)(b+4) =
 			kgem_add_reloc64(kgem, kgem->nbatch + 4, blt->bo[0],
 					 I915_GEM_DOMAIN_RENDER << 16 |
 					 I915_GEM_DOMAIN_RENDER |
@@ -3111,7 +3111,10 @@ sna_blt_composite__convert(struct sna *sna,
 		tmp->blt   = blt_composite_copy;
 		tmp->box   = blt_composite_copy_box;
 		tmp->boxes = blt_composite_copy_boxes;
-		tmp->thread_boxes = blt_composite_copy_boxes__thread;
+		if (sna->kgem.gen >= 0100)
+			tmp->thread_boxes = blt_composite_copy_boxes__thread64;
+		else
+			tmp->thread_boxes = blt_composite_copy_boxes__thread;
 
 		if (!sna_blt_copy_init(sna, &tmp->u.blt,
 				       tmp->src.bo, tmp->dst.bo,


More information about the xorg-commit mailing list