Re: [PATCH xserver] modesetting: Remove ms_crtc_msc_to_kernel_msc().

2018-05-04 Thread Mario Kleiner
I wrote a little program to simulate how ms_kernel_msc_to_crtc_msc() is implemented in servers 1.16 - 1.20 and how it responds to msc's delivered by the kernel. If i didn't make a mistake, then according to the compiler it turns out that ms_kernel_msc_to_crtc_msc is broken in all servers. The

Re: [PATCH 2/2] loader_dri3: Variant 2: Wait for pending swaps to complete before drawable_fini.

2018-05-04 Thread Mario Kleiner
On Sat, May 5, 2018 at 4:08 AM, Mike Lothian wrote: > I definately saw the steam bug with patch 1 but not with plasmashell, > I started seeing it with patch 2 but it seemed to fix itself > I had two hangs of kwin_x11 within the last 6 hours when alt-tabbing between windows,

Re: [PATCH xserver] meson: Set XCONFIGFILE to 'xorg.conf' instead of '/etc/xorg.conf'

2018-05-04 Thread Thierry Reding
On Fri, May 04, 2018 at 10:48:17AM -0700, Aaron Plattner wrote: > The autoconf build hard-codes XCONFIGFILE to just 'xorg.conf': > > XF86CONFIGFILE="xorg.conf" > AC_DEFINE_DIR(XCONFIGFILE, XF86CONFIGFILE, [Name of configuration file]) > > Later, the X server passes that into DoSubstitution()

Re: [PATCH xserver] meson: Define DEFAULT_LIBRARY_PATH as join_paths(get_option('prefix'), get_option('libdir'))

2018-05-04 Thread Thierry Reding
On Fri, May 04, 2018 at 03:09:22PM -0700, Aaron Plattner wrote: > 'libdir' defaults to 'lib', so running X -showDefaultLibPath just prints 'lib' > instead of '/usr/lib' or '/usr/local/lib'. Use joint_paths() to get the > correct > full path. > > Signed-off-by: Aaron Plattner

[PATCH xserver] meson: Define DEFAULT_LIBRARY_PATH as join_paths(get_option('prefix'), get_option('libdir'))

2018-05-04 Thread Aaron Plattner
'libdir' defaults to 'lib', so running X -showDefaultLibPath just prints 'lib' instead of '/usr/lib' or '/usr/local/lib'. Use joint_paths() to get the correct full path. Signed-off-by: Aaron Plattner --- The NVIDIA driver installer noticed this meson vs. autoconf

[PATCH xserver] meson: Set XCONFIGFILE to 'xorg.conf' instead of '/etc/xorg.conf'

2018-05-04 Thread Aaron Plattner
The autoconf build hard-codes XCONFIGFILE to just 'xorg.conf': XF86CONFIGFILE="xorg.conf" AC_DEFINE_DIR(XCONFIGFILE, XF86CONFIGFILE, [Name of configuration file]) Later, the X server passes that into DoSubstitution() which expands the path: DoSubstitution(template="/etc/X11/%X", ...,

Re: [PATCH 2/2] loader_dri3: Variant 2: Wait for pending swaps to complete before drawable_fini.

2018-05-04 Thread Mike Lothian
src/loader/loader_dri3_helper.c | 25 + 1 file changed, 25 insertions(+) diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c index 23729f7ecb..2b2a8d21d8 100644 --- a/src/loader/loader_dri3_helper.c +++ b/src/loader/loader_dri3_helper.c @@ -26,6

Re: [PATCH 2/2] loader_dri3: Variant 2: Wait for pending swaps to complete before drawable_fini.

2018-05-04 Thread Mario Kleiner
On Fri, May 4, 2018 at 6:45 PM, Mike Lothian wrote: > Hi > > The first hunk doesn't apply, the other 3 gives this with GCC 8.1 > Oops, the perils of applying debug patches on top of debug patches... Can you add a... #include at the top of the file, e.g, after '#include

Re: [PATCH 1/2] loader_dri3: Wait for pending swaps to complete before drawable_fini.

2018-05-04 Thread Mike Lothian
Hi Yes I've not seen any freezes with Plasmashell, so a big improvement Had issues with patch 2 Cheers Mike On 4 May 2018 at 17:36, Mario Kleiner wrote: > On Fri, May 4, 2018 at 6:31 PM, Mike Lothian wrote: >> Hi >> >> I'm still seeing the

Re: [PATCH xserver] dri2: Sync i965_pci_ids.h from mesa

2018-05-04 Thread Anuj Phogat
On Thu, May 3, 2018 at 2:51 PM, Kenneth Graunke wrote: > On Thursday, May 3, 2018 11:29:11 AM PDT Anuj Phogat wrote: >> Copied from Mesa with no modifications. >> >> Gives us Cofeelake platform names updates and sync on Kaby Lake, >> Ice Lake PCI IDs. >> >> Signed-off-by:

Re: [PATCH 2/2] loader_dri3: Variant 2: Wait for pending swaps to complete before drawable_fini.

2018-05-04 Thread Mike Lothian
Hi The first hunk doesn't apply, the other 3 gives this with GCC 8.1 ../mesa-/src/loader/loader_dri3_helper.c: In function ‘dri3_handle_present_event’: ../mesa-/src/loader/loader_dri3_helper.c:376:13: error: implicit declaration of function ‘printf’

Re: [PATCH xserver] modesetting: Remove ms_crtc_msc_to_kernel_msc().

2018-05-04 Thread Mario Kleiner
On Fri, May 4, 2018 at 6:16 PM, Mike Lothian wrote: > Hi Mario > > Thanks for finding this > > Tested-by: Mike Lothian > That tested-by means it doesn't cause new harm, right? Not that it solves the plasmashell or steam freezes on itself? -mario >

Re: [PATCH 1/2] loader_dri3: Wait for pending swaps to complete before drawable_fini.

2018-05-04 Thread Mario Kleiner
On Fri, May 4, 2018 at 6:31 PM, Mike Lothian wrote: > Hi > > I'm still seeing the freeze in the Steam client with this patch > > Just about to test the other one > Thanks for testing. So the plasmashell hang is gone, right? Maybe the steam issue is a different bug. With

Re: [PATCH 1/2] loader_dri3: Wait for pending swaps to complete before drawable_fini.

2018-05-04 Thread Mike Lothian
Hi I'm still seeing the freeze in the Steam client with this patch Just about to test the other one Mike On 4 May 2018 at 17:17, Mike Lothian wrote: > Hi Mario > > Again thanks for looking into this issue :D > > Tested-by: Mike Lothian > > I'll give

Re: [PATCH 1/2] loader_dri3: Wait for pending swaps to complete before drawable_fini.

2018-05-04 Thread Mike Lothian
Hi Mario Again thanks for looking into this issue :D Tested-by: Mike Lothian I'll give the other patch a whirl now Cheers Mike On 4 May 2018 at 14:45, Mario Kleiner wrote: > Before destroying the loader_dri3_drawable, make sure all pending >

Re: [PATCH xserver] modesetting: Remove ms_crtc_msc_to_kernel_msc().

2018-05-04 Thread Mike Lothian
Hi Mario Thanks for finding this Tested-by: Mike Lothian Cheers Mike On 4 May 2018 at 14:02, Mario Kleiner wrote: > Hi Daniel, Eero, > > On Fri, May 4, 2018 at 2:41 PM, Daniel Stone wrote: >> Hi Mario, >> >> On 4 May

[PATCH 1/2] loader_dri3: Wait for pending swaps to complete before drawable_fini.

2018-05-04 Thread Mario Kleiner
Before destroying the loader_dri3_drawable, make sure all pending swaps for it have completed. This guides against the following scenario, which happens, e.g., with KDE Plasma-5's plasmashell (which uses QT-5's QtGui/QtQuick for rendering), when it repaints multiple UI elements, each represented

