[PATCH xserver 10/11 v2] glamor: Delay making pixmaps shareable until we need to.

Eric Anholt eric at anholt.net
Wed Nov 11 15:33:01 PST 2015


Michel Dänzer <michel at daenzer.net> writes:

> On 11.11.2015 06:41, Eric Anholt wrote:
>> If a pixmap isn't getting exported as a dmabuf, then we don't need to
>> make an EGLImage/GBM bo for it.  This should reduce normal pixmap
>> allocation overhead, and also lets the driver choose non-scanout
>> formats which may be much higher performance.
>> 
>> On Raspberry Pi, where scanout isn't usable as a texture source, this
>> improves x11perf -copypixwin100 from about 4300/sec to 5780/sec under
>> xcompmgr -a, because we no longer need to upload our x11perf window to
>> a tiled temporary in order to render it to the screen.
>> 
>> v2: Just use pixmap->usage_hint instead of a new field.  Drop the
>>     changes that started storing gbm_bos in the pixmap priv due to
>>     lifetime issues.
>> 
>> Signed-off-by: Eric Anholt <eric at anholt.net>
>> Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
>
> This is slightly misleading, since my R-b was based on the v1 patch
> without pixmap_priv->usage_shared, but you made more extensive changes
> to the patch.

Sorry about that.  I'd fixed it to mention (v1) in the branch I
re-pushed, but I sent out before I amended that in.

>> @@ -526,12 +495,12 @@ glamor_back_pixmap_from_fd(PixmapPtr pixmap,
>>  
>>      screen->ModifyPixmapHeader(pixmap, width, height, 0, 0, stride, NULL);
>>  
>> -    ret = glamor_egl_create_textured_pixmap_from_gbm_bo(pixmap, bo);
>> -    gbm_bo_destroy(bo);
>> +    if (!glamor_egl_create_textured_pixmap_from_gbm_bo(pixmap, bo)) {
>> +        gbm_bo_destroy(bo);
>> +        return FALSE;
>> +    }
>
> I think this needs to call gbm_bo_destroy also when
> glamor_egl_create_textured_pixmap_from_gbm_bo succeeded, as before.
>
> With that fixed,
>
> Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>

You're right.  Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20151111/5541eeb8/attachment.sig>


More information about the xorg-devel mailing list