On 15 June 2015 at 05:08, Michel Dänzer <[email protected]> wrote:
> 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 <[email protected]>
>> ---
>>  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.
>
Fwiw I second this suggestion. As we know GBM is an API and others may
provide alternative implementation of it (for example CrOS has
minigbm). Imho using the mesa version in (m)any of the pc files is a
bug, which should be addressed, rather than relied upon.

Thanks
Emil
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to