[PATCH] EXA: Preserve pPixmap->devPrivate.ptr in exaPixmapIsOffscreen_driver

Maarten Maathuis madman2003 at gmail.com
Thu Nov 5 04:56:37 PST 2009


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.

Maarten.


More information about the xorg-devel mailing list