From f2f1ee836572fbbf7832dfa1771d12cecf6ae04a Mon Sep 17 00:00:00 2001 From: HeYue Date: Thu, 25 Sep 2025 13:22:02 +0800 Subject: [PATCH] Add HAL_PIXEL_FORMAT_YCBCR_P210 format support Fix the unsupported fomat 0x3c error. Tracked-On: OAM-134133 Signed-off-by: HeYue --- cros_gralloc/cros_gralloc_helpers.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cros_gralloc/cros_gralloc_helpers.cc b/cros_gralloc/cros_gralloc_helpers.cc index dc4a5807..073c06fd 100644 --- a/cros_gralloc/cros_gralloc_helpers.cc +++ b/cros_gralloc/cros_gralloc_helpers.cc @@ -25,7 +25,6 @@ /* Define to match AIDL PixelFormat::R_8. */ #define HAL_PIXEL_FORMAT_R8 0x38 -#define HAL_PIXEL_FORMAT_RGBA_10101010 0x3B const char *drmFormat2Str(int drm_format) { @@ -102,6 +101,10 @@ uint32_t cros_gralloc_convert_format(int format) */ ALOGW("RGBA_10101010 format, alpha value is cut from 10 bit to 2 bit\n"); return DRM_FORMAT_ABGR2101010; +#endif +#if ANDROID_API_LEVEL >= 36 + case HAL_PIXEL_FORMAT_YCBCR_P210: + return DRM_FORMAT_P210; #endif case HAL_PIXEL_FORMAT_NV12: return DRM_FORMAT_NV12;