[RFC][PATCH 1/2] drm_hwcomposer: Cleanup gl precompositor init and provide uses_GL flag
Rob Herring
robh at kernel.org
Tue Apr 24 01:30:58 UTC 2018
Please use "PATCH hwc" for drm_hwcomposer patches.
On Mon, Apr 23, 2018 at 7:06 PM, John Stultz <john.stultz at linaro.org> wrote:
> The drm_hwcomposer has its own GL pre-compositor which is used
> to squish layers when there are more layers then planes on the
> display hardware. In many ways this duplicates the client-side
> GL compositing that is done in SurfaceFlinger, but in theory can
> be more highly optimized for the hardware.
>
> Unfortunately, due to these optimizations, the drm_hwcomposer's
> pre-compositor becomes somewhat hardware specific (originally
> targeting nvidia hardware, I believe).
>
> So on some hardware, the gl precompositor may not actually
> initialize due to hardware missing features, or the hardware
> supporting different shader APIs.
>
> Rather then try to rework the drm_hwcomposers precompositor
> to be more generic, I instead suggest that when the
> precompositor fails to initialize, we simply fall back to the
> already more widely compatible client compositor in
> SurfaceFlinger.
>
> Thus, this patch cleans up some of the precompositor
> initialization, which didn't handle failures well.
>
> Feedback or alternative ideas would be greatly appreciated!
>
> Cc: Marissa Wall <marissaw at google.com>
> Cc: Sean Paul <seanpaul at google.com>
> Cc: Dmitry Shmidt <dimitrysh at google.com>
> Cc: Robert Foss <robert.foss at collabora.com>
> Cc: Matt Szczesiak <matt.szczesiak at arm.com>
> Cc: Liviu Dudau <Liviu.Dudau at arm.com>
> Cc: David Hanna <david.hanna11 at gmail.com>
> Cc: Rob Herring <rob.herring at linaro.org>
> Cc: Alexandru-Cosmin Gheorghe <Alexandru-Cosmin.Gheorghe at arm.com>
> Cc: Alistair Strachan <astrachan at google.com>
> Signed-off-by: John Stultz <john.stultz at linaro.org>
> ---
> drmdisplaycompositor.cpp | 40 +++++++++++++++++++++-------------------
> drmdisplaycompositor.h | 3 +++
> 2 files changed, 24 insertions(+), 19 deletions(-)
Both patches look good to me.
Reviewed-by: Rob Herring <robh at kernel.org>
More information about the dri-devel
mailing list