OSDN Git Service

drm_hwcomposer: Fixup Sean's HiSi dummy planner
authorJohn Stultz <john.stultz@linaro.org>
Tue, 28 Aug 2018 05:24:40 +0000 (22:24 -0700)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 28 Aug 2018 21:28:39 +0000 (14:28 -0700)
commit60f5e32d4bd25ab8248b6f2f6199854bcf96b55a
treec565c93a0ff6535859c7da39ab3039448335e19c
parent54589d28d0b1ed8e4ea9b20bee25258e2918eb3d
drm_hwcomposer: Fixup Sean's HiSi dummy planner

The dummy HiSi Planner is careful to not try to emplace layers
that aren't HW_FB. However, in some cases we might have a single
layer to draw. In that case the dummy importer will pretend it
imported the buffer, and the planner will skip over it and not
emplace it. Since there were no errors and the layers_ count is
the same as the available planes, we won't force client
composition, and will try to do device composition for the
buffer we didn't really import.

This results in the drm layer going a bit wonky.

Thus, this patch tries to fix this by erroring out if we try to
plan only a single layer, but don't emplace anything. This
results in the CreateComposition() function failing, which will
force client rendering, making it work (with only minimal logcat
noise - only in the single layer case).

Change-Id: I563dbba3c2adce5617fae61cb0440368053e5bff
Signed-off-by: John Stultz <john.stultz@linaro.org>
platformhisi.cpp