accel/ivpu: Move recovery work to system_unbound_wq
[drm/drm-misc.git] / drivers / media / platform / qcom / camss / camss-ispif.h
blobdff6d5b35c72ed7e7c94b485d50acab2d614feb7
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * camss-ispif.h
5 * Qualcomm MSM Camera Subsystem - ISPIF (ISP Interface) Module
7 * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
8 * Copyright (C) 2015-2018 Linaro Ltd.
9 */
10 #ifndef QC_MSM_CAMSS_ISPIF_H
11 #define QC_MSM_CAMSS_ISPIF_H
13 #include <linux/clk.h>
14 #include <media/media-entity.h>
15 #include <media/v4l2-device.h>
16 #include <media/v4l2-subdev.h>
18 #define MSM_ISPIF_PAD_SINK 0
19 #define MSM_ISPIF_PAD_SRC 1
20 #define MSM_ISPIF_PADS_NUM 2
22 #define MSM_ISPIF_VFE_NUM 2
24 enum ispif_intf {
25 PIX0,
26 RDI0,
27 PIX1,
28 RDI1,
29 RDI2
32 struct ispif_intf_cmd_reg {
33 u32 cmd_0;
34 u32 cmd_1;
37 struct ispif_line {
38 struct ispif_device *ispif;
39 u8 id;
40 u8 csid_id;
41 u8 vfe_id;
42 enum ispif_intf interface;
43 struct v4l2_subdev subdev;
44 struct media_pad pads[MSM_ISPIF_PADS_NUM];
45 struct v4l2_mbus_framefmt fmt[MSM_ISPIF_PADS_NUM];
46 const u32 *formats;
47 unsigned int nformats;
50 struct ispif_device {
51 void __iomem *base;
52 void __iomem *base_clk_mux;
53 u32 irq;
54 char irq_name[30];
55 struct camss_clock *clock;
56 int nclocks;
57 struct camss_clock *clock_for_reset;
58 int nclocks_for_reset;
59 struct completion reset_complete[MSM_ISPIF_VFE_NUM];
60 int power_count;
61 struct mutex power_lock;
62 struct ispif_intf_cmd_reg intf_cmd[MSM_ISPIF_VFE_NUM];
63 struct mutex config_lock;
64 unsigned int line_num;
65 struct ispif_line *line;
66 struct camss *camss;
69 struct camss_subdev_resources;
71 int msm_ispif_subdev_init(struct camss *camss,
72 const struct camss_subdev_resources *res);
74 int msm_ispif_register_entities(struct ispif_device *ispif,
75 struct v4l2_device *v4l2_dev);
77 void msm_ispif_unregister_entities(struct ispif_device *ispif);
79 #endif /* QC_MSM_CAMSS_ISPIF_H */