1. 11 Nov, 2019 4 commits
    • Alex Goins's avatar
      modesetting: Implement ms_covering_randr_crtc() for ms_present_get_crtc() · 562c7888
      Alex Goins authored
      
      
      ms_present_get_crtc() returns an RRCrtcPtr, but derives it from a xf86CrtcPtr
      found via ms_dri2_crtc_covering_drawable()=>ms_covering_crtc(). As a result, it
      depends on all associated DIX ScreenRecs having an xf86CrtcConfigPtr DDX
      private.
      
      Some DIX ScreenRecs don't have an xf86CrtcConfigPtr DDX private, but do have an
      rrScrPrivPtr DDX private. Given that we can derive all of the information we
      need from RandR, we can support these screens by avoiding the use of xf86Crtc.
      This change implements an RandR-based path for ms_present_get_crtc(), allowing
      drawables to successfully fall back to syncing to the primary output, even if
      the slave doesn't have an xf86CrtcConfigPtr DDX private.
      
      Without this change, if a slave doesn't have an xf86CrtcConfigPtr DDX private,
      drawables will fall back to 1 FPS if they overlap an output on that slave.
      Signed-off-by: Alex Goins's avatarAlex Goins <agoins@nvidia.com>
      562c7888
    • Alex Goins's avatar
      modesetting: Fix ms_covering_crtc() segfault with non-xf86Crtc slave · 797e7a0c
      Alex Goins authored
      
      
      DIX ScreenRecs don't necessarily have an xf86CrtcConfigPtr DDX private.
      ms_covering_crtc() assumes that they do, which can result in a segfault.
      
      Update ms_covering_crtc() to check the XF86_CRTC_CONFIG_PTR() returned pointer
      before dereferencing it. This will still mean that ms_covering_crtc() can't fall
      back to the primary output when a drawable overlaps a slave output (going to the
      1 FPS default instead), but it won't segfault.
      Signed-off-by: Alex Goins's avatarAlex Goins <agoins@nvidia.com>
      797e7a0c
    • Alex Goins's avatar
      modesetting: Fix ms_covering_crtc() segfault with non-modesetting slave primary · 3ef9029a
      Alex Goins authored
      
      
      ms_covering_crtc() uses RRFirstOutput() to determine a primary output to fall
      back to if a drawable is overlapping a slave output.
      
      If the primary output is a slave output, RRFirstOutput() will return a slave
      output even if passed a master ScreenPtr. ms_covering_crtc() dereferences the
      output's devPrivate, which is invalid for non-modesetting outputs, and can
      crash.
      
      Changing RRFirstOutput() could have unintended side effects for other callers,
      so this change replaces the call to RRFirstOutput() with ms_first_output().
      ms_first_output() ignores the primary output if it doesn't match the given
      ScreenPtr, choosing the first connected output instead.
      Signed-off-by: Alex Goins's avatarAlex Goins <agoins@nvidia.com>
      3ef9029a
    • Alex Goins's avatar
      randr: Fix RRCrtcDetachScanoutPixmap() segfault during server teardown · c82f8143
      Alex Goins authored
      
      
      During server teardown, mrootdraw is NULL, which can cause segfaults if
      master->Stop{,Flipping}PixmapTracking() don't do NULL checking. In this case we
      shouldn't need to do master->Stop{,Flipping}PixmapTracking() anyway, so just
      skip it.
      Signed-off-by: Alex Goins's avatarAlex Goins <agoins@nvidia.com>
      c82f8143
  2. 10 Nov, 2019 1 commit
  3. 08 Nov, 2019 4 commits
  4. 07 Nov, 2019 1 commit
    • Dor Askayo's avatar
      xwayland: clear pixmaps after creation in rootless mode · 0e9a0c20
      Dor Askayo authored
      
      
      When a pixmap is created with a backing FBO, the FBO should be cleared
      to avoid rendering uninitialized memory. This could happen when the
      pixmap is rendered without being filled in its entirety.
      
      One example is when a top-level window without a background is
      resized. The pixmap would be reallocated to prepare for more pixels,
      but uninitialized memory would be rendered in the resize offset until
      the client sends a frame that fills these additional pixels.
      
      Another example is when a new top-level window is created without a
      background. Uninitialized memory would be rendered after the pixmap is
      allocated and before the client sends its first frame.
      
      This issue is only apparent in OpenGL implementations that don't zero
      the VRAM of allocated buffers by default, such as RadeonSI.
      Signed-off-by: Dor Askayo's avatarDor Askayo <dor.askayo@gmail.com>
      Closes: xorg/xserver#636
      
      Reviewed-by: Michel Dänzer's avatarMichel Dänzer <mdaenzer@redhat.com>
      0e9a0c20
  5. 06 Nov, 2019 1 commit
  6. 05 Nov, 2019 1 commit
  7. 04 Nov, 2019 1 commit
    • Hans de Goede's avatar
      glamor/xwayland: Define EGL_NO_X11 · 741bd734
      Hans de Goede authored
      
      
      Define EGL_NO_X11 everywhere were we also define MESA_EGL_NO_X11_HEADERS,
      EGL_NO_X11 is the MESA_EGL_NO_X11_HEADERS equivalent for the egl headers
      shipped with libglvnd.
      
      This fixes the xserver not building with the libglvnd-1.2.0 headers:
      
      In file included from /usr/include/EGL/eglplatform.h:128,
                       from /usr/include/epoxy/egl_generated.h:11,
                       from /usr/include/epoxy/egl.h:46,
                       from glamor_priv.h:43,
                       from glamor_composite_glyphs.c:25:
      /usr/include/X11/Xlib.h:222:2: error: conflicting types for 'GC'
        222 | *GC;
            |  ^~
      In file included from glamor.h:34,
                       from glamor_priv.h:32,
                       from glamor_composite_glyphs.c:25:
      ../include/gcstruct.h:282:3: note: previous declaration of 'GC' was here
        282 | } GC;
            |   ^~
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      741bd734
  8. 30 Oct, 2019 18 commits
  9. 29 Oct, 2019 2 commits
  10. 26 Oct, 2019 1 commit
  11. 23 Oct, 2019 1 commit
  12. 16 Oct, 2019 1 commit
  13. 15 Oct, 2019 4 commits