cros_gralloc: Fix gralloc -> gbm usage flag mapping
GRALLOC_USAGE_SW_READ_RARELY was incorrectly mapped to
BO_USE_SW_READ_OFTEN since GRALLOC_USAGE_SW_READ_OFTEN (== 3) contains
GRALLOC_USAGE_SW_READ_RARELY (== 2) in bit mask. Fix it by making the
flag check compare the full bit mask.
Same for the WRITE case.
BUG=None
TEST=CQ
Change-Id: I0c1e0e6f07978b6090472b2d470f5880ad231d0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5907583
Reviewed-by: Jason Macnak <natsu@google.com>
Tested-by: Ren-Pei Zeng <kamesan@chromium.org>
Commit-Queue: Ren-Pei Zeng <kamesan@chromium.org>
1 file changed