]>
Commit | Line | Data |
---|---|---|
c942fddf | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
45d59d70 MV |
2 | /* |
3 | * Copyright (C) 2016 Marek Vasut <marex@denx.de> | |
4 | * | |
5 | * i.MX23/i.MX28/i.MX6SX MXSFB LCD controller driver. | |
45d59d70 MV |
6 | */ |
7 | ||
8 | #ifndef __MXSFB_DRV_H__ | |
9 | #define __MXSFB_DRV_H__ | |
10 | ||
11 | struct mxsfb_devdata { | |
12 | unsigned int transfer_count; | |
13 | unsigned int cur_buf; | |
14 | unsigned int next_buf; | |
15 | unsigned int debug0; | |
16 | unsigned int hs_wdth_mask; | |
17 | unsigned int hs_wdth_shift; | |
18 | unsigned int ipversion; | |
19 | }; | |
20 | ||
21 | struct mxsfb_drm_private { | |
22 | const struct mxsfb_devdata *devdata; | |
23 | ||
24 | void __iomem *base; /* registers */ | |
25 | struct clk *clk; | |
26 | struct clk *clk_axi; | |
27 | struct clk *clk_disp_axi; | |
28 | ||
29 | struct drm_simple_display_pipe pipe; | |
d0234043 RC |
30 | struct drm_connector panel_connector; |
31 | struct drm_connector *connector; | |
45d59d70 | 32 | struct drm_panel *panel; |
d0234043 | 33 | struct drm_bridge *bridge; |
45d59d70 MV |
34 | }; |
35 | ||
36 | int mxsfb_setup_crtc(struct drm_device *dev); | |
37 | int mxsfb_create_output(struct drm_device *dev); | |
38 | ||
39 | void mxsfb_enable_axi_clk(struct mxsfb_drm_private *mxsfb); | |
40 | void mxsfb_disable_axi_clk(struct mxsfb_drm_private *mxsfb); | |
41 | ||
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); | |
46 | ||
47 | #endif /* __MXSFB_DRV_H__ */ |