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

Michel Dänzer michel at daenzer.net
Tue Nov 10 18:44:05 PST 2015


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.


> @@ -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>


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


More information about the xorg-devel mailing list