[PATCH xf86-video-amdgpu 6/6] glamor: Reallocate linear pixmap BO if necessary for DRI2 PRIME

Michel Dänzer michel at daenzer.net
Wed Jun 8 14:46:44 UTC 2016


On 08.06.2016 22:59, StDenis, Tom wrote:
> From: Michel Dänzer <michel at daenzer.net>
>  
>> +       tiling_info = amdgpu_pixmap_get_tiling_info(pixmap);
>> +       if (AMDGPU_TILING_GET(tiling_info, ARRAY_MODE) != 0) {
>> +               PixmapPtr linear;
>> +
>> +               /* We don't want to re-allocate the screen pixmap as
>> +                * linear, to avoid trouble with page flipping
>> +                */
>> +               if (screen->GetScreenPixmap(screen) == pixmap)
>> +                       return FALSE;
>> +
>> +               linear = screen->CreatePixmap(screen, pixmap->drawable.width,
>> +                                             pixmap->drawable.height,
>> +                                             pixmap->drawable.depth,
>> +                                             CREATE_PIXMAP_USAGE_SHARED);
> 
> TSTD:  If CreatePixmap fails won't linear be NULL?  

Indeed, thanks. I guess I'll just make it return NULL in that case.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the xorg-driver-ati mailing list