mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
rtcpu: capture-ivc: Enable build for Linux 6.2
The driver of rtcpu/capture-ivc is modified to support the new APIs of the IVC from core kernel using conftest. Enable build of this driver. Bug 4346767 Change-Id: I427bb8b7d5dad02e805d0707fb67e45772fead31 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3033024 GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
00f3315faf
commit
bf1cfb5fb4
@@ -3,9 +3,7 @@
|
|||||||
|
|
||||||
ccflags-y += -Wframe-larger-than=2048
|
ccflags-y += -Wframe-larger-than=2048
|
||||||
|
|
||||||
ifneq ($(CONFIG_TEGRA_IVC_LEGACY_DISABLE),y)
|
|
||||||
obj-m += capture-ivc.o
|
obj-m += capture-ivc.o
|
||||||
endif
|
|
||||||
obj-m += ivc-bus.o
|
obj-m += ivc-bus.o
|
||||||
obj-m += camchar.o
|
obj-m += camchar.o
|
||||||
obj-m += camera-diagnostics.o
|
obj-m += camera-diagnostics.o
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
// Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
// Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||||
|
|
||||||
|
#include <nvidia/conftest.h>
|
||||||
|
|
||||||
#include <linux/tegra-capture-ivc.h>
|
#include <linux/tegra-capture-ivc.h>
|
||||||
|
|
||||||
#include <linux/completion.h>
|
#include <linux/completion.h>
|
||||||
@@ -357,11 +359,25 @@ static inline void tegra_capture_ivc_recv(struct tegra_capture_ivc *civc)
|
|||||||
{
|
{
|
||||||
struct tegra_ivc *ivc = &civc->chan->ivc;
|
struct tegra_ivc *ivc = &civc->chan->ivc;
|
||||||
struct device *dev = &civc->chan->dev;
|
struct device *dev = &civc->chan->dev;
|
||||||
|
const void *msg;
|
||||||
|
const struct tegra_capture_ivc_msg_header *hdr;
|
||||||
|
uint32_t id;
|
||||||
|
|
||||||
while (tegra_ivc_can_read(ivc)) {
|
while (tegra_ivc_can_read(ivc)) {
|
||||||
const void *msg = tegra_ivc_read_get_next_frame(ivc);
|
#if defined(NV_TEGRA_IVC_STRUCT_HAS_IOSYS_MAP) /* Linux 6.2 */
|
||||||
const struct tegra_capture_ivc_msg_header *hdr = msg;
|
struct iosys_map map;
|
||||||
uint32_t id = hdr->channel_id;
|
int err;
|
||||||
|
err = tegra_ivc_read_get_next_frame(ivc, &map);
|
||||||
|
if (err) {
|
||||||
|
dev_err(dev, "Failed to get next frame for read\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
msg = map.vaddr;
|
||||||
|
#else
|
||||||
|
msg = tegra_ivc_read_get_next_frame(ivc);
|
||||||
|
#endif
|
||||||
|
hdr = msg;
|
||||||
|
id = hdr->channel_id;
|
||||||
|
|
||||||
trace_capture_ivc_recv(dev_name(dev), hdr->msg_id, id);
|
trace_capture_ivc_recv(dev_name(dev), hdr->msg_id, id);
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/version.h>
|
#include <linux/version.h>
|
||||||
|
|
||||||
#if !defined(CONFIG_TEGRA_IVC_LEGACY_DISABLE)
|
|
||||||
/**
|
/**
|
||||||
* @brief Submit the control message binary blob to capture-IVC driver,
|
* @brief Submit the control message binary blob to capture-IVC driver,
|
||||||
* which is to be transferred over control IVC channel to RTCPU.
|
* which is to be transferred over control IVC channel to RTCPU.
|
||||||
@@ -134,59 +133,4 @@ int tegra_capture_ivc_unregister_control_cb(
|
|||||||
*/
|
*/
|
||||||
int tegra_capture_ivc_unregister_capture_cb(
|
int tegra_capture_ivc_unregister_capture_cb(
|
||||||
uint32_t chan_id);
|
uint32_t chan_id);
|
||||||
#else
|
|
||||||
typedef void (*tegra_capture_ivc_cb_func)(
|
|
||||||
const void *resp_desc,
|
|
||||||
const void *priv_context);
|
|
||||||
|
|
||||||
static inline int tegra_capture_ivc_control_submit(
|
|
||||||
const void *control_desc,
|
|
||||||
size_t len)
|
|
||||||
{
|
|
||||||
return -ENOTSUPP;
|
|
||||||
};
|
|
||||||
|
|
||||||
static inline int tegra_capture_ivc_capture_submit(
|
|
||||||
const void *capture_desc,
|
|
||||||
size_t len)
|
|
||||||
{
|
|
||||||
return -ENOTSUPP;
|
|
||||||
};
|
|
||||||
|
|
||||||
static inline int tegra_capture_ivc_register_control_cb(
|
|
||||||
tegra_capture_ivc_cb_func control_resp_cb,
|
|
||||||
uint32_t *trans_id,
|
|
||||||
const void *priv_context)
|
|
||||||
{
|
|
||||||
return -ENOTSUPP;
|
|
||||||
};
|
|
||||||
|
|
||||||
static inline int tegra_capture_ivc_notify_chan_id(
|
|
||||||
uint32_t chan_id,
|
|
||||||
uint32_t trans_id)
|
|
||||||
{
|
|
||||||
return -ENOTSUPP;
|
|
||||||
};
|
|
||||||
|
|
||||||
static inline int tegra_capture_ivc_register_capture_cb(
|
|
||||||
tegra_capture_ivc_cb_func capture_status_ind_cb,
|
|
||||||
uint32_t chan_id,
|
|
||||||
const void *priv_context)
|
|
||||||
{
|
|
||||||
return -ENOTSUPP;
|
|
||||||
};
|
|
||||||
|
|
||||||
static inline int tegra_capture_ivc_unregister_control_cb(
|
|
||||||
uint32_t id)
|
|
||||||
{
|
|
||||||
return -ENOTSUPP;
|
|
||||||
};
|
|
||||||
|
|
||||||
static inline int tegra_capture_ivc_unregister_capture_cb(
|
|
||||||
uint32_t chan_id)
|
|
||||||
{
|
|
||||||
return -ENOTSUPP;
|
|
||||||
};
|
|
||||||
#endif /* !defined(CONFIG_TEGRA_IVC_LEGACY_DISABLE) */
|
|
||||||
|
|
||||||
#endif /* INCLUDE_CAPTURE_IVC_H */
|
#endif /* INCLUDE_CAPTURE_IVC_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user