Linux 4.9.243
[linux/fpc-iii.git] / drivers / gpu / drm / mediatek / mtk_drm_drv.h
blobaa9389446785f5115f9d24fb34919bb7f9dc6deb
1 /*
2 * Copyright (c) 2015 MediaTek Inc.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
14 #ifndef MTK_DRM_DRV_H
15 #define MTK_DRM_DRV_H
17 #include <linux/io.h>
18 #include "mtk_drm_ddp_comp.h"
20 #define MAX_CRTC 2
21 #define MAX_CONNECTOR 2
23 struct device;
24 struct device_node;
25 struct drm_crtc;
26 struct drm_device;
27 struct drm_fb_helper;
28 struct drm_property;
29 struct regmap;
31 struct mtk_drm_private {
32 struct drm_device *drm;
33 struct device *dma_dev;
35 struct drm_crtc *crtc[MAX_CRTC];
36 unsigned int num_pipes;
38 struct device_node *mutex_node;
39 struct device *mutex_dev;
40 void __iomem *config_regs;
41 struct device_node *comp_node[DDP_COMPONENT_ID_MAX];
42 struct mtk_ddp_comp *ddp_comp[DDP_COMPONENT_ID_MAX];
44 struct {
45 struct drm_atomic_state *state;
46 struct work_struct work;
47 struct mutex lock;
48 } commit;
50 struct drm_atomic_state *suspend_state;
53 extern struct platform_driver mtk_ddp_driver;
54 extern struct platform_driver mtk_disp_ovl_driver;
55 extern struct platform_driver mtk_disp_rdma_driver;
56 extern struct platform_driver mtk_dpi_driver;
57 extern struct platform_driver mtk_dsi_driver;
58 extern struct platform_driver mtk_mipi_tx_driver;
60 #endif /* MTK_DRM_DRV_H */