vi5: camera: add ovrride capture timeout control

add CID to override the capture timeout.

bug 4737219

Change-Id: I6df8e760ce8051054ba34a8b85b00bb237f9cd98
Signed-off-by: snchen <snchen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3173821
(cherry picked from commit 20374db85d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3196700
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
snchen
2024-07-09 15:29:04 +08:00
committed by Jon Hunter
parent 267eedc25d
commit 28668cde01
4 changed files with 95 additions and 13 deletions

View File

@@ -1,8 +1,22 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
/* SPDX-FileCopyrightText: Copyright (c) 2012-2024 NVIDIA CORPORATION & AFFILIATES.
* All rights reserved.
*
* drivers/media/platform/tegra/camera/mc_common.h
*
* Tegra Media controller common APIs
*
* Copyright (c) 2012-2024 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/>.
*/
#ifndef __CAMERA_MC_COMMON_H__
@@ -229,6 +243,7 @@ struct tegra_channel {
struct v4l2_fh *fh;
bool bypass;
bool write_ispformat;
int capture_timeout_ms;
bool low_latency;
enum tegra_vi_pg_mode pg_mode;
bool bfirst_fstart;

View File

@@ -1,8 +1,20 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* tegra-v4l2-camera.h - utilities for tegra camera driver
/* SPDX-FileCopyrightText: Copyright (c) 2017-2024 NVIDIA CORPORATION & AFFILIATES.
* All rights reserved.
*
* Copyright (c) 2017-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* TEGRA_V4L2_CAMERA.h - utilities for tegra camera driver
*
* 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/>.
*/
#ifndef __TEGRA_V4L2_CAMERA__
@@ -48,6 +60,7 @@
#define TEGRA_CAMERA_CID_SENSOR_DV_TIMINGS (TEGRA_CAMERA_CID_BASE+108)
#define TEGRA_CAMERA_CID_LOW_LATENCY (TEGRA_CAMERA_CID_BASE+109)
#define TEGRA_CAMERA_CID_VI_PREFERRED_STRIDE (TEGRA_CAMERA_CID_BASE+110)
#define TEGRA_CAMERA_CID_VI_CAPTURE_TIMEOUT (TEGRA_CAMERA_CID_BASE+111)
/**
* This is temporary with the current v4l2 infrastructure