[RFC][PATCH 4/4 v2] drm_hwcomposer: Try to fallback if GLCompisition fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When using drm_hwcomposer with the hikey board, the resulting
display shows lots of tearing.

This seems to be due to EGLcomposition not initializing
properly, potentially due to I'm guessing limitations of what
the  utgard mali driver can do. I've noted that with the
HiKey960 board, this patch is *not* necessary.

Hacking around a bit, I found that since the glworker code
isn't running properly, we never call glFinish(), which
is required to fix the tearing.

Ideas for a better way to implement this would be greatly
appreciated!

Cc: Marissa Wall <marissaw@xxxxxxxxxx>
Cc: Sean Paul <seanpaul@xxxxxxxxxx>
Cc: Dmitry Shmidt <dimitrysh@xxxxxxxxxx>
Cc: Robert Foss <robert.foss@xxxxxxxxxxxxx>
Cc: Matt Szczesiak <matt.szczesiak@xxxxxxx>
Cc: Liviu Dudau <Liviu.Dudau@xxxxxxx>
Cc: David Hanna <david.hanna11@xxxxxxxxx>
Cc: Rob Herring <rob.herring@xxxxxxxxxx>
Signed-off-by: John Stultz <john.stultz@xxxxxxxxxx>
---
v2:
* Simplified, focusing on the key glFinsh() call
---
 drmdisplaycompositor.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp
index 3a20b31..eb0b77a 100644
--- a/drmdisplaycompositor.cpp
+++ b/drmdisplaycompositor.cpp
@@ -439,6 +439,10 @@ int DrmDisplayCompositor::PrepareFrame(DrmDisplayComposition *display_comp) {
 
       fb.set_release_fence_fd(ret);
       ret = 0;
+    } else {
+      /*If we're not doing anything, block to avoid tearing */
+      glFinish();
+      return 0;
     }
   }
 
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux