gralloc: Fix plane layout for RGB565
BUG=n/a
TEST=n/a
Change-Id: Id3254d66a83460618e994ab54673c51d56d00aec
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3291697
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Jason Macnak <natsu@google.com>
Commit-Queue: Jason Macnak <natsu@google.com>
diff --git a/cros_gralloc/gralloc4/CrosGralloc4Utils.cc b/cros_gralloc/gralloc4/CrosGralloc4Utils.cc
index 5fc9749..63ec8af 100644
--- a/cros_gralloc/gralloc4/CrosGralloc4Utils.cc
+++ b/cros_gralloc/gralloc4/CrosGralloc4Utils.cc
@@ -283,13 +283,13 @@
{DRM_FORMAT_RGB565,
{{
- .components = {{.type = android::gralloc4::PlaneLayoutComponentType_R,
+ .components = {{.type = android::gralloc4::PlaneLayoutComponentType_B,
.offsetInBits = 0,
.sizeInBits = 5},
{.type = android::gralloc4::PlaneLayoutComponentType_G,
.offsetInBits = 5,
.sizeInBits = 6},
- {.type = android::gralloc4::PlaneLayoutComponentType_B,
+ {.type = android::gralloc4::PlaneLayoutComponentType_R,
.offsetInBits = 11,
.sizeInBits = 5}},
.sampleIncrementInBits = 16,