1. 04 Aug, 2013 1 commit
  2. 03 Aug, 2013 1 commit
  3. 31 Jul, 2013 3 commits
  4. 30 Jul, 2013 1 commit
  5. 29 Jul, 2013 1 commit
  6. 26 Jul, 2013 2 commits
    • Siarhei Siamashka's avatar
      DRI2: CPU copy fallback path does not drop half of the frames anymore · 0fd7d5de
      Siarhei Siamashka authored
      The recent commit 9e0a8731
      
       (its part
      that suppressed buffers reuse in the Xorg DRI2 framework) introduced
      a regression. Half of the frames stoppped reaching the screen on
      the CPU copy fallback path because the Mali blob now ended up
      rendering them to the "wrong" buffer.
      
      It just confirms that we need to completely move from the standard
      DRI2 framework in the Xorg server to our own buffers bookkeeping
      logic. This patch fixes the regression by introducing a single UMP
      buffer per window, which is shared between back and front DRI2
      buffers. We can do this because double buffering does not make much
      sense on the fallback path at the moment (we can't set scanout from
      this buffer and anyway have to copy this data elsewhere immediately
      after we get it from Mali).
      Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
      0fd7d5de
    • Siarhei Siamashka's avatar
      DRI2: only pay attention to back buffers requests · 7994a0f3
      Siarhei Siamashka authored
      
      
      Bail out earlier for the uninteresting types of DRI2 buffer
      requests (by just returning a dummy null UMP buffer). Makes
      the code a bit more simple on the common path.
      Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
      7994a0f3
  7. 24 Jul, 2013 2 commits
    • Siarhei Siamashka's avatar
      DRI2: Refine the workaround for Mali r3p0 window resizing issue · d59ae8a7
      Siarhei Siamashka authored
      
      
      Using the secure id 1 (framebuffer) to trick the Mali blob into
      requesting DRI2 buffers again was not a very good idea. The problem
      is that the blob still writes something there and corrupts the
      framebuffer. So instead we try to assign secure id 2 to a dummy
      4KiB UMP buffer allocated in memory and use it for the same purpose.
      Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
      d59ae8a7
    • Siarhei Siamashka's avatar
      DRI2: Workaround window resize bug in Mali r3p0 blob · 9e0a8731
      Siarhei Siamashka authored
      The Mali blob is doing something like this:
      
       1. Request BackLeft DRI2 buffer (buffer A) and render to it
       2. Swap buffers
       3. Request BackLeft DRI2 buffer (buffer B)
       4. Check window size, and if it has changed - go back to step 1.
       5. Render to the current back buffer (either buffer A or B)
       6. Swap buffers
       7. Go back to step 4
      
      A very serious show stopper problem is that the Mali blob ignores
      DRI2-InvalidateBuffers events and just uses GetGeometry polling
      to check whether the window size has changed. Unfortunately this
      is racy and we may end up with a size mismatch between buffer A
      and buffer B. This is particularly easy to trigger when the window
      size changes exactly between steps 1 and 3.
      
      See test/gles-yellow-blue-flip.c program which demonstrates this.
      Qt5 applications also trigger this bug.
      
      We workaround the issue by explicitly tracking the requests for
      BackLeft buffers and checking whether the sizes of these buffers
      match at step 1 and step 3. However the real challenge here is
      notifying the client application that these buffers are no good,
      so that it can request them again. As DRI2-InvalidateBuffers
      events are ignored, we are in a pretty difficult situation.
      Fortunately I remembered a weird behaviour observed earlier:
      
          https://groups.google.com/forum/#!msg/linux-sunxi/qnxpVaqp1Ys/aVTq09DVih0J
      
      
      
      Actually if we return UMP secure ID value 1 for the second DRI2
      buffer request, the blob responds to this by spitting out the
      following error message:
      
          [EGL-X11] [2274] DETECTED ONLY ONE FRAMEBUFFER - FORCING A RESIZE
          [EGL-X11] [2274] DRI2 UMP ID 0x3 retrieved
          [EGL-X11] [2274] DRI2 WINDOW UMP SECURE ID CHANGED (0x3 -> 0x3)
      
      And then it proceeds by re-trying to request a pair of DRI2 buffers.
      But that's exactly the behaviour we want! As a down side, some ugly
      flashing can be seen on screen at the time when this workaround kicks
      in, but then everything normalizes. And unfortunately, the race
      condition is still not totally eliminated because the blob is
      apparently getting DRI2 buffer sizes from the separate GetGeometry
      requests instead of using the information provided by DRI2GetBuffers.
      But now the problem is at least very hard to trigger.
      Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
      9e0a8731
  8. 10 Jun, 2013 1 commit
  9. 16 Mar, 2013 1 commit
  10. 11 Mar, 2013 1 commit
  11. 23 Feb, 2013 1 commit
  12. 18 Feb, 2013 1 commit
    • Siarhei Siamashka's avatar
      Disable hardware layers when software ARGB cursor is used · 0ab0a9e8
      Siarhei Siamashka authored
      
      
      The modern desktops may use ARGB cursors. As the current
      sunxi display controller support code can't handle this
      type of cursor yet, the X server fallbacks to a software
      cursor which is not visible under layers and ruining user
      experience.
      
      This patch adds empty implementations for "UseHWCursorARGB"
      and "LoadCursorARGB" functions which just return error for
      now (so that the X server still fallbacks to software cursor).
      However we also introduce callback functions responsible for
      notifying the DRI2 code about enabling/disabling the use of
      hardware cursor. So that now hardware overlays are disabled
      when switching to software cursor and re-enabled again when
      switching back to hardware cursor.
      Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
      0ab0a9e8
  13. 12 Feb, 2013 1 commit
  14. 24 Jan, 2013 1 commit