CHROMIUM: media: rk3288-vpu: Honor format number of planes in encoder

The encoder always assumes 3 planes, but we also advertise support for 1- and
2-plane formats, so honor them.

This fixes a null pointer dereference which happened when the driver
tries to get a DMA address of an out of bounds plane.

BUG=chromium:893530, chromium:894381
TEST=Run VEA unit test with NV12 input on veyron_minnie

Change-Id: I7141b4349c48df7dffd5f068e3c3c1a6daa9822c
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1293111
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
1 file changed