2012-09-21 15:07:47 +07:00
|
|
|
#ifndef _IMX_DRM_H_
|
|
|
|
#define _IMX_DRM_H_
|
|
|
|
|
2013-11-03 22:38:09 +07:00
|
|
|
struct device_node;
|
2013-04-08 23:04:32 +07:00
|
|
|
struct drm_crtc;
|
|
|
|
struct drm_connector;
|
|
|
|
struct drm_device;
|
2013-11-03 20:28:24 +07:00
|
|
|
struct drm_display_mode;
|
2013-04-08 23:04:32 +07:00
|
|
|
struct drm_encoder;
|
2012-09-21 15:07:47 +07:00
|
|
|
struct drm_fbdev_cma;
|
2013-04-08 23:04:32 +07:00
|
|
|
struct drm_framebuffer;
|
2015-11-06 17:08:02 +07:00
|
|
|
struct drm_plane;
|
2013-11-03 22:38:09 +07:00
|
|
|
struct imx_drm_crtc;
|
2013-04-08 23:04:32 +07:00
|
|
|
struct platform_device;
|
2012-09-21 15:07:47 +07:00
|
|
|
|
2016-07-06 19:49:24 +07:00
|
|
|
struct imx_crtc_state {
|
|
|
|
struct drm_crtc_state base;
|
2016-07-08 16:40:58 +07:00
|
|
|
u32 bus_format;
|
|
|
|
u32 bus_flags;
|
|
|
|
int di_hsync_pin;
|
|
|
|
int di_vsync_pin;
|
|
|
|
};
|
|
|
|
|
2016-07-06 19:49:24 +07:00
|
|
|
static inline struct imx_crtc_state *to_imx_crtc_state(struct drm_crtc_state *s)
|
|
|
|
{
|
|
|
|
return container_of(s, struct imx_crtc_state, base);
|
|
|
|
}
|
2012-09-21 15:07:47 +07:00
|
|
|
int imx_drm_init_drm(struct platform_device *pdev,
|
|
|
|
int preferred_bpp);
|
|
|
|
int imx_drm_exit_drm(void);
|
|
|
|
|
|
|
|
void imx_drm_mode_config_init(struct drm_device *drm);
|
|
|
|
|
|
|
|
struct drm_gem_cma_object *imx_drm_fb_get_obj(struct drm_framebuffer *fb);
|
|
|
|
|
2013-11-03 21:04:47 +07:00
|
|
|
int imx_drm_encoder_parse_of(struct drm_device *drm,
|
|
|
|
struct drm_encoder *encoder, struct device_node *np);
|
2012-09-21 15:07:47 +07:00
|
|
|
|
2013-11-03 20:28:24 +07:00
|
|
|
void imx_drm_connector_destroy(struct drm_connector *connector);
|
|
|
|
void imx_drm_encoder_destroy(struct drm_encoder *encoder);
|
2013-11-09 18:20:55 +07:00
|
|
|
|
2012-09-21 15:07:47 +07:00
|
|
|
#endif /* _IMX_DRM_H_ */
|