drm/msm/sde: add crtc per-commit rotator resource management

Move rotator resource management from plane state to crtc
state so that rotator can be migrated between planes in
back-to-back commits.

A per-commit resource pool is maintained in crtc state. Local
resources, such as framebuffer or framebffer object, as well
as global hardware block resource can be added to crtc resource
pool on per commit basis. Resources are automatically migrated
during state duplication. Any unused resources will be reclaimed
at the end of atomic check and returned to originated pool.

Resource spanning across multiple crtc commits are still managed
by global hardware block resource pool.

CRs-Fixed: 2009714
Change-Id: Ifdbbbf707ebe7bbb5cb1a84d93e22f0eb5eadbf1
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
7 files changed