1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/media/pci/mgb4/mgb4_io.h
Martin Tůma 0ab13674a9 media: pci: mgb4: Added Digiteq Automotive MGB4 driver
Digiteq Automotive MGB4 is a modular frame grabber PCIe card for automotive
video interfaces. As for now, two modules - FPD-Link and GMSL - are
available and supported by the driver. The card has two inputs and two
outputs (FPD-Link only).

In addition to the video interfaces it also provides a trigger signal
interface and a MTD interface for FPGA firmware upload.

Signed-off-by: Martin Tůma <martin.tuma@digiteqautomotive.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-10-07 10:51:58 +02:00

33 lines
874 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2021-2022 Digiteq Automotive
* author: Martin Tuma <martin.tuma@digiteqautomotive.com>
*/
#ifndef __MGB4_IO_H__
#define __MGB4_IO_H__
#include <media/v4l2-dev.h>
#define MGB4_DEFAULT_WIDTH 1280
#define MGB4_DEFAULT_HEIGHT 640
#define MGB4_DEFAULT_PERIOD (125000000 / 60)
/* Register access error indication */
#define MGB4_ERR_NO_REG 0xFFFFFFFE
/* Frame buffer addresses greater than 0xFFFFFFFA indicate HW errors */
#define MGB4_ERR_QUEUE_TIMEOUT 0xFFFFFFFD
#define MGB4_ERR_QUEUE_EMPTY 0xFFFFFFFC
#define MGB4_ERR_QUEUE_FULL 0xFFFFFFFB
struct mgb4_frame_buffer {
struct vb2_v4l2_buffer vb;
struct list_head list;
};
static inline struct mgb4_frame_buffer *to_frame_buffer(struct vb2_v4l2_buffer *vbuf)
{
return container_of(vbuf, struct mgb4_frame_buffer, vb);
}
#endif