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

Michel Dänzer michel at daenzer.net
Mon Nov 9 22:51:47 PST 2015


On 07.11.2015 05:52, Eric Anholt wrote:
> If a pixmap isn't getting exported as a dmabuf, then we don't need to
> go the GBM route 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.
> 
> Signed-off-by: Eric Anholt <eric at anholt.net>

[...]

> +    bo = gbm_bo_create(glamor_egl->gbm, width, height,
> +                       GBM_FORMAT_ARGB8888,
> +#ifdef GLAMOR_HAS_GBM_LINEAR
> +                       (pixmap_priv->usage_shared ? GBM_BO_USE_LINEAR : 0) |
> +#endif
> +                       GBM_BO_USE_RENDERING | GBM_BO_USE_SCANOUT);

This can check pixmap->usage_hint == CREATE_PIXMAP_USAGE_SHARED, no need
for adding the pixmap_priv->usage_shared field.

With that fixed, this patch is

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