WIP: RFC: Adding CheckBuffer logic to avoid "expected" Import failures
Here's another pass at my current importer CheckBuffer logic to try to avoid "expected" Import failures (such as buffer resolutions larger then what the drm driver supports, or other constraints like CMA allocated buffers).
@seanpaul suggested this logic should really live in the Planner, but I'm a bit stumped on how that would work as the Planner is called much later - after the buffers are imported, the composition created/init'ed and after the layers have already been passed to the composition.
Its also pretty hacky as it just totally fails out of the CreateComposition() call if CheckBuffer fails on any hwclayer. Ideally it probably should degrade that layer to client composition, and try to continue on, but the current logical split between what is done in CreateComposition (as well as deeper down in CommitFrame) and in Validate makes it hard to do much else then just error out.
So I suspect a better fix would require combining the logic in Validate and CreateComposition to work together a bit better and to allow reworking the order that the composition is created so that we can call on the Planner before we try to Import buffers that we know will fail.
So yea, sort of just pushing this out there to get more thoughts on the right approach.