1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2016 Marek Vasut <marex@denx.de>
5 * i.MX23/i.MX28/i.MX6SX MXSFB LCD controller driver.
8 #ifndef __MXSFB_DRV_H__
9 #define __MXSFB_DRV_H__
11 struct mxsfb_devdata
{
12 unsigned int transfer_count
;
14 unsigned int next_buf
;
16 unsigned int hs_wdth_mask
;
17 unsigned int hs_wdth_shift
;
18 unsigned int ipversion
;
21 struct mxsfb_drm_private
{
22 const struct mxsfb_devdata
*devdata
;
24 void __iomem
*base
; /* registers */
27 struct clk
*clk_disp_axi
;
29 struct drm_simple_display_pipe pipe
;
30 struct drm_connector panel_connector
;
31 struct drm_connector
*connector
;
32 struct drm_panel
*panel
;
33 struct drm_bridge
*bridge
;
36 int mxsfb_setup_crtc(struct drm_device
*dev
);
37 int mxsfb_create_output(struct drm_device
*dev
);
39 void mxsfb_enable_axi_clk(struct mxsfb_drm_private
*mxsfb
);
40 void mxsfb_disable_axi_clk(struct mxsfb_drm_private
*mxsfb
);
42 void mxsfb_crtc_enable(struct mxsfb_drm_private
*mxsfb
);
43 void mxsfb_crtc_disable(struct mxsfb_drm_private
*mxsfb
);
44 void mxsfb_plane_atomic_update(struct mxsfb_drm_private
*mxsfb
,
45 struct drm_plane_state
*state
);
47 #endif /* __MXSFB_DRV_H__ */