[PATCH xserver] modesetting: Move GBM code inside #ifdef GLAMOR_HAS_GBM

Olivier Fourdan ofourdan at redhat.com
Mon Apr 16 07:54:25 UTC 2018


On Mon, Apr 16, 2018 at 8:37 AM, Matt Turner <mattst88 at gmail.com> wrote:

> Fixes a compilation error without Glamor.
>
> Bugzilla: https://bugs.gentoo.org/653288
> Signed-off-by: Matt Turner <mattst88 at gmail.com>
> ---
> Unfortunately, there's more: Xwayland fails to link without Glamor.
>
>  hw/xfree86/drivers/modesetting/drmmode_display.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c
> b/hw/xfree86/drivers/modesetting/drmmode_display.c
> index 322ef050b..79e91f0f8 100644
> --- a/hw/xfree86/drivers/modesetting/drmmode_display.c
> +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
> @@ -998,18 +998,18 @@ static Bool
>  drmmode_create_bo(drmmode_ptr drmmode, drmmode_bo *bo,
>                    unsigned width, unsigned height, unsigned bpp)
>  {
> -    uint32_t format;
> -
> -    if (drmmode->scrn->depth == 30)
> -        format = GBM_FORMAT_ARGB2101010;
> -    else
> -        format = GBM_FORMAT_ARGB8888;
> -
>      bo->width = width;
>      bo->height = height;
>
>  #ifdef GLAMOR_HAS_GBM
>      if (drmmode->glamor) {
> +        uint32_t format;
> +
> +        if (drmmode->scrn->depth == 30)
> +            format = GBM_FORMAT_ARGB2101010;
> +        else
> +            format = GBM_FORMAT_ARGB8888;
> +
>  #ifdef GBM_BO_WITH_MODIFIERS
>          uint32_t num_modifiers;
>          uint64_t *modifiers = NULL;
> --
> 2.16.1
>


Reviewed-by: Olivier Fourdan <ofourdan at redhat.com>

Cheers,
Olivier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg-devel/attachments/20180416/3f4e4601/attachment.html>


More information about the xorg-devel mailing list