[PATCH 1/2] glamor: add support for allocating linear buffers

Michel Dänzer michel at daenzer.net
Sun Jun 14 21:08:50 PDT 2015


On 12.06.2015 08:48, Dave Airlie wrote:
> We need this for doing USB offload scenarios using glamor
> and modesetting driver.
> 
> unfortunately only gbm in mesa 10.6 has support for the
> linear API.
> 
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  configure.ac                  |  5 +++++
>  glamor/glamor.h               |  3 ++-
>  glamor/glamor_egl.c           |  5 ++++-
>  glamor/glamor_egl_stubs.c     |  2 +-
>  glamor/glamor_fbo.c           | 10 +++++-----
>  hw/xwayland/xwayland-glamor.c |  2 +-
>  include/dix-config.h.in       |  3 +++
>  7 files changed, 21 insertions(+), 9 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index f760730..d0908e5 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2105,6 +2105,11 @@ if test "x$GLAMOR" = xyes; then
>  	if test "x$GBM" = xyes; then
>  		AC_DEFINE(GLAMOR_HAS_GBM, 1,
>  			  [Build glamor with GBM-based EGL support])
> +	        PKG_CHECK_MODULES(GBM_HAS_LINEAR, "gbm >= 10.6.0", [GBM_HAS_LINEAR=yes], [GBM_HAS_LINEAR=no])
> +		if test "x$GBM_HAS_LINEAR" = xyes; then
> +		        AC_DEFINE(GLAMOR_HAS_GBM_LINEAR,  1,
> +			  [Build glamor/gbm has linear support])
> +	        fi

It would be better to use AC_CHECK_DECL for this, as is done in
xf86-video-amdgpu. That way it does the right thing even if somebody
backports GBM_BO_USE_LINEAR to an older version of Mesa.


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


More information about the xorg-devel mailing list