[PATCH] Fix null-pointer exception in open_restricted()

2018-02-08 Thread Jeff Smith
If the path passed to open_restricted() is null, it results in a segfault when passing it to strneq. Return an error code from open_restricted() when path is null. This leaves it up to the calling function to provide an error message. https://bugzilla.redhat.com/show_bug.cgi?id=1536633

Re: [PATCH xserver 1/5] modesetting: Don't call xf86HandleColorMaps() at screen depth 30.

2018-02-08 Thread Mario Kleiner
On 02/08/2018 03:55 PM, Michel Dänzer wrote: On 2018-02-08 12:14 PM, Mario Kleiner wrote: As it turns out, doing so will make any gamma table updates silently fail, because xf86HandleColorMaps() hooks the .LoadPalette function to xf86RandR12LoadPalette() if the .gamma_set function is supported

Re: [PATCH xserver 1/5] modesetting: Don't call xf86HandleColorMaps() at screen depth 30.

2018-02-08 Thread Mario Kleiner
On 02/08/2018 10:09 PM, Adam Jackson wrote: On Thu, 2018-02-08 at 12:14 +0100, Mario Kleiner wrote: That in turn is a problem, because the size of the hw lut crtc->gamma_size is fixed to 256 slots on all kms-drivers when using the legacy gamma_set ioctl, What exactly is the non-legacy ioctl?

[RFC v2 0/3] xwayland: Add support for eglstreams

2018-02-08 Thread Lyude Paul
Some changes: - I broke GBM by accident in v1 by not making sure that we setup wl_drm in xwl_glamor_gbm_init_wl_registry() by incrementing xwl_screen->expecting_event in xwl_glamor_gbm_init_wl_registry() properly and decrementing it in the wl_drm handlers. So now we don't break that.

[RFC v2 2/3] xwayland: Add xwayland-config.h

2018-02-08 Thread Lyude Paul
Just a small autogenerated header that will soon contain more then just one macro. Signed-off-by: Lyude Paul --- configure.ac | 7 +++ hw/xwayland/xwayland.c | 10 ++ hw/xwayland/xwayland.h | 2 +- include/meson.build

[RFC v2 1/3] xwayland: Decouple GBM from glamor

2018-02-08 Thread Lyude Paul
This takes all of the gbm related code in wayland-glamor.c and moves it into it's own EGL backend for Xwayland, xwayland-glamor-gbm.c. Additionally, we add the egl_backend struct into xwl_screen in order to provide hooks for alternative EGL backends such as nvidia's EGLStreams. Signed-off-by:

[RFC v2 3/3] xwayland: Add glamor egl_backend for EGLStreams

2018-02-08 Thread Lyude Paul
This adds initial support for displaying Xwayland applications through the use of EGLStreams and nvidia's custom wayland protocol by adding another egl_backend driver. This also adds some additional egl_backend hooks that are required to make things work properly. EGLStreams work a lot

Re: [RFC 3/3] xwayland: Add glamor egl_backend for EGLStreams

2018-02-08 Thread Adam Jackson
On Wed, 2018-02-07 at 17:07 -0500, Lyude Paul wrote: > One of the biggest differences with this is that EGLStreams give no way > of doing rendering directly to the allocated resources unless you are > able to set the EGLSurface producers as the current read/draw texture > through

Re: [PATCH xserver 1/5] modesetting: Don't call xf86HandleColorMaps() at screen depth 30.

2018-02-08 Thread Adam Jackson
On Thu, 2018-02-08 at 12:14 +0100, Mario Kleiner wrote: > That in turn is a problem, because the size of the hw lut > crtc->gamma_size is fixed to 256 slots on all kms-drivers > when using the legacy gamma_set ioctl, What exactly is the non-legacy ioctl? - ajax

Re: [PATCH xserver 1/5] modesetting: Don't call xf86HandleColorMaps() at screen depth 30.

2018-02-08 Thread Michel Dänzer
On 2018-02-08 12:14 PM, Mario Kleiner wrote: > As it turns out, doing so will make any gamma table updates > silently fail, because xf86HandleColorMaps() hooks the > .LoadPalette function to xf86RandR12LoadPalette() if the > .gamma_set function is supported by the ddx, as is in our > case. > >

[PATCH xserver 5/5] glamor: Enable composite acceleration for rgb10 formats.

2018-02-08 Thread Mario Kleiner
argb2101010 and xrgb2101010. Seems to work fine, but not sure if because of dumb luck or because it is meant to be. (Re)viewer discretion advised! Tested on KDE Plasma-5 with XRender based composite acceleration backend. Much smoother and faster. Signed-off-by: Mario Kleiner

[PATCH xserver 4/5] glamor: Fix loose ends in color depth 30 support.

2018-02-08 Thread Mario Kleiner
This makes it work properly with OpenGL based desktop compositing, as tested with EGL and GLX based compositing under OpenGL-2/3, and also artifact free with XRender based 2D compositing. Signed-off-by: Mario Kleiner --- glamor/glamor.c | 6 --

[PATCH xserver 2/5] modesetting: Enable screen color depth 30 support.

2018-02-08 Thread Mario Kleiner
glamor now supports depth 30, so allow use of it. Signed-off-by: Mario Kleiner --- hw/xfree86/drivers/modesetting/driver.c | 1 + hw/xfree86/drivers/modesetting/drmmode_display.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git

Depth 30 enablement for modesetting-ddx and fixups for glamor.

2018-02-08 Thread Mario Kleiner
These patches against master teach the modesetting ddx color depth 30 support. They also fix a few loose ends in the new glamor depth 30 enablement, which caused psychedelic colors under desktop composition on all gpus depending on the color depth on the different windows - some worked fine, some

[PATCH xserver 1/5] modesetting: Don't call xf86HandleColorMaps() at screen depth 30.

2018-02-08 Thread Mario Kleiner
As it turns out, doing so will make any gamma table updates silently fail, because xf86HandleColorMaps() hooks the .LoadPalette function to xf86RandR12LoadPalette() if the .gamma_set function is supported by the ddx, as is in our case. Once xf86RandR12LoadPalette() has been called during server

[PATCH xserver 3/5] glamor: Make Xv extension initialize at depth 30.

2018-02-08 Thread Mario Kleiner
Support x-screens of depth 30, so init doesn't fail. Signed-off-by: Mario Kleiner --- hw/xfree86/glamor_egl/glamor_xf86_xv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/glamor_egl/glamor_xf86_xv.c