From 6729b508c44bfca0b0dbef238a8732adbed6d4c9 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 30 Nov 2009 16:52:10 +0000 Subject: [PATCH] uxa: Initialise lists for private pixmap structure. When updating a buffer object for the framebuffer, we may need to allocate a fresh pixmap private structure, for example if the pixmap is replaced due to resize. When doing so it is then imperative to initialise the circularly linked lists correctly. Should fix the fault: #0 i830_set_pixmap_bo (pixmap=0x24ab380, bo=0x24ab780) at i830_uxa.c:524 #1 0x00007f8615c629fd in drmmode_xf86crtc_resize (scrn=0x247a320, width=1280, height=800) at drmmode_display.c:1345 #2 0x000000000051246c in xf86RandR12ScreenSetSize (pScreen=0x24824f0, width=, height=, mmWidth=, mmHeight=) at xf86RandR12.c:709 #3 0x0000000000512aa8 in xf86RandR12CreateScreenResources (pScreen=) at xf86RandR12.c:839 #4 0x0000000000514ec0 in xf86CrtcCreateScreenResources (screen=0x24824f0) at xf86Crtc.c:727 #5 0x0000000000424fb3 in main (argc=, argv=, envp=) at main.c:215 as reported by 'buscher'. Signed-off-by: Chris Wilson --- src/i830_uxa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/i830_uxa.c b/src/i830_uxa.c index d53af043..89da5d00 100644 --- a/src/i830_uxa.c +++ b/src/i830_uxa.c @@ -530,6 +530,9 @@ void i830_set_pixmap_bo(PixmapPtr pixmap, dri_bo * bo) priv = xcalloc(1, sizeof (struct intel_pixmap)); if (priv == NULL) goto BAIL; + + list_init(&priv->batch); + list_init(&priv->flush); } dri_bo_reference(bo);