Re: [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]

 



On Tue, Jan 23, 2018 at 03:16:39PM -0800, John Stultz wrote:
> 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!

Sounds like you'll have to dig into the gl compositor to fix this. I think
chances are quite good there's a better way than below.

Good luck!

> 
> 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
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
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