Bad caching of the scratch pixmap
Daniel Drake
dsd at laptop.org
Tue Apr 16 10:42:57 PDT 2013
On Tue, Apr 16, 2013 at 11:22 AM, Michel Dänzer <michel at daenzer.net> wrote:
> On Die, 2013-04-16 at 10:54 -0600, Daniel Drake wrote:
>> On Sat, Apr 13, 2013 at 11:14 AM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
>> > Given the same fix works, it does sound like a very similar issue. The
>> > difference is that the DDX is under control of the creating the scratch
>> > pixmap in your case and should be well aware of the lifetime constraints
>> > and so remember to decouple the GPU object when it destroys the screen
>> > pixmap. So the bug is really in the driver and this just happens to
>> > workaround the bug by forcing the release
>>
>> Good that you have a feeling for where the real problem actually is.
>> I'm happy to fix the driver, but I am facing a bit of a learning
>> curve. If I get a good grasp on things, I will try to produce some
>> documentation for the next person...
>>
>> So, the DDX is in control of pixmap allocations. It does that by
>> providing these hooks:
>>
>> if (pExa->flags & EXA_HANDLES_PIXMAPS)
>> {
>> pExa->CreatePixmap = NULL;
>> pExa->CreatePixmap2 = mrvlExaCreatePixmap2;
>> pExa->DestroyPixmap = mrvlDestroyPixmap;
>> pExa->ModifyPixmapHeader = mrvlModifyPixmapHeader;
>> pExa->PixmapIsOffscreen = mrvlPixmapIsOffscreen;
>> }
>
> Do you really need the ModifyPixmapHeader hook? It shouldn't be
> necessary with CreatePixmap2. Do things work better without it?
Causes a crash early in X init. Maybe this has uncovered a driver bug?
Program received signal SIGSEGV, Segmentation fault.
0xb6c7ed9c in pixman_fill1_line (v=1, width=<optimized out>, offs=0,
dst=<optimized out>) at pixman-fast-path.c:2057
2057 *dst |= A1_FILL_MASK (width, 0);
(gdb) bt
#0 0xb6c7ed9c in pixman_fill1_line (v=1, width=<optimized out>, offs=0,
dst=<optimized out>) at pixman-fast-path.c:2057
#1 pixman_fill1 (xor=16, height=15, width=16, y=0, x=16,
stride=<optimized out>, bits=<optimized out>) at pixman-fast-path.c:2079
#2 fast_path_fill (imp=<optimized out>, bits=<optimized out>,
stride=<optimized out>, bpp=<optimized out>, x=0, y=0, width=16,
height=16, xor=4294967295) at pixman-fast-path.c:2180
#3 0xb6c8bb24 in _pixman_implementation_fill (imp=0x1e0418,
bits=bits at entry=0x0, stride=stride at entry=1, bpp=bpp at entry=1, x=x at entry=0,
y=0, y at entry=3071080, width=16, width at entry=-1287741568, height=16,
height at entry=0, xor=4294967295, xor at entry=16)
at pixman-implementation.c:250
#4 0xb6c4e374 in pixman_fill (bits=bits at entry=0x0, stride=stride at entry=1,
bpp=bpp at entry=1, x=x at entry=0, y=y at entry=0, width=width at entry=16,
height=16, height at entry=-1287739640, xor=4294967295) at pixman.c:763
#5 0xb33e9f80 in fbFill (pDrawable=0x2ee0e8, pDrawable at entry=0x10,
pGC=0x2edc68, pGC at entry=0x1fd268, x=-1225732320, x at entry=0, y=y at entry=0,
width=width at entry=16, height=height at entry=16) at fbfill.c:43
#6 0xb33ea708 in fbPolyFillRect (pDrawable=0x10, pGC=0x1fd268,
nrect=<optimized out>, prect=0xbe86d50c) at fbfillrect.c:72
#7 0xb33caa70 in ExaCheckPolyFillRect (pDrawable=pDrawable at entry=0x2ee0e8,
pGC=pGC at entry=0x2edc68, nrect=nrect at entry=1, prect=prect at entry=0xbe86d504)
at exa_unaccel.c:313
#8 0xb33c4a94 in exaPolyFillRect (pDrawable=0x2ee0e8, pGC=0x2edc68, nrect=1,
prect=0xbe86d504) at exa_accel.c:849
#9 0x00129efc in damagePolyFillRect (pDrawable=0x2ee0e8, pGC=0x2edc68,
nRects=1220348, pRects=0x2ee0e8) at damage.c:1250
#10 0x0004c308 in CreateDefaultStipple (screenNum=screenNum at entry=0)
at gc.c:895
#11 0x000281c4 in main (argc=1, argv=0x281c4 <main+792>, envp=<optimized out>)
at main.c:229
Thanks!
Daniel
More information about the xorg-devel
mailing list