xref: /linux/drivers/gpu/drm/imx/ipuv3/imx-drm.h (revision 7f4f3b14e8079ecde096bd734af10e30d40c27b7)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _IMX_DRM_H_
3 #define _IMX_DRM_H_
4 
5 struct device_node;
6 struct drm_connector;
7 struct drm_device;
8 struct drm_encoder;
9 
10 struct imx_crtc_state {
11 	struct drm_crtc_state			base;
12 	u32					bus_format;
13 	u32					bus_flags;
14 	int					di_hsync_pin;
15 	int					di_vsync_pin;
16 };
17 
18 static inline struct imx_crtc_state *to_imx_crtc_state(struct drm_crtc_state *s)
19 {
20 	return container_of(s, struct imx_crtc_state, base);
21 }
22 
23 extern struct platform_driver ipu_drm_driver;
24 
25 int imx_drm_encoder_parse_of(struct drm_device *drm,
26 	struct drm_encoder *encoder, struct device_node *np);
27 
28 int ipu_planes_assign_pre(struct drm_device *dev,
29 			  struct drm_atomic_state *state);
30 
31 #endif /* _IMX_DRM_H_ */
32