minigbm: cros_gralloc: handle video decoder flag

Although gralloc0 doesn't include a video decoder flag, the IAllocator
gralloc0 passthrough gives the lower 32 bits of the BufferUsage flags
to gralloc0. This change makes cros_gralloc add the video decoder BO_USE
flag when that happens. It also adds some missing combinations for when
the BO_USE_HW_VIDEO_DECODER flag is actually set.

Change-Id: If2248f33ac2456c077fe63e90d2c39e7f57e2568
Reviewed-on: https://chromium-review.googlesource.com/1786419
Tested-by: David Stevens <stevensd@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
diff --git a/i915.c b/i915.c
index 3639eaa..ff5c66d 100644
--- a/i915.c
+++ b/i915.c
@@ -144,7 +144,8 @@
 	 * Video Encoder Accelerator (VEA). It could also support NV12 potentially in the future.
 	 */
 	drv_modify_combination(drv, DRM_FORMAT_YVU420, &metadata, BO_USE_HW_VIDEO_ENCODER);
-	drv_modify_combination(drv, DRM_FORMAT_NV12, &metadata, BO_USE_HW_VIDEO_ENCODER);
+	drv_modify_combination(drv, DRM_FORMAT_NV12, &metadata,
+			       BO_USE_HW_VIDEO_ENCODER | BO_USE_HW_VIDEO_DECODER);
 
 	/* Android CTS tests require this. */
 	drv_add_combination(drv, DRM_FORMAT_BGR888, &metadata, BO_USE_SW_MASK);