brintos

brintos / linux-shallow public Read only

0
0
Text · 2.2 KiB · ce89798 Raw
86 lines · c
1/* SPDX-License-Identifier: GPL-2.0-only */2/*3 * Copyright (c) 2015 MediaTek Inc.4 */5 6#ifndef MTK_DRM_DRV_H7#define MTK_DRM_DRV_H8 9#include <linux/io.h>10#include "mtk_ddp_comp.h"11 12#define MAX_CONNECTOR	213#define DDP_COMPONENT_DRM_OVL_ADAPTOR (DDP_COMPONENT_ID_MAX + 1)14#define DDP_COMPONENT_DRM_ID_MAX (DDP_COMPONENT_DRM_OVL_ADAPTOR + 1)15 16enum mtk_crtc_path {17	CRTC_MAIN,18	CRTC_EXT,19	CRTC_THIRD,20	MAX_CRTC,21};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_route {32	const unsigned int crtc_id;33	const unsigned int route_ddp;34};35 36struct mtk_mmsys_driver_data {37	const unsigned int *main_path;38	unsigned int main_len;39	const unsigned int *ext_path;40	unsigned int ext_len;41	const unsigned int *third_path;42	unsigned int third_len;43	const struct mtk_drm_route *conn_routes;44	unsigned int num_conn_routes;45 46	bool shadow_register;47	unsigned int mmsys_id;48	unsigned int mmsys_dev_num;49 50	u16 max_width;51	u16 min_width;52	u16 min_height;53};54 55struct mtk_drm_private {56	struct drm_device *drm;57	struct device *dma_dev;58	bool mtk_drm_bound;59	bool drm_master;60	struct device *dev;61	struct device_node *mutex_node;62	struct device *mutex_dev;63	struct device *mmsys_dev;64	struct device_node *comp_node[DDP_COMPONENT_DRM_ID_MAX];65	struct mtk_ddp_comp ddp_comp[DDP_COMPONENT_DRM_ID_MAX];66	const struct mtk_mmsys_driver_data *data;67	struct drm_atomic_state *suspend_state;68	unsigned int mbox_index;69	struct mtk_drm_private **all_drm_private;70};71 72extern struct platform_driver mtk_disp_aal_driver;73extern struct platform_driver mtk_disp_ccorr_driver;74extern struct platform_driver mtk_disp_color_driver;75extern struct platform_driver mtk_disp_gamma_driver;76extern struct platform_driver mtk_disp_merge_driver;77extern struct platform_driver mtk_disp_ovl_adaptor_driver;78extern struct platform_driver mtk_disp_ovl_driver;79extern struct platform_driver mtk_disp_rdma_driver;80extern struct platform_driver mtk_dpi_driver;81extern struct platform_driver mtk_dsi_driver;82extern struct platform_driver mtk_ethdr_driver;83extern struct platform_driver mtk_mdp_rdma_driver;84extern struct platform_driver mtk_padding_driver;85#endif /* MTK_DRM_DRV_H */86