diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 10:05:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 10:05:51 +0000 |
commit | 5d1646d90e1f2cceb9f0828f4b28318cd0ec7744 (patch) | |
tree | a94efe259b9009378be6d90eb30d2b019d95c194 /drivers/gpu/drm/mxsfb/mxsfb_drv.h | |
parent | Initial commit. (diff) | |
download | linux-5d1646d90e1f2cceb9f0828f4b28318cd0ec7744.tar.xz linux-5d1646d90e1f2cceb9f0828f4b28318cd0ec7744.zip |
Adding upstream version 5.10.209.upstream/5.10.209
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/gpu/drm/mxsfb/mxsfb_drv.h')
-rw-r--r-- | drivers/gpu/drm/mxsfb/mxsfb_drv.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.h b/drivers/gpu/drm/mxsfb/mxsfb_drv.h new file mode 100644 index 000000000..7c720e226 --- /dev/null +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.h @@ -0,0 +1,58 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * 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__ + +#include <drm/drm_crtc.h> +#include <drm/drm_device.h> +#include <drm/drm_encoder.h> +#include <drm/drm_plane.h> + +struct clk; + +struct mxsfb_devdata { + unsigned int transfer_count; + unsigned int cur_buf; + unsigned int next_buf; + unsigned int hs_wdth_mask; + unsigned int hs_wdth_shift; + bool has_overlay; + bool has_ctrl2; +}; + +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_device *drm; + struct { + struct drm_plane primary; + struct drm_plane overlay; + } planes; + struct drm_crtc crtc; + struct drm_encoder encoder; + struct drm_connector *connector; + struct drm_bridge *bridge; +}; + +static inline struct mxsfb_drm_private * +to_mxsfb_drm_private(struct drm_device *drm) +{ + return drm->dev_private; +} + +void mxsfb_enable_axi_clk(struct mxsfb_drm_private *mxsfb); +void mxsfb_disable_axi_clk(struct mxsfb_drm_private *mxsfb); + +int mxsfb_kms_init(struct mxsfb_drm_private *mxsfb); + +#endif /* __MXSFB_DRV_H__ */ |