camera: add SBGGR12 color format

Add SBGGR12 color format to support bayer bggr12

bug 4575548

Change-Id: Ic59b6bc33e67da7f94e2a6805a18971423036e74
Signed-off-by: snchen <snchen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3173804
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Amit Purwar <apurwar@nvidia.com>
Reviewed-by: Jerry Chang <jerchang@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
This commit is contained in:
snchen
2024-03-25 14:06:02 +08:00
committed by mobile promotions
parent 20374db85d
commit f2d3ec994c

View File

@@ -1,8 +1,18 @@
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0 only
/* /* SPDX-FileCopyrightText: Copyright (c) 2015-2024 NVIDIA CORPORATION & AFFILIATES.
* camera_common.c - utilities for tegra camera driver * All rights reserved.
* *
* Copyright (c) 2015-2023, NVIDIA CORPORATION. All rights reserved. * This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <linux/types.h> #include <linux/types.h>
#include <media/tegra-v4l2-camera.h> #include <media/tegra-v4l2-camera.h>
@@ -44,6 +54,11 @@ static const struct camera_common_colorfmt camera_common_color_fmts[] = {
V4L2_COLORSPACE_SRGB, V4L2_COLORSPACE_SRGB,
V4L2_PIX_FMT_SGBRG12 V4L2_PIX_FMT_SGBRG12
}, },
{
MEDIA_BUS_FMT_SBGGR12_1X12,
V4L2_COLORSPACE_SRGB,
V4L2_PIX_FMT_SBGGR12
},
{ {
MEDIA_BUS_FMT_SRGGB10_1X10, MEDIA_BUS_FMT_SRGGB10_1X10,
V4L2_COLORSPACE_SRGB, V4L2_COLORSPACE_SRGB,