2019-05-27 06:55:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
2016-08-18 18:23:01 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2016 Marek Vasut <marex@denx.de>
|
|
|
|
*
|
|
|
|
* i.MX23/i.MX28/i.MX6SX MXSFB LCD controller driver.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __MXSFB_DRV_H__
|
|
|
|
#define __MXSFB_DRV_H__
|
|
|
|
|
|
|
|
struct mxsfb_devdata {
|
|
|
|
unsigned int transfer_count;
|
|
|
|
unsigned int cur_buf;
|
|
|
|
unsigned int next_buf;
|
|
|
|
unsigned int debug0;
|
|
|
|
unsigned int hs_wdth_mask;
|
|
|
|
unsigned int hs_wdth_shift;
|
|
|
|
unsigned int ipversion;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct mxsfb_drm_private {
|
|
|
|
const struct mxsfb_devdata *devdata;
|
|
|
|
|
|
|
|
void __iomem *base; /* registers */
|
|
|
|
struct clk *clk;
|
|
|
|
struct clk *clk_axi;
|
|
|
|
struct clk *clk_disp_axi;
|
|
|
|
|
|
|
|
struct drm_simple_display_pipe pipe;
|
2019-08-29 11:30:02 +00:00
|
|
|
struct drm_connector panel_connector;
|
|
|
|
struct drm_connector *connector;
|
2016-08-18 18:23:01 +00:00
|
|
|
struct drm_panel *panel;
|
2019-08-29 11:30:02 +00:00
|
|
|
struct drm_bridge *bridge;
|
2016-08-18 18:23:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
int mxsfb_setup_crtc(struct drm_device *dev);
|
|
|
|
int mxsfb_create_output(struct drm_device *dev);
|
|
|
|
|
|
|
|
void mxsfb_enable_axi_clk(struct mxsfb_drm_private *mxsfb);
|
|
|
|
void mxsfb_disable_axi_clk(struct mxsfb_drm_private *mxsfb);
|
|
|
|
|
|
|
|
void mxsfb_crtc_enable(struct mxsfb_drm_private *mxsfb);
|
|
|
|
void mxsfb_crtc_disable(struct mxsfb_drm_private *mxsfb);
|
|
|
|
void mxsfb_plane_atomic_update(struct mxsfb_drm_private *mxsfb,
|
|
|
|
struct drm_plane_state *state);
|
|
|
|
|
|
|
|
#endif /* __MXSFB_DRV_H__ */
|