Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * Copyright (C) 2022 Marek Vasut <marex@denx.de>
0004  *
0005  * i.MX8MP/i.MXRT LCDIFv3 LCD controller driver.
0006  */
0007 
0008 #ifndef __LCDIF_DRV_H__
0009 #define __LCDIF_DRV_H__
0010 
0011 #include <drm/drm_crtc.h>
0012 #include <drm/drm_device.h>
0013 #include <drm/drm_encoder.h>
0014 #include <drm/drm_plane.h>
0015 
0016 struct clk;
0017 
0018 struct lcdif_drm_private {
0019     void __iomem            *base;  /* registers */
0020     struct clk          *clk;
0021     struct clk          *clk_axi;
0022     struct clk          *clk_disp_axi;
0023 
0024     unsigned int            irq;
0025 
0026     struct drm_device       *drm;
0027     struct {
0028         struct drm_plane    primary;
0029         /* i.MXRT does support overlay planes, add them here. */
0030     } planes;
0031     struct drm_crtc         crtc;
0032     struct drm_encoder      encoder;
0033     struct drm_bridge       *bridge;
0034 };
0035 
0036 static inline struct lcdif_drm_private *
0037 to_lcdif_drm_private(struct drm_device *drm)
0038 {
0039     return drm->dev_private;
0040 }
0041 
0042 int lcdif_kms_init(struct lcdif_drm_private *lcdif);
0043 
0044 #endif /* __LCDIF_DRV_H__ */