All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH xf86-video-intel] sna: Initialize sna pointer
@ 2022-07-21 19:37 Jeffrey Knockel
  2022-07-21 19:52 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork
  0 siblings, 1 reply; 2+ messages in thread
From: Jeffrey Knockel @ 2022-07-21 19:37 UTC (permalink / raw)
  To: intel-gfx

From: Jeffrey Knockel <jeff@jeffreyknockel.com>

Initialize the sna pointer if it hasn't already been initialized.

Otherwise, we have the following segfault:

0x00007f24b993ef04 in list_add (entry=0x564a7a1380f8, head=0x7ffd01899aa8) at ../../src/intel_list.h:161
0x00007f24b993f0a0 in list_move (list=0x564a7a1380f8, head=0x7ffd01899aa8) at ../../src/intel_list.h:248
0x00007f24b99524c9 in sna_drawable_use_bo (drawable=0x564a79ef0530, flags=0, box=0x7ffd01853c80, damage=0x7ffd01853ca0)
at sna_accel.c:3965
0x00007f24b996f21b in sna_poly_segment (drawable=0x564a79ef0530, gc=0x564a7a0c44f0, n=146, seg=0x564a7a582ff4)
at sna_accel.c:10858
0x0000564a788607bf in damagePolySegment (pDrawable=0x564a79ef0530, pGC=0x564a7a0c44f0, nSeg=146, pSeg=0x564a7a582ff4)
at ../miext/damage/damage.c:1023
0x0000564a787e3577 in ProcPolySegment (client=0x564a7a15bc10) at ../dix/dispatch.c:1909
0x0000564a787df4be in Dispatch () at ../dix/dispatch.c:551
0x0000564a787eeb2b in dix_main (argc=11, argv=0x7ffd01854128, envp=0x7ffd01854188) at ../dix/main.c:272
0x0000564a789e05cd in main (argc=11, argv=0x7ffd01854128, envp=0x7ffd01854188) at ../dix/stubmain.c:34

Signed-off-by: Jeffrey Knockel <jeff@jeffreyknockel.com>
---
 src/sna/sna_accel.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 89b82afa..72a84833 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -3632,7 +3632,7 @@ sna_drawable_use_bo(DrawablePtr drawable, unsigned flags, const BoxRec *box,
 {
 	PixmapPtr pixmap = get_drawable_pixmap(drawable);
 	struct sna_pixmap *priv = sna_pixmap(pixmap);
-	struct sna *sna;
+	struct sna *sna = NULL;
 	RegionRec region;
 	int16_t dx, dy;
 	int ret;
@@ -3962,6 +3962,8 @@ use_gpu_bo:
 
 	if (priv->shm) {
 		assert(!priv->flush);
+		if (sna == NULL)
+			sna = to_sna_from_pixmap(pixmap);
 		list_move(&priv->flush_list, &sna->flush_pixmaps);
 	}
 
-- 
2.34.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Intel-gfx] ✗ Fi.CI.BUILD: failure for sna: Initialize sna pointer
  2022-07-21 19:37 [Intel-gfx] [PATCH xf86-video-intel] sna: Initialize sna pointer Jeffrey Knockel
@ 2022-07-21 19:52 ` Patchwork
  0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2022-07-21 19:52 UTC (permalink / raw)
  To: Jeffrey Knockel; +Cc: intel-gfx

== Series Details ==

Series: sna: Initialize sna pointer
URL   : https://patchwork.freedesktop.org/series/106592/
State : failure

== Summary ==

Error: patch https://patchwork.freedesktop.org/api/1.0/series/106592/revisions/1/mbox/ not applied
Applying: sna: Initialize sna pointer
error: sha1 information is lacking or useless (src/sna/sna_accel.c).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 sna: Initialize sna pointer
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-21 19:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-21 19:37 [Intel-gfx] [PATCH xf86-video-intel] sna: Initialize sna pointer Jeffrey Knockel
2022-07-21 19:52 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.