1. 25 Jan, 2022 1 commit
    • Mario Kleiner's avatar
      Add option for non-vsynced flips for "secondary" outputs. · 65c12736
      Mario Kleiner authored
      
      
      This is a straightforward port of a patch with the same name
      "modesetting: Add option for non-vsynced flips for "secondary"
      outputs." from X-Server master / X-Server 21.1. See server MR 742.
      The description below is therefore identical to that X-Server commit:
      
      Whenever an unredirected fullscreen window uses pageflipping for a
      DRI3/Present PresentPixmap() operation and the X-Screen has more than
      one active output, multiple crtc's need to execute pageflips. Only
      after the last flip has completed can the PresentPixmap operation
      as a whole complete.
      
      If a sync_flip is requested for the present, then the current
      implementation will synchronize each pageflip to the vblank of
      its associated crtc. This provides tear-free image presentation
      across all outputs, but introduces a different artifact, if not
      all outputs run at the same refresh rate with perfect synchrony:
      The slowest output throttles the presentation rate, and present
      completion is delayed to flip completion of the "latest" output
      to complete. This means degraded performance, e.g., a dual-display
      setup with a 144 Hz monitor and a 60 Hz monitor will always be
      throttled to at most 60 fps. It also means non-constant present
      rate if refresh cycles drift against each other, creating complex
      "beat patterns", tremors, stutters and periodic slowdowns - quite
      irritating!
      
      Such a scenario will be especially annoying if one uses multiple
      outputs in "mirror mode" aka "clone mode". One output will usually
      be the "production output" with the highest quality and fastest
      display attached, whereas a secondary mirror output just has a
      cheaper display for monitoring attached. Users care about perfect
      and perfectly timed tear-free presentation on the "production output",
      but cares less about quality on the secondary "mirror output". They
      are willing to trade quality on secondary outputs away in exchange
      for better presentation timing on the "production output".
      
      One example use case for such production + monitoring displays are
      neuroscience / medical science applications where one high quality
      display device is used to present visual animations to test subjects
      or patients in a fMRI scanner room (production display), whereas
      an operator monitors the same visual animations from a control room
      on a lower quality display. Presentation timing needs to be perfect,
      and animations high-speed and tear-free for the production display,
      whereas quality and timing don't matter for the monitoring display.
      
      This commit gives users the option to choose such a trade-off as
      opt-in:
      
      It adds a new boolean option "AsyncFlipSecondaries" to the device section
      of xorg.conf. If this option is specified as true, then DRI3 pageflip
      behaviour changes as follows:
      
      1. The "reference crtc" for a windows PresentPixmap operation does a
         vblank synced flip, or a DRM_MODE_PAGE_FLIP_ASYNC non-synchronized
         flip, as requested by the caller, just as in the past. Typically
         flips will be requested to be vblank synchronized for tear-free
         presentation. The "reference crtc" is the one chosen by the caller
         to drive presentation timing (as specified by PresentPixmap()'s
         "target_msc", "divisor", "remainder" parameters and implemented by
         vblank events) and to deliver Present completion timestamps (msc
         and ust) extracted from its pageflip completion event.
      
      2. All other crtc's, which also page-flip in a multi-display configuration,
         will try to flip with DRM_MODE_PAGE_FLIP_ASYNC, ie. immediately and
         not synchronized to vblank. This allows the PresentPixmap operation
         to complete with little delay compared to a single-display present,
         especially if the different crtc's run at different video refresh
         rates or their refresh cycles are not perfectly synchronized, but
         drift against each other. The downside is potential tearing artifacts
         on all outputs apart from the one of the "reference crtc".
      
      Successfully tested on a AMD gpu with single-display and dual-display
      setups, and with single-X-Screen as well as dual-X-Screen "ZaphodHeads"
      configurations.
      
      Signed-off-by: Mario Kleiner's avatarMario Kleiner <mario.kleiner.de@gmail.com>
      65c12736
  2. 27 Aug, 2021 1 commit
  3. 30 Jul, 2021 1 commit
  4. 27 Apr, 2021 1 commit
  5. 02 Feb, 2021 1 commit
  6. 14 Dec, 2020 1 commit
  7. 28 Aug, 2020 1 commit
  8. 17 Jul, 2020 1 commit
  9. 10 Jul, 2020 1 commit
  10. 27 May, 2020 5 commits
  11. 21 Apr, 2020 1 commit
    • Michel Dänzer's avatar
      glamor: Make pixmap scanout compatible if its dimensions are · 0732f81a
      Michel Dänzer authored and Michel Dänzer's avatar Michel Dänzer committed
      Namely, if its dimensions match those of the screen pixmap (enough that
      it could stand in for it). When that's the case, the pixmap may end up
      being scanned out directly due to page flipping via the Present
      extension, e.g. with xfwm4 --vblank=xpresent .
      
      v2:
      * Use AMDGPU_CREATE_PIXMAP_SCANOUT instead of second-guessing in
        amdgpu_alloc_pixmap_bo, fixes corruption when resizing from smaller
        to larger virtual size via RandR.
      
      Closes: #10
      0732f81a
  12. 18 Mar, 2020 1 commit
  13. 16 Mar, 2020 11 commits
  14. 05 Feb, 2020 1 commit
    • Adam Jackson's avatar
      Fix link failure with gcc 10 · edcbe5f5
      Adam Jackson authored
      Without the 'extern' this looks like a definition not just a
      declaration, in every file that includes the header. gcc 10 is stricter
      about this kind of multiple definition.
      edcbe5f5
  15. 22 Nov, 2019 1 commit
  16. 11 Oct, 2019 1 commit
  17. 26 Sep, 2019 1 commit
    • Michel Dänzer's avatar
      Don't unreference FBs of pixmaps from different screens in LeaveVT · a1b72632
      Michel Dänzer authored
      FindClientResourcesByType finds pixmaps from all screens, but trying to
      process ones from other screens here makes no sense and likely results
      in a crash or memory corruption.
      
      Fixes: c16ff42f ("Make all active CRTCs scan out an all-black
                            framebuffer in LeaveVT")
      (Ported from radeon commit 2faaecc69b127248718e759c6c98c84d56dd1b6b)
      a1b72632
  18. 18 Sep, 2019 1 commit
  19. 07 Aug, 2019 3 commits
  20. 30 Jul, 2019 1 commit
  21. 05 Jul, 2019 1 commit
  22. 25 Jun, 2019 1 commit
  23. 14 Jun, 2019 2 commits