treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / gpu / drm / mediatek / mtk_drm_drv.h
blob17bc99b9f5d44417ec7cdeae59fe433acf2ad96d
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright (c) 2015 MediaTek Inc.
4 */
6 #ifndef MTK_DRM_DRV_H
7 #define MTK_DRM_DRV_H
9 #include <linux/io.h>
10 #include "mtk_drm_ddp_comp.h"
12 #define MAX_CRTC 3
13 #define MAX_CONNECTOR 2
15 struct device;
16 struct device_node;
17 struct drm_crtc;
18 struct drm_device;
19 struct drm_fb_helper;
20 struct drm_property;
21 struct regmap;
23 struct mtk_mmsys_driver_data {
24 const enum mtk_ddp_comp_id *main_path;
25 unsigned int main_len;
26 const enum mtk_ddp_comp_id *ext_path;
27 unsigned int ext_len;
28 const enum mtk_ddp_comp_id *third_path;
29 unsigned int third_len;
31 bool shadow_register;
34 struct mtk_drm_private {
35 struct drm_device *drm;
36 struct device *dma_dev;
38 unsigned int num_pipes;
40 struct device_node *mutex_node;
41 struct device *mutex_dev;
42 void __iomem *config_regs;
43 struct device_node *comp_node[DDP_COMPONENT_ID_MAX];
44 struct mtk_ddp_comp *ddp_comp[DDP_COMPONENT_ID_MAX];
45 const struct mtk_mmsys_driver_data *data;
46 struct drm_atomic_state *suspend_state;
48 bool dma_parms_allocated;
51 extern struct platform_driver mtk_ddp_driver;
52 extern struct platform_driver mtk_disp_color_driver;
53 extern struct platform_driver mtk_disp_ovl_driver;
54 extern struct platform_driver mtk_disp_rdma_driver;
55 extern struct platform_driver mtk_dpi_driver;
56 extern struct platform_driver mtk_dsi_driver;
57 extern struct platform_driver mtk_mipi_tx_driver;
59 #endif /* MTK_DRM_DRV_H */