Commit | Line | Data |
---|---|---|
e692da4d SH |
1 | #ifndef _IMX_DRM_H_ |
2 | #define _IMX_DRM_H_ | |
3 | ||
e7d6231e | 4 | struct device_node; |
eeb14ec8 PZ |
5 | struct drm_crtc; |
6 | struct drm_connector; | |
7 | struct drm_device; | |
8a51a33b | 8 | struct drm_display_mode; |
eeb14ec8 | 9 | struct drm_encoder; |
e692da4d | 10 | struct drm_fbdev_cma; |
eeb14ec8 | 11 | struct drm_framebuffer; |
43895599 | 12 | struct drm_plane; |
e7d6231e | 13 | struct imx_drm_crtc; |
eeb14ec8 | 14 | struct platform_device; |
e692da4d | 15 | |
d2ab8ad9 | 16 | unsigned int imx_drm_crtc_id(struct imx_drm_crtc *crtc); |
b8d181e4 | 17 | |
e692da4d SH |
18 | struct imx_drm_crtc_helper_funcs { |
19 | int (*enable_vblank)(struct drm_crtc *crtc); | |
20 | void (*disable_vblank)(struct drm_crtc *crtc); | |
d50141d8 | 21 | int (*set_interface_pix_fmt)(struct drm_crtc *crtc, |
4ed094fd PZ |
22 | u32 bus_format, int hsync_pin, int vsync_pin, |
23 | u32 bus_flags); | |
e692da4d SH |
24 | const struct drm_crtc_helper_funcs *crtc_helper_funcs; |
25 | const struct drm_crtc_funcs *crtc_funcs; | |
26 | }; | |
27 | ||
32266b45 | 28 | int imx_drm_add_crtc(struct drm_device *drm, struct drm_crtc *crtc, |
43895599 | 29 | struct imx_drm_crtc **new_crtc, struct drm_plane *primary_plane, |
e692da4d | 30 | const struct imx_drm_crtc_helper_funcs *imx_helper_funcs, |
655b43cc | 31 | struct device_node *port); |
e692da4d SH |
32 | int imx_drm_remove_crtc(struct imx_drm_crtc *); |
33 | int imx_drm_init_drm(struct platform_device *pdev, | |
34 | int preferred_bpp); | |
35 | int imx_drm_exit_drm(void); | |
36 | ||
37 | int imx_drm_crtc_vblank_get(struct imx_drm_crtc *imx_drm_crtc); | |
38 | void imx_drm_crtc_vblank_put(struct imx_drm_crtc *imx_drm_crtc); | |
39 | void imx_drm_handle_vblank(struct imx_drm_crtc *imx_drm_crtc); | |
40 | ||
e692da4d SH |
41 | void imx_drm_mode_config_init(struct drm_device *drm); |
42 | ||
43 | struct drm_gem_cma_object *imx_drm_fb_get_obj(struct drm_framebuffer *fb); | |
44 | ||
4ed094fd PZ |
45 | int imx_drm_set_bus_config(struct drm_encoder *encoder, u32 bus_format, |
46 | int hsync_pin, int vsync_pin, u32 bus_flags); | |
2872c807 PZ |
47 | int imx_drm_set_bus_format(struct drm_encoder *encoder, |
48 | u32 bus_format); | |
e692da4d | 49 | |
9e2d410d RK |
50 | int imx_drm_encoder_parse_of(struct drm_device *drm, |
51 | struct drm_encoder *encoder, struct device_node *np); | |
e692da4d | 52 | |
8a51a33b RK |
53 | void imx_drm_connector_destroy(struct drm_connector *connector); |
54 | void imx_drm_encoder_destroy(struct drm_encoder *encoder); | |
baa68c4b | 55 | |
e692da4d | 56 | #endif /* _IMX_DRM_H_ */ |