- 26 Jul, 2013 1 commit
-
-
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: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
- 24 Jul, 2013 2 commits
-
-
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: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
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: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
- 10 Jun, 2013 1 commit
-
-
Siarhei Siamashka authored
Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
- 16 Mar, 2013 1 commit
-
-
Siarhei Siamashka authored
Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
- 11 Mar, 2013 1 commit
-
-
Siarhei Siamashka authored
Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
- 23 Feb, 2013 1 commit
-
-
Siarhei Siamashka authored
Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
- 18 Feb, 2013 1 commit
-
-
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: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
- 12 Feb, 2013 1 commit
-
-
Siarhei Siamashka authored
Testing with gnome-shell revealed a problem. We need to migrate pixmaps into UMP buffers in order to allow the GLESv2 based compositing manager to actually access the content of redirected windows, rendered by X11 applications into offscreen pixmaps. Just to make sure that we don't add any unneeded overhead for 2D (neither extra CPU cycles nor the increase for unrelated pixmaps memory footprint), a hash table (currently uthash [1]) is used for connecting DRI2-enabled pixmaps with UMP buffers. The lookups are only performed on DRI2 buffer creation and pixmap destruction. 1. http://troydhanson.github.com/uthash/ Reported-by: Michal Suchanek <hramrach@gmail.com> Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
- 24 Jan, 2013 1 commit
-
-
Siarhei Siamashka authored
The driver can use sunxi display controller layers for fully visible windows, avoiding expensive memory copy.
-