mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10: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
|
||||
|
||||
ifneq ($(CONFIG_TEGRA_IVC_LEGACY_DISABLE),y)
|
||||
obj-m += capture-ivc.o
|
||||
endif
|
||||
obj-m += ivc-bus.o
|
||||
obj-m += camchar.o
|
||||
obj-m += camera-diagnostics.o
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
// Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
#include <linux/tegra-capture-ivc.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 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)) {
|
||||
const void *msg = tegra_ivc_read_get_next_frame(ivc);
|
||||
const struct tegra_capture_ivc_msg_header *hdr = msg;
|
||||
uint32_t id = hdr->channel_id;
|
||||
#if defined(NV_TEGRA_IVC_STRUCT_HAS_IOSYS_MAP) /* Linux 6.2 */
|
||||
struct iosys_map map;
|
||||
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user