[PATCH radeon] Fix "Unable to retrieve master" with with X backend.

Kristian Høgsberg krh at bitplanet.net
Thu May 24 06:11:04 PDT 2012


On Wed, May 23, 2012 at 10:37 PM, Darxus <darxus at chaosreigns.com> wrote:
> Fix case where, if weston was run with --xserver while using the X backend
> without root priveledges, it would give an "Unable to retrieve master"
> error and fail when it tried to launch X.

That looks right, an xwayland driver can't and shouldn't drop/set master.

Kristian

> ---
>  src/radeon_kms.c |   18 +++++++++++-------
>  1 files changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/src/radeon_kms.c b/src/radeon_kms.c
> index db3de74..8595744 100644
> --- a/src/radeon_kms.c
> +++ b/src/radeon_kms.c
> @@ -1119,10 +1119,12 @@ Bool RADEONScreenInit_KMS(int scrnIndex, ScreenPtr pScreen,
>     xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
>                   "RADEONScreenInit_KMS 10\n");
>
> -    ret = drmSetMaster(info->dri->drmFD);
> -    if (ret) {
> -        ErrorF("Unable to retrieve master\n");
> -        return FALSE;
> +    if (!info->xwl_screen) {
> +       ret = drmSetMaster(info->dri->drmFD);
> +       if (ret) {
> +           ErrorF("Unable to retrieve master\n");
> +           return FALSE;
> +       }
>     }
>     xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
>                   "RADEONScreenInit_KMS 11\n");
> @@ -1368,9 +1370,11 @@ Bool RADEONEnterVT_KMS(int scrnIndex, int flags)
>                   "RADEONEnterVT_KMS\n");
>
>
> -    ret = drmSetMaster(info->dri->drmFD);
> -    if (ret)
> -       ErrorF("Unable to retrieve master\n");
> +    if (!info->xwl_screen) {
> +       ret = drmSetMaster(info->dri->drmFD);
> +       if (ret)
> +           ErrorF("Unable to retrieve master\n");
> +    }
>     info->accel_state->XInited3D = FALSE;
>     info->accel_state->engineMode = EXA_ENGINEMODE_UNKNOWN;
>
> --
> 1.7.5.4
>
> _______________________________________________
> 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