Lock gralloc buffers with SW_READ/SW_WRITE usage
EmulatedCameraDeviceSessionHwlImpl::ConfigurePipeline will default
some buffers to GRALLOC_USAGE_HW_CAMERA_[READ|WRITE].
This worked with existing Cuttlefish gralloc which ignored usage
flags and just always mmap'ed with PROT_READ|PROT_WRITE.
With upgrading Cuttlefish to Gralloc4 on Minigbm, the lack of
SW_READ|SW_WRITE will result in nothing being mmap'ed and a
nullptr will be returned from lock.
Bug: b/146515640
Test: cts -m CtsCameraTestCases
Change-Id: If308dc3037bb57becb7c44f997256ad65330c682
1 file changed