2012-09-21 08:07:47 +00:00
|
|
|
#ifndef _IMX_DRM_H_
|
|
|
|
#define _IMX_DRM_H_
|
|
|
|
|
2013-11-03 15:38:09 +00:00
|
|
|
struct device_node;
|
2013-04-08 16:04:32 +00:00
|
|
|
struct drm_crtc;
|
|
|
|
struct drm_connector;
|
|
|
|
struct drm_device;
|
2013-11-03 13:28:24 +00:00
|
|
|
struct drm_display_mode;
|
2013-04-08 16:04:32 +00:00
|
|
|
struct drm_encoder;
|
2012-09-21 08:07:47 +00:00
|
|
|
struct drm_fbdev_cma;
|
2013-04-08 16:04:32 +00:00
|
|
|
struct drm_framebuffer;
|
2015-11-06 10:08:02 +00:00
|
|
|
struct drm_plane;
|
2013-11-03 15:38:09 +00:00
|
|
|
struct imx_drm_crtc;
|
2013-04-08 16:04:32 +00:00
|
|
|
struct platform_device;
|
2012-09-21 08:07:47 +00:00
|
|
|
|
2016-07-06 12:49:24 +00:00
|
|
|
struct imx_crtc_state {
|
|
|
|
struct drm_crtc_state base;
|
2016-07-08 09:40:58 +00:00
|
|
|
u32 bus_format;
|
|
|
|
u32 bus_flags;
|
|
|
|
int di_hsync_pin;
|
|
|
|
int di_vsync_pin;
|
|
|
|
};
|
|
|
|
|
2016-07-06 12:49:24 +00: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 08:07:47 +00:00
|
|
|
int imx_drm_init_drm(struct platform_device *pdev,
|
|
|
|
int preferred_bpp);
|
|
|
|
int imx_drm_exit_drm(void);
|
|
|
|
|
2017-03-23 16:18:37 +00:00
|
|
|
extern struct platform_driver ipu_drm_driver;
|
|
|
|
|
2012-09-21 08:07:47 +00:00
|
|
|
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 14:04:47 +00:00
|
|
|
int imx_drm_encoder_parse_of(struct drm_device *drm,
|
|
|
|
struct drm_encoder *encoder, struct device_node *np);
|
2012-09-21 08:07:47 +00:00
|
|
|
|
2013-11-03 13:28:24 +00:00
|
|
|
void imx_drm_connector_destroy(struct drm_connector *connector);
|
|
|
|
void imx_drm_encoder_destroy(struct drm_encoder *encoder);
|
2013-11-09 11:20:55 +00:00
|
|
|
|
2017-03-08 11:13:21 +00:00
|
|
|
int ipu_planes_assign_pre(struct drm_device *dev,
|
|
|
|
struct drm_atomic_state *state);
|
|
|
|
|
2012-09-21 08:07:47 +00:00
|
|
|
#endif /* _IMX_DRM_H_ */
|