1. 30 Jan, 2019 2 commits
    • Michel Dänzer's avatar
      present/wnmd: Allow flipping if the window pixmap matches the toplevel's · a093a885
      Michel Dänzer authored
      Instead of testing window->redirectDraw.
      
      With Xwayland, the toplevel window is always redirected, so this would
      unnecessarily preclude flipping there in some cases, e.g. with wlroots
      based Wayland compositors or with fullscreen X11 windows in weston.
      
      Fixes issue #631.
      a093a885
    • Adam Jackson's avatar
      dri2: Stop pretending VGA arbitration matters · ff560488
      Adam Jackson authored
      The VGA arbiter controls the PCI bus' routing of legacy VGA resources,
      specifically the video memory aperture at 0xa0000-0xb0000 (640k should
      be etc.) and a handful of I/O ports. Since 128k is far too small for a
      real framebuffer these days, every driver instead maps a linear version
      of VRAM through the PCI BAR. And no DRI2 drivers ever need I/O port
      access, because all operations they might be used for (legacy VGA CRTC
      setup, mostly) happen on the kernel side.
      
      In other words, this just works, and we can stop breaking it.
      Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      ff560488
  2. 26 Jan, 2019 1 commit
    • A. Wilcox's avatar
      DRI2: Add another Coffeelake PCI ID · d3a26bbf
      A. Wilcox authored
      A user of Adélie Linux reported that modesetting wasn't working properly on
      their Intel i7-9700K-integrated UHD 630 GPU.  Xorg.0.log showed:
      
      [   131.902] (EE) modeset(0): [DRI2] No driver mapping found for PCI device 0x8086 / 0x3e98
      [   131.902] (EE) modeset(0): Failed to initialize the DRI2 extension.
      
      Indeed, that PCI ID is missing from i965_pci_ids.  Adding it fixed the issue
      and allowed the system to work with i965_dri under modesetting.
      d3a26bbf
  3. 16 Jan, 2019 4 commits
  4. 11 Jan, 2019 2 commits
  5. 10 Jan, 2019 4 commits
  6. 09 Jan, 2019 1 commit
    • Olivier Fourdan's avatar
      xwayland: handle case without any crtc · e8295c50
      Olivier Fourdan authored
      Xwayland creates and destroys the CRTC along with the Wayland outputs,
      so there is possibly a case where the number of CRTC drops to 0.
      
      However, `xwl_present_get_crtc()` always return `crtcs[0]` which is
      invalid when `numCrtcs` is 0.
      
      That leads to crash if a client queries the Present capabilities when
      there is no CRTC, the backtrace looks like:
      
        #0  raise() from libc.so
        #1  abort() from libc.so
        #2  OsAbort() at utils.c:1350
        #3  AbortServer() at log.c:879
        #4  FatalError() at log.c:1017
        #5  OsSigHandler() at osinit.c:156
        #6  OsSigHandler() at osinit.c:110
        #7  <signal handler called>
        #8  main_arena() from libc.so
        #9  proc_present_query_capabilities() at present_request.c:236
        #10 Dispatch() at dispatch.c:478
        #11 dix_main() at main.c:276
      
      To avoid returning an invalid pointer (`crtcs[0]`) in that case, simply
      check for `numCrtcs` being 0 and return `NULL` in that case.
      
      Thanks to Michel Dänzer <michel.daenzer@amd.com> for pointing this as a
      possible cause of the crash.
      Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
      Reviewed-by: Michel Dänzer's avatarMichel Dänzer <michel.daenzer@amd.com>
      Bugzilla: https://bugzilla.redhat.com/1609181
      e8295c50
  7. 07 Jan, 2019 1 commit
  8. 02 Jan, 2019 1 commit
  9. 21 Dec, 2018 1 commit
  10. 20 Dec, 2018 2 commits
  11. 17 Dec, 2018 5 commits
  12. 14 Dec, 2018 2 commits
  13. 12 Dec, 2018 2 commits
  14. 11 Dec, 2018 3 commits
  15. 29 Nov, 2018 3 commits
    • Adam Jackson's avatar
    • Lionel Landwerlin's avatar
    • Lyude Paul's avatar
      modesetting: Actually disable CRTCs in legacy mode · 7a44e8d4
      Lyude Paul authored
      Believe it or not, somehow we've never done this in legacy mode! We
      currently simply change the DPMS property on the CRTC's output's
      respective DRM connector, but this means that we're just setting the
      CRTC as inactive-not disabled. From the perspective of the kernel, this
      means that any shared resources used by the CRTC are still in use.
      
      This can cause problems for drivers that are not yet fully atomic,
      despite using the atomic helpers internally. For instance: if CRTC-1 and
      CRTC-2 are still enabled and use shared resources within the kernel (an
      MST topology, for example), and then userspace tries to go enable CRTC-3
      on the same topology this might suddenly fail if CRTC-3 needs the shared
      resources CRTC-1 and CRTC-2 are using. While I don't know of any
      situations in the mainline kernel that actually trigger this, future
      plans for reworking the atomic check of MST drivers are absolutely
      going to make this into a real issue (they already are in my WIP
      branches for the kernel).
      
      So: actually do the right thing here and disable CRTCs when they're not
      going to be used anymore, even in legacy mode.
      Signed-off-by: Lyude Paul's avatarLyude Paul <lyude@redhat.com>
      7a44e8d4
  16. 25 Nov, 2018 2 commits
  17. 19 Nov, 2018 4 commits
    • Michel Dänzer's avatar
      xwayland: Don't take buffer release queue into account for frame timer · e6cd1c9b
      Michel Dänzer authored
      The buffer release queue has two kinds of entries:
      
      * Pending async flips.
      * Completed flips waiting for their buffer to be released by the Wayland
        compositor.
      
      xwl_present_timer_callback neither completes async flips nor releases
      buffers, so the timer isn't needed for the buffer release queue.
      e6cd1c9b
    • Michel Dänzer's avatar
      xwayland: Don't need xwl_window anymore in xwl_present_queue_vblank · f5416153
      Michel Dänzer authored
      Fixes issue #12. Presumably the problem was that Present operations on
      unmapped windows were executed immediately instead of only when reaching
      the target MSC.
      f5416153
    • Michel Dänzer's avatar
      xwayland: Add xwl_present_unrealize_window · 8c953857
      Michel Dänzer authored
      When a window is unrealized, a pending frame callback may never be
      called, which could result in repeatedly freezing until the frame timer
      fires after a second.
      
      Fixes these symptoms when switching from fullscreen to windowed mode in
      sauerbraten.
      8c953857
    • Michel Dänzer's avatar
      xwayland: Replace xwl_window::present_window with ::present_flipped · 6b016d58
      Michel Dänzer authored
      There's no need to keep track of the window which last performed a
      Present flip. This fixes crashes due to the assertion in
      xwl_present_flips_stop failing. Fixes issue #10.
      
      The damage generated by a flip only needs to be ignored once, then
      xwl_window::present_flipped can be cleared. This may fix freezing in
      the (hypothetical) scenario where Present flips are performed on a
      window, followed by other drawing requests using the window as the
      destination, but nothing triggering xwl_present_flips_stop. The damage
      from the latter drawing requests would continue being ignored.
      6b016d58