File: ipu7-isys-subdev.h

package info (click to toggle)
linux 6.19.6-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,760,712 kB
  • sloc: ansic: 27,010,185; asm: 273,400; sh: 151,347; python: 81,280; makefile: 58,564; perl: 34,311; xml: 21,064; cpp: 5,986; yacc: 4,841; lex: 2,901; awk: 1,707; sed: 30; ruby: 25
file content (52 lines) | stat: -rw-r--r-- 1,691 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2013 - 2025 Intel Corporation
 */

#ifndef IPU7_ISYS_SUBDEV_H
#define IPU7_ISYS_SUBDEV_H

#include <linux/container_of.h>

#include <media/media-entity.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-subdev.h>

struct ipu7_isys;

struct ipu7_isys_subdev {
	struct v4l2_subdev sd;
	struct ipu7_isys *isys;
	u32 const *supported_codes;
	struct media_pad *pad;
	struct v4l2_ctrl_handler ctrl_handler;
	void (*ctrl_init)(struct v4l2_subdev *sd);
	int source;	/* SSI stream source; -1 if unset */
};

#define to_ipu7_isys_subdev(__sd)			\
	container_of(__sd, struct ipu7_isys_subdev, sd)
unsigned int ipu7_isys_mbus_code_to_mipi(u32 code);
bool ipu7_isys_is_bayer_format(u32 code);
u32 ipu7_isys_convert_bayer_order(u32 code, int x, int y);

int ipu7_isys_subdev_set_fmt(struct v4l2_subdev *sd,
			     struct v4l2_subdev_state *state,
			     struct v4l2_subdev_format *format);
int ipu7_isys_subdev_enum_mbus_code(struct v4l2_subdev *sd,
				    struct v4l2_subdev_state *state,
				    struct v4l2_subdev_mbus_code_enum
				    *code);
int ipu7_isys_get_stream_pad_fmt(struct v4l2_subdev *sd, u32 pad, u32 stream,
				 struct v4l2_mbus_framefmt *format);
int ipu7_isys_subdev_set_routing(struct v4l2_subdev *sd,
				 struct v4l2_subdev_state *state,
				 enum v4l2_subdev_format_whence which,
				 struct v4l2_subdev_krouting *routing);
int ipu7_isys_subdev_init(struct ipu7_isys_subdev *asd,
			  const struct v4l2_subdev_ops *ops,
			  unsigned int nr_ctrls,
			  unsigned int num_sink_pads,
			  unsigned int num_source_pads);
void ipu7_isys_subdev_cleanup(struct ipu7_isys_subdev *asd);
#endif /* IPU7_ISYS_SUBDEV_H */