mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
kernel: camera: add bayer raw14 format.
Add raw14 bayer format driver support
bug 4335141
Change-Id: I45c4fb2f692a98cf33d81415104e815c14340a68
Signed-off-by: snchen <snchen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176545
(cherry picked from commit b2db309d50)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226512
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
This commit is contained in:
@@ -1,8 +1,19 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
/*
|
/*
|
||||||
* camera_common.c - utilities for tegra camera driver
|
* SPDX-FileCopyrightText: Copyright (c) 2015-2024 NVIDIA CORPORATION & AFFILIATES.
|
||||||
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Copyright (c) 2015-2024, 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 <nvidia/conftest.h>
|
#include <nvidia/conftest.h>
|
||||||
@@ -33,6 +44,26 @@
|
|||||||
#define HDR_ENABLE 0x1
|
#define HDR_ENABLE 0x1
|
||||||
|
|
||||||
static const struct camera_common_colorfmt camera_common_color_fmts[] = {
|
static const struct camera_common_colorfmt camera_common_color_fmts[] = {
|
||||||
|
{
|
||||||
|
MEDIA_BUS_FMT_SBGGR14_1X14,
|
||||||
|
V4L2_COLORSPACE_SRGB,
|
||||||
|
V4L2_PIX_FMT_SBGGR14,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MEDIA_BUS_FMT_SRGGB14_1X14,
|
||||||
|
V4L2_COLORSPACE_SRGB,
|
||||||
|
V4L2_PIX_FMT_SRGGB14,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MEDIA_BUS_FMT_SGRBG14_1X14,
|
||||||
|
V4L2_COLORSPACE_SRGB,
|
||||||
|
V4L2_PIX_FMT_SGRBG14,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MEDIA_BUS_FMT_SGBRG14_1X14,
|
||||||
|
V4L2_COLORSPACE_SRGB,
|
||||||
|
V4L2_PIX_FMT_SGBRG14
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MEDIA_BUS_FMT_SRGGB12_1X12,
|
MEDIA_BUS_FMT_SRGGB12_1X12,
|
||||||
V4L2_COLORSPACE_SRGB,
|
V4L2_COLORSPACE_SRGB,
|
||||||
|
|||||||
@@ -1,8 +1,19 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/*
|
/*
|
||||||
* sensor_common.c - utilities for tegra sensor drivers
|
* SPDX-FileCopyrightText: Copyright (c) 2017-2024 NVIDIA CORPORATION & AFFILIATES.
|
||||||
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017-2023, NVIDIA CORPORATION & AFFILIATES. 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 <media/sensor_common.h>
|
#include <media/sensor_common.h>
|
||||||
@@ -243,6 +254,14 @@ static int extract_pixel_format(
|
|||||||
*format = V4L2_PIX_FMT_SGBRG12;
|
*format = V4L2_PIX_FMT_SGBRG12;
|
||||||
else if (strncmp(pixel_t, "bayer_grbg12", size) == 0)
|
else if (strncmp(pixel_t, "bayer_grbg12", size) == 0)
|
||||||
*format = V4L2_PIX_FMT_SGRBG12;
|
*format = V4L2_PIX_FMT_SGRBG12;
|
||||||
|
else if (strncmp(pixel_t, "bayer_bggr14", size) == 0)
|
||||||
|
*format = V4L2_PIX_FMT_SBGGR14;
|
||||||
|
else if (strncmp(pixel_t, "bayer_rggb14", size) == 0)
|
||||||
|
*format = V4L2_PIX_FMT_SRGGB14;
|
||||||
|
else if (strncmp(pixel_t, "bayer_gbrg14", size) == 0)
|
||||||
|
*format = V4L2_PIX_FMT_SGBRG14;
|
||||||
|
else if (strncmp(pixel_t, "bayer_grbg14", size) == 0)
|
||||||
|
*format = V4L2_PIX_FMT_SGRBG14;
|
||||||
else if (strncmp(pixel_t, "rgb_rgb88824", size) == 0)
|
else if (strncmp(pixel_t, "rgb_rgb88824", size) == 0)
|
||||||
*format = V4L2_PIX_FMT_RGB24;
|
*format = V4L2_PIX_FMT_RGB24;
|
||||||
else if (strncmp(pixel_t, "bayer_wdr_pwl_rggb12", size) == 0)
|
else if (strncmp(pixel_t, "bayer_wdr_pwl_rggb12", size) == 0)
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only
|
||||||
/*
|
* SPDX-FileCopyrightText: Copyright (c) 2017-2024 NVIDIA CORPORATION & AFFILIATES.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
* NVIDIA Tegra Video Input Device Driver VI5 formats
|
* NVIDIA Tegra Video Input Device Driver VI5 formats
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017-2022, NVIDIA CORPORATION. All rights reserved.
|
* Author: Bhanu Murthy V <bmurthyv@nvidia.com>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __VI5_FORMATS_H_
|
#ifndef __VI5_FORMATS_H_
|
||||||
@@ -91,6 +97,16 @@ static const struct tegra_video_format vi5_video_formats[] = {
|
|||||||
TEGRA_VIDEO_FORMAT(RAW8, 8, SBGGR8_1X8, 1, 1, T_R8,
|
TEGRA_VIDEO_FORMAT(RAW8, 8, SBGGR8_1X8, 1, 1, T_R8,
|
||||||
RAW8, SBGGR8, "BGBG.. GRGR.."),
|
RAW8, SBGGR8, "BGBG.. GRGR.."),
|
||||||
|
|
||||||
|
/* RAW 14 */
|
||||||
|
TEGRA_VIDEO_FORMAT(RAW14, 14, SRGGB14_1X14, 2, 1, T_R16,
|
||||||
|
RAW14, SRGGB14, "RGRG.. GBGB.."),
|
||||||
|
TEGRA_VIDEO_FORMAT(RAW14, 14, SGRBG14_1X14, 2, 1, T_R16,
|
||||||
|
RAW14, SGRBG14, "GRGR.. BGBG.."),
|
||||||
|
TEGRA_VIDEO_FORMAT(RAW14, 14, SGBRG14_1X14, 2, 1, T_R16,
|
||||||
|
RAW14, SGBRG14, "GBGB.. RGRG.."),
|
||||||
|
TEGRA_VIDEO_FORMAT(RAW14, 14, SBGGR14_1X14, 2, 1, T_R16,
|
||||||
|
RAW14, SBGGR14, "BGBG.. GRGR.."),
|
||||||
|
|
||||||
/* RAW 10 */
|
/* RAW 10 */
|
||||||
TEGRA_VIDEO_FORMAT(RAW10, 10, SRGGB10_1X10, 2, 1, T_R16,
|
TEGRA_VIDEO_FORMAT(RAW10, 10, SRGGB10_1X10, 2, 1, T_R16,
|
||||||
RAW10, SRGGB10, "RGRG.. GBGB.."),
|
RAW10, SRGGB10, "RGRG.. GBGB.."),
|
||||||
|
|||||||
Reference in New Issue
Block a user