[PATCH] EXA: Preserve pPixmap->devPrivate.ptr in exaPixmapIsOffscreen_driver
Tiago Vignatti
tiago.vignatti at nokia.com
Thu Nov 5 05:17:35 PST 2009
On Thu, Nov 05, 2009 at 01:56:37PM +0100, ext Maarten Maathuis wrote:
> 2009/11/5 Michel Dänzer <michel at daenzer.net>:
> > On Wed, 2009-11-04 at 15:35 +0200, Tiago Vignatti wrote:
> >> It crash the server when the drawable is 32 bit and the framebuffer is 16.
> >>
> >> This is pretty much a copy-past from commit 8e873185.
> >>
> >> Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
> >> ---
> >> exa/exa_driver.c | 4 +++-
> >> 1 files changed, 3 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/exa/exa_driver.c b/exa/exa_driver.c
> >> index 9703695..a9165a1 100644
> >> --- a/exa/exa_driver.c
> >> +++ b/exa/exa_driver.c
> >> @@ -204,11 +204,13 @@ exaPixmapIsOffscreen_driver(PixmapPtr pPixmap)
> >> {
> >> ScreenPtr pScreen = pPixmap->drawable.pScreen;
> >> ExaScreenPriv(pScreen);
> >> + pointer saved_ptr;
> >> Bool ret;
> >>
> >> + saved_ptr = pPixmap->devPrivate.ptr;
> >> pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap);
> >> ret = pExaScr->info->PixmapIsOffscreen(pPixmap);
> >> - pPixmap->devPrivate.ptr = NULL;
> >> + pPixmap->devPrivate.ptr = saved_ptr;
> >>
> >> return ret;
> >> }
> >
> > Looks good to me, but maybe Maarten had a reason for not doing this so
> > I'll leave it to him to (n)ack.
> >
> >
> > --
> > Earthling Michel Dänzer | http://www.vmware.com
> > Libre software enthusiast | Debian, X and DRI developer
> >
> > _______________________________________________
> > xorg-devel mailing list
> > xorg-devel at lists.x.org
> > http://lists.x.org/mailman/listinfo/xorg-devel
> >
>
> I didn't forsee any situation where it would be called after prepare
> access, that's why i didn't add it. I don't have any objection to this
> if it turns out to be needed.
>
Right, it fix my issue.
If it helps even more you, I (hardly) bisect where the 32 bit drawable under
16 bit fb started to crash the server. It starts on 268e227b:
EXA: Make Prepare/FinishAccess tracking resilient to repeated / nested
calls.
Cheers,
Tiago
More information about the xorg-devel
mailing list