hwc2: Add input sanity checks

Add input sanity checks and return appropriate error codes.

CRs-Fixed: 2114346
Change-Id: I09cd043e3bc8289e15a922e4c967dc5c66e49c17
9 files changed