The program for obtaining MIPI embedded data is as follows:
static void vi5_release_metadata_buffer(struct tegra_channel *chan,
struct vb2_v4l2_buffer *vbuf)
{
struct vb2_buffer *evb = NULL;
struct vb2_v4l2_buffer *evbuf;
void* frm_buffer;
struct tegra_mc_vi *vi = chan->vi;
struct metadata mtd;
spin_lock(&chan->embedded.spin_lock);
if (0 < chan->embedded.num_buffers) {
evb = chan->embedded.buffers[chan->embedded.tail];
chan->embedded.buffers[chan->embedded.tail] = NULL;
chan->embedded.tail++;
if (chan->embedded.tail > 15)
chan->embedded.tail = chan->embedded.tail - 16;
chan->embedded.num_buffers--;
}
spin_unlock(&chan->embedded.spin_lock);
if (!evb)
return;
frm_buffer = vb2_plane_vaddr(evb, 0);
if (!frm_buffer)
return;
memcpy(frm_buffer, chan->emb_buf_addr, 96);
evbuf = to_vb2_v4l2_buffer(evb);
evbuf->sequence = vbuf->sequence;
vb2_set_plane_payload(evb, 0, 96);
evb->timestamp = vbuf->vb2_buf.timestamp;
vb2_buffer_done(evb, VB2_BUF_STATE_DONE);
memcpy(&mtd, chan->emb_buf_addr, 48);
dev_warn(vi->dev,"video: %d ,vc: %d , frame_counter: %d , timestamp_sof_sec: %d , timestamp_sof_nsec: %d\n",
chan->video->num, chan->virtual_channel, mtd.frame_counter, mtd.timestamp_sof_sec, mtd.timestamp_sof_nsec);
}
When the AGX Orin (JetPack6.0) is connected to more than four cameras, the problem of MIPI embedded data duplication may occur occasionally.
metadate_3_test.log (51.9 MB)
Hi,
For the camera basic functionality first needs to check the device and driver configuration.
You can reference to below program guide for the detailed information of device tree and driver implementation.
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/SD/CameraDevelopment/SensorSoftwareDriverProgramming.html?highlight=programing#sensor-software-driver-programming
Please refer to Applications Using V4L2 IOCTL Directly by using V4L2 IOCTL to verify basic camera functionality.
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/SD/CameraDevelopment/SensorSoftwareDriverProgramming.html?highlight=programing#to-run-a-v4l2-ctl-test
Once confirm the configure and still failed below link help to get log and some information and some tips for debug.
https://elinux.org/Jetson/l4t/Camera_BringUp#Steps_to_enable_more_debug_messages
Thanks!
hello 1173873393,
may I know what’s your camera connections, you’re having virtual channel support enabled, right?
please also share the port bindings for reference. thanks
hello
Yes, we have used virtual channels. Our camera is the Intel D457. The port connection is as shown in the device tree below.
tegra234-camera-d457-overlay.txt (97.2 KB)
hello 1173873393,
I saw you have duplicated settings.
for instance,
tegra-capture-vi {
num-channels = <32>;
ports {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
status = "okay";
d4xx_vi_in0: endpoint {
status = "okay";
vc-id = <0>;
port-index = <0>; //0
bus-width = <4>;
remote-endpoint = <&d4xx_csi_out0>;
};
..
port@6 {
reg = <6>;
status = "okay";
d4xx_vi_in6: endpoint {
status = "okay";
vc-id = <0>;
port-index = <0>; //1
bus-width = <4>;
remote-endpoint = <&d4xx_csi_out6>;
};
please also refer to CSI Connectivity for sensor connections to each CSI bricks.
Yes, but the stream - opening won’t occur simultaneously.
please refer to CSI Connectivity for sensor connections to each CSI bricks.
system
Closed
February 26, 2025, 4:50am
10
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.