• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
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_DDP_H
15 #define MTK_DRM_DDP_H
16 
17 #include "mtk_drm_ddp_comp.h"
18 
19 struct regmap;
20 struct device;
21 struct mtk_disp_mutex;
22 
23 void mtk_ddp_add_comp_to_path(void __iomem *config_regs,
24 			      enum mtk_ddp_comp_id cur,
25 			      enum mtk_ddp_comp_id next);
26 void mtk_ddp_remove_comp_from_path(void __iomem *config_regs,
27 				   enum mtk_ddp_comp_id cur,
28 				   enum mtk_ddp_comp_id next);
29 
30 struct mtk_disp_mutex *mtk_disp_mutex_get(struct device *dev, unsigned int id);
31 int mtk_disp_mutex_prepare(struct mtk_disp_mutex *mutex);
32 void mtk_disp_mutex_add_comp(struct mtk_disp_mutex *mutex,
33 			     enum mtk_ddp_comp_id id);
34 void mtk_disp_mutex_enable(struct mtk_disp_mutex *mutex);
35 void mtk_disp_mutex_disable(struct mtk_disp_mutex *mutex);
36 void mtk_disp_mutex_remove_comp(struct mtk_disp_mutex *mutex,
37 				enum mtk_ddp_comp_id id);
38 void mtk_disp_mutex_unprepare(struct mtk_disp_mutex *mutex);
39 void mtk_disp_mutex_put(struct mtk_disp_mutex *mutex);
40 
41 #endif /* MTK_DRM_DDP_H */
42