blob: df322a7a5fcbede3f24920c7265b8b7843abef7e [file] [log] [blame]
CK Hu119f5172016-01-04 18:36:34 +01001/*
2 * Copyright (c) 2015 MediaTek Inc.
3 *
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.
7 *
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.
12 */
13
14#ifndef MTK_DRM_DRV_H
15#define MTK_DRM_DRV_H
16
17#include <linux/io.h>
18#include "mtk_drm_ddp_comp.h"
19
20#define MAX_CRTC 2
21#define MAX_CONNECTOR 2
22
23struct device;
24struct device_node;
25struct drm_crtc;
26struct drm_device;
27struct drm_fb_helper;
28struct drm_property;
29struct regmap;
30
31struct mtk_drm_private {
32 struct drm_device *drm;
33 struct device *dma_dev;
34
CK Hu119f5172016-01-04 18:36:34 +010035 unsigned int num_pipes;
36
37 struct device_node *mutex_node;
38 struct device *mutex_dev;
39 void __iomem *config_regs;
40 struct device_node *comp_node[DDP_COMPONENT_ID_MAX];
41 struct mtk_ddp_comp *ddp_comp[DDP_COMPONENT_ID_MAX];
42
43 struct {
44 struct drm_atomic_state *state;
45 struct work_struct work;
46 struct mutex lock;
47 } commit;
48
49 struct drm_atomic_state *suspend_state;
50};
51
52extern struct platform_driver mtk_ddp_driver;
53extern struct platform_driver mtk_disp_ovl_driver;
54extern struct platform_driver mtk_disp_rdma_driver;
Jie Qiu9e629c12016-01-04 18:36:36 +010055extern struct platform_driver mtk_dpi_driver;
CK Hu2e54c142016-01-04 18:36:35 +010056extern struct platform_driver mtk_dsi_driver;
57extern struct platform_driver mtk_mipi_tx_driver;
CK Hu119f5172016-01-04 18:36:34 +010058
59#endif /* MTK_DRM_DRV_H */