Add MediaTek private format for reprocessing
In this CL, we add DRM_FORMAT_MTISP_SXYZW10, a 10-bit private bayer
format for private reprocessing on MediaTek ISP P1. We change the logic
around resolving the DRM format for IMPLEMENTATION_DEFINED buffers. When
CAMERA_READ usage flag is present, we consider it to be a buffer for
reprocessing and resolve the format to our private format.
BUG=b:130851309
TEST=Emerge and deploy minigbm cros-camera-libcbm cros-camera
cros-camera-hal-mtk, then verify that ZSL is working.
Change-Id: I8d9fd4e6a20c284751915e136bef0b4ceb143d78
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1753902
Tested-by: Jasmine Chen <lnishan@google.com>
Auto-Submit: Jasmine Chen <lnishan@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Jasmine Chen <lnishan@google.com>
diff --git a/drv.h b/drv.h
index 0cb062d..15b9736 100644
--- a/drv.h
+++ b/drv.h
@@ -48,12 +48,16 @@
* on the namespace of already defined formats, which can be done by using invalid
* fourcc codes.
*/
-
#define DRM_FORMAT_NONE fourcc_code('0', '0', '0', '0')
#define DRM_FORMAT_YVU420_ANDROID fourcc_code('9', '9', '9', '7')
#define DRM_FORMAT_FLEX_IMPLEMENTATION_DEFINED fourcc_code('9', '9', '9', '8')
#define DRM_FORMAT_FLEX_YCbCr_420_888 fourcc_code('9', '9', '9', '9')
+/* This is a 10-bit bayer format for private reprocessing on MediaTek ISP. It's
+ * a private RAW format that other DRM drivers will never support and thus
+ * making it not upstreamable (i.e., defined in official DRM headers). */
+#define DRM_FORMAT_MTISP_SXYZW10 fourcc_code('M', 'B', '1', '0')
+
// TODO(crbug.com/958181): remove this definition once drm_fourcc.h contains it.
#ifndef DRM_FORMAT_P010
#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0')