1. 20 Jun, 2018 1 commit
  2. 13 Jun, 2018 2 commits
  3. 24 May, 2018 1 commit
  4. 19 May, 2018 5 commits
  5. 10 May, 2018 1 commit
  6. 09 May, 2018 1 commit
    • Aaron Plattner's avatar
      meson: Fix module_dir configuration (v2) · b6bf68b8
      Aaron Plattner authored
      meson.build has code to set the module_dir variable to
      ${libdir}/xorg/modules if the module_dir option string is empty.
      However, this has several problems:
      
      1. The variable is only used for an unused @moduledir@ substitution in
         the man page. The rule for xorg-server.pc uses option('module_dir')
         directly instead.
      2. The 'module_dir' option has a default value of 'xorg/modules' so the
         above rule doesn't do anything by default.
      3. The xorg-server.pc rule uses ${exec_prefix}/option('module_dir'), so
         the effect of #2 is that the default moduledir is different between
         autoconf and meson. E.g. if ${prefix} is /X, then you get
      
           autoconf: moduledir=/X/lib/xorg/modules
           meson:    moduledir=/X/xorg/modules
      
      Fix this by using the module_dir variable when generating xorg-server.pc, and by
      using join_paths() to assign module_dir unconditionally.
      
      v2: Keep the 'xorg/modules' default path, but use join_paths() unconditionally (Thierry Reding)
      Signed-off-by: 's avatarAaron Plattner <aplattner@nvidia.com>
      Reviewed-by: 's avatarPeter Hutterer <peter.hutterer@who-t.net>
      b6bf68b8
  7. 08 May, 2018 11 commits
  8. 07 May, 2018 6 commits
    • Roman Gilg's avatar
      xwayland: persistent window struct on present · cf838f5c
      Roman Gilg authored
      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: 's avatarRoman Gilg <subdiff@gmail.com>
      Tested-by: 's avatarOlivier Fourdan <ofourdan@redhat.com>
      cf838f5c
    • Mario Kleiner's avatar
      modesetting: Fix and improve ms_kernel_msc_to_crtc_msc() · c9afd8cb
      Mario Kleiner authored
      The old 32-Bit wraparound handling didn't actually work, due to some
      integer casting bug, and the mapping was ill equipped to deal with input
      from the new true 64-bit GetCrtcSequence/QueueCrtcSequence api's
      introduced in Linux 4.15.
      
      For 32-Bit truncated input from pageflip events and old vblank events
      and old drmWaitVblank ioctl, implement new wraparound handling, which
      also allows to deal with wraparound in the other direction, e.g., if a
      32-Bit truncated sequence value is passed in, whose true 64-Bit
      in-kernel hw value is within 2^30 counts of the previous processed
      value, but whose 32-bit truncated sequence value happens to lie just
      above or below a 2^32 boundary, iow. one of the two values 'sequence'
      vs. 'msc_prev' lies above a 2^32 border, the other one below it.
      
      The method is directly translated from Mesa's proven implementation of
      the INTEL_swap_events extension, where a true underlying 64-Bit wide
      swapbuffers count (SBC) needs to get reconstructed from a 32-Bit LSB
      truncated SBC transported over the X11 protocol wire. Same conditions
      apply, ie. successive true 64-Bit SBC values are close to each other,
      but don't always get received in strictly monotonically increasing
      order. See Mesa commit cc5ddd584d17abd422ae4d8e83805969485740d9 ("glx:
      Handle out-of-sequence swap completion events correctly. (v2)") for
      explanation.
      
      Additionally add a separate path for true 64-bit msc input originating
      from Linux 4.15+ drmCrtcGetSequence/QueueSequence ioctl's and
      corresponding 64-bit vblank events. True 64-bit msc's don't need
      remapping and must be passed through.
      
      As a reliability bonus, they are also used here to update the tracking
      values msc_prev and ms_high with perfect 64-Bit ground truth as baseline
      for mapping msc from pageflip completion events, because pageflip events
      are always 32-bit wide, even when the new kernel api's are used. Because
      each pageflip(-event) is always preceeded close in time (and vblank
      count) by a drmCrtcQueueSequence queued event or drmCrtcGetSequence
      query as part of DRI2 or DRI3+Present swap scheduling, we can be certain
      that each pageflip event will get its truncated 32-bit msc remapped
      reliably to the true 64-bit msc of flip completion whenever the sequence
      api is available, ie. on Linux 4.15 or later.
      
      Note: In principle at least the 32-bit mapping path could also be
      backported to earlier server branches, as this seems to be broken for at
      least server 1.16 to 1.19.
      Signed-off-by: 's avatarMario Kleiner <mario.kleiner.de@gmail.com>
      Reviewed-by: 's avatarAdam Jackson <ajax@redhat.com>
      Cc: Keith Packard <keithp@keithp.com>
      Cc: Michel Dänzer <michel.daenzer@amd.com>
      c9afd8cb
    • Mario Kleiner's avatar
      modesetting: Remove ms_crtc_msc_to_kernel_msc(). · 73f0ed2d
      Mario Kleiner authored
      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
      unreasonable and tried to adapt the corrective vblank_offset to account
      for that.
      
      Except: It wasn't applied to kernel provided msc values, but the values
      delivered by clients via DRI2 or Present, so valid client targetmsc
      values, e.g., requesting a vblank event > 1000 vblanks in the future,
      triggered the offset correction in arbitrarily wrong ways, leading to
      wrong msc values being returned and thereby vblank events queued to the
      kernel for the wrong time. This causes glXSwapBuffersMscOML and
      glXWaitForMscOML to swap / return immediately whenever a swap/wait in >
      1000 vblanks is requested.
      
      The original code was also written to only deal with 32 bit mscs, but
      server 1.20 modesetting ddx can now use new Linux 4.15+ kernel vblank
      api to process true 64 bit msc's, which may confuse the heuristic even
      more due to 32 bit integer truncation/wrapping.
      
      This code caused various problems in the intel-ddx in the past since
      year 2013, and was removed there in 2015 by Chris Wilson in commit
      42ebe2ef9646be5c4586868cf332b4cd79bb4618:
      
      "    uxa: Remove the filtering of bogus Present MSC values
      
          If the intention was to filter the return values from the kernel, the
          filtering would have been applied to the kernel values and not to the
          incoming values from Present. This filtering introduces crazy integer
          promotion and truncation bugs all because Present feeds garbage into its
          vblank requests.
      
      "
      
      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
      cope relatively well with that, modesetting ddx causes KDE-5's
      plasmashell to lock up badly quite frequently, and my suspicion is that
      the code removed in this commit is one major source of the extra
      fragility.
      
      Also my own tests fail for any swap scheduled more than 1000 vblanks
      into the future, which is not uncommon for some scientific applications.
      
      Iow. modesetting's swap scheduling seems to be more robust without this
      function afaics.
      Signed-off-by: 's avatarMario Kleiner <mario.kleiner.de@gmail.com>
      Reviewed-by: 's avatarAdam Jackson <ajax@redhat.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Keith Packard <keithp@keithp.com>
      Tested-by: 's avatarMike Lothian <mike@fireburn.co.uk>
      73f0ed2d
    • Aaron Plattner's avatar
      meson: Set XCONFIGFILE to 'xorg.conf' instead of '/etc/xorg.conf' · f5ded22e
      Aaron Plattner authored
      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", ..., XConfigFile="xorg.conf")
      
      This returns "/etc/X11/xorg.conf".
      
      The Meson build, on the other hand, sets XCONFIGFILE to
      join_paths(get_option('sysconfdir'), 'xorg.conf'). If sysconfdir is /etc, this
      results in '/etc/xorg.conf', resulting in DoSubstitution returning
      '/etc/X11/etc/xorg.conf'.
      
      Fix this by just hard-coding XCONFIGFILE to 'xorg.conf'.
      Signed-off-by: 's avatarAaron Plattner <aplattner@nvidia.com>
      Reviewed-by: 's avatarThierry Reding <treding@nvidia.com>
      f5ded22e
    • Aaron Plattner's avatar
      meson: Define DEFAULT_LIBRARY_PATH as join_paths(get_option('prefix'), get_option('libdir')) · 1a3e4a2f
      Aaron Plattner authored
      '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: 's avatarAaron Plattner <aplattner@nvidia.com>
      Reviewed-by: 's avatarThierry Reding <treding@nvidia.com>
      1a3e4a2f
    • Anuj Phogat's avatar
      dri2: Sync i965_pci_ids.h from mesa · 1dcd784a
      Anuj Phogat authored
      Copied from Mesa with no modifications.
      
      Gives us Cofeelake platform names updates and sync on Kaby Lake,
      Ice Lake PCI IDs.
      Acked-by: 's avatarKenneth Graunke <kenneth@whitecape.org>
      Signed-off-by: 's avatarAnuj Phogat <anuj.phogat@gmail.com>
      1dcd784a
  9. 04 May, 2018 1 commit
  10. 03 May, 2018 2 commits
  11. 02 May, 2018 4 commits
  12. 30 Apr, 2018 5 commits