gralloc:fix incorrect plane layout of DRM_FORMAT_XBGR8888

The format DRM_FORMAT_XBGR8888 playe layout should be aligned with linux DRM
driver definition.

Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
Change-Id: I8f8b025a99a7503eb27eda96bcbdf3373b011a8b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3414504
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Jason Macnak <natsu@google.com>
Tested-by: Jason Macnak <natsu@google.com>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Commit-Queue: Jason Macnak <natsu@google.com>
diff --git a/cros_gralloc/gralloc4/CrosGralloc4Utils.cc b/cros_gralloc/gralloc4/CrosGralloc4Utils.cc
index 63ec8af..6c07189 100644
--- a/cros_gralloc/gralloc4/CrosGralloc4Utils.cc
+++ b/cros_gralloc/gralloc4/CrosGralloc4Utils.cc
@@ -315,13 +315,13 @@
 
                     {DRM_FORMAT_XBGR8888,
                      {{
-                             .components = {{.type = android::gralloc4::PlaneLayoutComponentType_B,
+                             .components = {{.type = android::gralloc4::PlaneLayoutComponentType_R,
                                              .offsetInBits = 0,
                                              .sizeInBits = 8},
                                             {.type = android::gralloc4::PlaneLayoutComponentType_G,
                                              .offsetInBits = 8,
                                              .sizeInBits = 8},
-                                            {.type = android::gralloc4::PlaneLayoutComponentType_R,
+                                            {.type = android::gralloc4::PlaneLayoutComponentType_B,
                                              .offsetInBits = 16,
                                              .sizeInBits = 8}},
                              .sampleIncrementInBits = 32,