[RFC][PATCH 5/5] drm_hwcomposer: HACK: Fix tearing on hikey/hikey960

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

 



When using drm_hwcomposer with the hikey/hikey960 boards, the
resulting display shows lots of tearing.

I'm not much of an expert in how this code should work, but it
seems that we never call sync_wait(), and thus don't seem to be
handling the fences properly? I'm not sure.

Anyway, in a daze, I started cutting out code trying to make
sure we call the CreateNextTimelineFence() and
fb.set_release_fence_fd().

After doing so the tearing went away. I'm really not sure
what is wrong that requires these hacks. It may be the
hikey/hikey960 drm driver is incorrectly reporting or
handling something?

We do only have a single plane and no hardware compositing on
the boards, so we are having to force the gpu to do all the
compositing.

Any ideas for what a proper fix here would be? Or even just
hints on why this might make things work?

Change-Id: Ifba58f6f1cb00e5271892c0241e4891abe211f22
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>
---
 drmdisplaycompositor.cpp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp
index acd13b8..6c391d6 100644
--- a/drmdisplaycompositor.cpp
+++ b/drmdisplaycompositor.cpp
@@ -299,10 +299,11 @@ int DrmDisplayCompositor::ApplySquash(DrmDisplayComposition *display_comp) {
                                    display_comp->importer());
   pre_compositor_->Finish();
 
-  if (ret) {
+/*  if (ret) {
     ALOGE("Failed to squash layers");
     return ret;
   }
+*/
 
   ret = display_comp->CreateNextTimelineFence();
   if (ret <= 0) {
@@ -390,8 +391,8 @@ int DrmDisplayCompositor::PrepareFrame(DrmDisplayComposition *display_comp) {
   std::vector<DrmHwcLayer> &layers = display_comp->layers();
   std::vector<DrmCompositionPlane> &comp_planes =
       display_comp->composition_planes();
-  std::vector<DrmCompositionRegion> &squash_regions =
-      display_comp->squash_regions();
+//  std::vector<DrmCompositionRegion> &squash_regions =
+//      display_comp->squash_regions();
   std::vector<DrmCompositionRegion> &pre_comp_regions =
       display_comp->pre_comp_regions();
 
@@ -405,7 +406,7 @@ int DrmDisplayCompositor::PrepareFrame(DrmDisplayComposition *display_comp) {
   }
 
   int squash_layer_index = -1;
-  if (squash_regions.size() > 0) {
+  if (1) { //squash_regions.size() > 0) {
     squash_framebuffer_index_ = (squash_framebuffer_index_ + 1) % 2;
     ret = ApplySquash(display_comp);
     if (ret)
-- 
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