[PATCH xwayland 1/3] configure: fallback to wlshm in case of xwayland

Kristian Høgsberg hoegsberg at gmail.com
Mon May 7 13:54:10 PDT 2012


On Mon, May 07, 2012 at 03:04:57PM +0300, Tiago Vignatti wrote:
> If it doesn't find the proper driver for a chipset then it fallback to the shm
> solution.
> 
> But say we have intel and wlshm drivers then it will load both, short-circuit
> somewhere and fail to bring xwayland properly. Therefore, I believe this is
> not the ideal solution either.
> 
> Signed-off-by: Tiago Vignatti <tiago.vignatti at intel.com>
> ---
> hmm, I'm not particularly happy with this patch really. But I'm sending
> anyway for two reasons: first, tells that I'm happy with wlshm driver. It
> works, cool! And second, I'd like to check if someone has a wiser solution for
> the problem of having more than one xwayland driver in the same system.

Yea, not too bad I guess.  We need a way to detect whether or not a
driver supports wayland or not, but I don't think that's part of the
current mechanism.  That way we can discard the real ddx driver if it
doesn't do xwayland and fall back to wlshm if we have -wayland.  Maybe
we can set a flag in GET_REQUIRED_HW_INTERFACES or something to
indicate that the driver can support xwayland.

Kristian

>  hw/xfree86/common/xf86AutoConfig.c |    6 ++++++
>  include/xorg-config.h.in           |    3 +++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
> index 0c46568..2aec527 100644
> --- a/hw/xfree86/common/xf86AutoConfig.c
> +++ b/hw/xfree86/common/xf86AutoConfig.c
> @@ -277,6 +277,12 @@ listPossibleVideoDrivers(char *matches[], int nmatches)
>  #endif
>      }
>  #endif /* !sun */
> +
> +#if defined(XORG_WAYLAND)
> +    if (i < (nmatches - 1) && xorgWayland) {
> +	matches[i++] = xnfstrdup("wlshm");
> +    }
> +#endif
>  }
>  
>  /* copy a screen section and enter the desired driver
> diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in
> index 2cc416a..53a6534 100644
> --- a/include/xorg-config.h.in
> +++ b/include/xorg-config.h.in
> @@ -136,4 +136,7 @@
>  /* Have getresuid */
>  #undef HAVE_GETRESUID
>  
> +/* Have X Wayland support */
> +#undef XORG_WAYLAND
> +
>  #endif /* _XORG_CONFIG_H_ */
> -- 
> 1.7.9.5
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list