[Mesa-dev] [PATCH 5/6] egl/x11: trust our loader over the xserver for the drivername
Matt Turner
mattst88 at gmail.com
Wed Jul 29 10:19:16 PDT 2015
On Wed, Jul 29, 2015 at 9:19 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> This is a port of commit 7bd95ec437a(dri2: Trust our own driver name
> lookup over the server's.) from glx/dri2.
>
> Cc: Eric Anholt <eric at anholt.net>
> Cc: Julien Isorce <julien.isorce at gmail.com>
> Reported-by: Julien Isorce <julien.isorce at gmail.com>
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
> src/egl/drivers/dri2/platform_x11.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
> index 745e16a..a8534c9 100644
> --- a/src/egl/drivers/dri2/platform_x11.c
> +++ b/src/egl/drivers/dri2/platform_x11.c
> @@ -519,7 +519,7 @@ dri2_x11_connect(struct dri2_egl_display *dri2_dpy)
> xcb_generic_error_t *error;
> xcb_screen_iterator_t s;
> xcb_screen_t *screen;
> - char *driver_name, *device_name;
> + char *driver_name, *loader_driver_name, *device_name;
> const xcb_query_extension_reply_t *extension;
>
> xcb_prefetch_extension_data (dri2_dpy->conn, &xcb_xfixes_id);
> @@ -596,6 +596,15 @@ dri2_x11_connect(struct dri2_egl_display *dri2_dpy)
> }
>
> driver_name = xcb_dri2_connect_driver_name (connect);
Put a newline here (before a multiline comment)
> + /* If Mesa knows about the appropriate driver for this fd, then trust it.
> + * Otherwise, default to the server's value.
> + */
> + loader_driver_name = loader_get_driver_for_fd(dri2_dpy->fd, 0);
> + if (loader_driver_name) {
> + free(driver_name);
> + driver_name = loader_driver_name;
> + }
> +
> dri2_dpy->driver_name =
> strndup(driver_name,
> xcb_dri2_connect_driver_name_length(connect));
> --
> 2.4.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list