[RFC] Fix attempt for Mesa + X-Server 1.20 + modesetting-ddx hangs on KDE5.

2018-05-04 Thread Mario Kleiner
Two patches, solving the same problem in two different ways, the 1st one ready to go, the 2nd one would need the debug statements removed. Only apply one of those for testing, the 2nd one will be useless with the 1st one applied, but demonstrates the problem. So X-Server 1.20 RC +

[PATCH 2/2] loader_dri3: Variant 2: Wait for pending swaps to complete before drawable_fini.

2018-05-04 Thread Mario Kleiner
See previous patch in series for explanation of the problem. This method avoids a blocking loader_dri3_swapbuffer_barrier() call whenever a GL contexts drawables are changed via glXMakeCurrent et al. Instead it filters out the "orphaned" PresentNotify events from previous incarnations of the

Re: [PATCH xserver] modesetting: Remove ms_crtc_msc_to_kernel_msc().

2018-05-04 Thread Mario Kleiner
Hi Daniel, Eero, On Fri, May 4, 2018 at 2:41 PM, Daniel Stone wrote: > Hi Mario, > > On 4 May 2018 at 13:14, Mario Kleiner wrote: >> Indeed, i found a Mesa bug yesterday which can cause Mesa's >> PresentPixmap request to spuriously feed garbage

Re: [PATCH xserver] modesetting: Remove ms_crtc_msc_to_kernel_msc().

2018-05-04 Thread Daniel Stone
Hi Mario, On 4 May 2018 at 13:14, Mario Kleiner wrote: > Indeed, i found a Mesa bug yesterday which can cause Mesa's > PresentPixmap request to spuriously feed garbage targetMSC's > into the driver under some conditions. However, while other > video drivers seem to

Re: last call for 1.20 (was Re: [PATCH xserver] present: fix msc offset calculation in window mode)

2018-05-04 Thread Mario Kleiner
Hi ajax, this one just sent out: "[PATCH xserver] modesetting: Remove ms_crtc_msc_to_kernel_msc().", should really make it into server 1.20, as it did bad things during my testing yesterday. Looking at the counterpart ms_kernel_msc_to_crtc_msc() in current modesetting-ddx makes me a bit nervous

[PATCH xserver] modesetting: Remove ms_crtc_msc_to_kernel_msc().

2018-05-04 Thread Mario Kleiner
The function is ported from intel-ddx uxa backend around 2013, where its stated purpose was to apply a vblank_offset to msc values to correct for problems with those kernel provided msc values. Some (somewhat magic and puzzling to myself) heuristic tried to guess if provided values were

Re: [RFC xserver] xwayland: persistent window struct on present

2018-05-04 Thread Roman Gilg
Thanks for the testing Olivier. That's great news because the code change was written rather hastily and I hadn't tested it extensively yet. I just wanted to get some early feedback on the overall design. But using separate persistent window structs is just more robust than using xwl_window,

Re: [RFC xserver] xwayland: persistent window struct on present

2018-05-04 Thread Olivier Fourdan
Hi Roman, On Fri, May 4, 2018 at 3:07 AM, Roman Gilg wrote: > Instead of reusing xwl_window introduce a persistent window struct for > every > window, that asks for Present flips. > > This struct saves all relevant data and is only freed on window destroy. > > Signed-off-by: