OSDN Git Service

drm_hwcomposer: Propagate PlanStage error
authorAlexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Tue, 9 Oct 2018 15:25:28 +0000 (16:25 +0100)
committerAlexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Tue, 9 Oct 2018 16:05:09 +0000 (17:05 +0100)
commit2234d3770463adca2be1a8bd9496c28e50bb3dd1
tree17b1b648c821277e56607be173ebcb65c61a32dc
parent68a78ef6bd8b8ddf710e9a0654fa47cdc1f158d3
drm_hwcomposer: Propagate PlanStage error

All existing stage planers(PlanStageGreedy, PlanStageProtected,
PlanStageHiSi) silently ignore if they couldn't allocate a drmplane
for a drmhwclayer and return success.

That doesn't go well with the assumptions from ValidateDisplay,
where if the atomic check succeeds we just assume that we could do
Device composition for a maximum of num_of_drm_planes layers. But,
since we silently dropped some drmhwclayer we never put those in the
atomic check and we won't put it in the final atomic commit, so we end
up with a wrong composition on the screen.

What this proposes is propagating the error, which will make
ValidateDisplay to fallback on client composition.

Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
platform.cpp
platformhisi.cpp