Thomas Gleixner | c942fdd | 2019-05-27 08:55:06 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Marek Vasut | 45d59d7 | 2016-08-18 20:23:01 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2016 Marek Vasut <marex@denx.de> |
| 4 | * |
| 5 | * i.MX23/i.MX28/i.MX6SX MXSFB LCD controller driver. |
Marek Vasut | 45d59d7 | 2016-08-18 20:23:01 +0200 | [diff] [blame] | 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; |
| 30 | struct drm_connector connector; |
| 31 | struct drm_panel *panel; |
Marek Vasut | 45d59d7 | 2016-08-18 20:23:01 +0200 | [diff] [blame] | 32 | }; |
| 33 | |
| 34 | int mxsfb_setup_crtc(struct drm_device *dev); |
| 35 | int mxsfb_create_output(struct drm_device *dev); |
| 36 | |
| 37 | void mxsfb_enable_axi_clk(struct mxsfb_drm_private *mxsfb); |
| 38 | void mxsfb_disable_axi_clk(struct mxsfb_drm_private *mxsfb); |
| 39 | |
| 40 | void mxsfb_crtc_enable(struct mxsfb_drm_private *mxsfb); |
| 41 | void mxsfb_crtc_disable(struct mxsfb_drm_private *mxsfb); |
| 42 | void mxsfb_plane_atomic_update(struct mxsfb_drm_private *mxsfb, |
| 43 | struct drm_plane_state *state); |
| 44 | |
| 45 | #endif /* __MXSFB_DRV_H__ */ |