drm: lcdif: Check consistent bus format and flags across first bridges
[linux-2.6-block.git] / drivers / gpu / drm / mxsfb / lcdif_drv.h
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Copyright (C) 2022 Marek Vasut <marex@denx.de>
4  *
5  * i.MX8MP/i.MXRT LCDIFv3 LCD controller driver.
6  */
7
8 #ifndef __LCDIF_DRV_H__
9 #define __LCDIF_DRV_H__
10
11 #include <drm/drm_bridge.h>
12 #include <drm/drm_crtc.h>
13 #include <drm/drm_device.h>
14 #include <drm/drm_encoder.h>
15 #include <drm/drm_plane.h>
16
17 struct clk;
18
19 struct lcdif_drm_private {
20         void __iomem                    *base;  /* registers */
21         struct clk                      *clk;
22         struct clk                      *clk_axi;
23         struct clk                      *clk_disp_axi;
24
25         unsigned int                    irq;
26
27         struct drm_device               *drm;
28         struct {
29                 struct drm_plane        primary;
30                 /* i.MXRT does support overlay planes, add them here. */
31         } planes;
32         struct drm_crtc                 crtc;
33         struct drm_encoder              encoder;
34 };
35
36 static inline struct lcdif_drm_private *
37 to_lcdif_drm_private(struct drm_device *drm)
38 {
39         return drm->dev_private;
40 }
41
42 int lcdif_kms_init(struct lcdif_drm_private *lcdif);
43
44 #endif /* __LCDIF_DRV_H__ */