drivers/media/pci/hws/hws_v4l2_ioctl.c

Source file repositories/reference/linux-study-clean/drivers/media/pci/hws/hws_v4l2_ioctl.c

File Facts

System
Linux kernel
Corpus path
drivers/media/pci/hws/hws_v4l2_ioctl.c
Extension
.c
Size
21779 bytes
Lines
920
Domain
Driver Families
Bucket
drivers/media
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct hws_dv_mode {
	struct v4l2_dv_timings timings;
	u32 refresh_hz;
};

static const struct hws_dv_mode *
hws_find_dv_by_wh(u32 w, u32 h, bool interlaced);
static const struct hws_dv_mode *
hws_find_dv_by_wh_fps(u32 w, u32 h, bool interlaced, u32 fps);
static u32 hws_get_live_fps(struct hws_video *vid);
static u32 hws_input_status(struct hws_video *vid);
static int hws_fill_dv_timings(u32 w, u32 h, bool interlace, u32 fps,
			       struct v4l2_dv_timings *timings);

static const struct hws_dv_mode hws_dv_modes[] = {
	{
		{
			.type = V4L2_DV_BT_656_1120,
			.bt = {
				.width = 1920,
				.height = 1080,
				.hfrontporch = 88,
				.hsync = 44,
				.hbackporch = 148,
				.vfrontporch = 4,
				.vsync = 5,
				.vbackporch = 36,
				.pixelclock = 148500000,
				.polarities = V4L2_DV_VSYNC_POS_POL |
					      V4L2_DV_HSYNC_POS_POL,
				.interlaced = 0,
			},
		},
		60,
	},
	{
		{
			.type = V4L2_DV_BT_656_1120,
			.bt = {
				.width = 1920,
				.height = 1080,
				.hfrontporch = 88,
				.hsync = 44,
				.hbackporch = 148,
				.vfrontporch = 4,
				.vsync = 5,
				.vbackporch = 36,
				.pixelclock = 74250000,
				.polarities = V4L2_DV_VSYNC_POS_POL |
					      V4L2_DV_HSYNC_POS_POL,
				.interlaced = 0,
			},
		},
		30,
	},
	{
		{
			.type = V4L2_DV_BT_656_1120,
			.bt = {
				.width = 1280,
				.height = 720,
				.hfrontporch = 110,
				.hsync = 40,
				.hbackporch = 220,
				.vfrontporch = 5,
				.vsync = 5,
				.vbackporch = 20,
				.pixelclock = 74250000,
				.polarities = V4L2_DV_VSYNC_POS_POL |
					      V4L2_DV_HSYNC_POS_POL,
				.interlaced = 0,
			},
		},
		60,
	},
	{
		{
			.type = V4L2_DV_BT_656_1120,
			.bt = {
				.width = 720,
				.height = 480,
				.interlaced = 0,
			},
		},
		60,
	},
	{
		{
			.type = V4L2_DV_BT_656_1120,
			.bt = {

Annotation

Implementation Notes