xref: /linux/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.h (revision 7f71507851fc7764b36a3221839607d3a45c2025)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
3  */
4 
5 #ifndef __DPU_VBIF_H__
6 #define __DPU_VBIF_H__
7 
8 #include "dpu_kms.h"
9 
10 struct dpu_vbif_set_ot_params {
11 	u32 xin_id;
12 	u32 num;
13 	u32 width;
14 	u32 height;
15 	u32 frame_rate;
16 	bool rd;
17 	bool is_wfd;
18 	u32 vbif_idx;
19 };
20 
21 struct dpu_vbif_set_memtype_params {
22 	u32 xin_id;
23 	u32 vbif_idx;
24 	bool is_cacheable;
25 };
26 
27 /**
28  * struct dpu_vbif_set_qos_params - QoS remapper parameter
29  * @vbif_idx: vbif identifier
30  * @xin_id: client interface identifier
31  * @num: pipe identifier (debug only)
32  * @is_rt: true if pipe is used in real-time use case
33  */
34 struct dpu_vbif_set_qos_params {
35 	u32 vbif_idx;
36 	u32 xin_id;
37 	u32 num;
38 	bool is_rt;
39 };
40 
41 void dpu_vbif_set_ot_limit(struct dpu_kms *dpu_kms,
42 		struct dpu_vbif_set_ot_params *params);
43 
44 void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms,
45 		struct dpu_vbif_set_qos_params *params);
46 
47 void dpu_vbif_clear_errors(struct dpu_kms *dpu_kms);
48 
49 void dpu_vbif_init_memtypes(struct dpu_kms *dpu_kms);
50 
51 void dpu_debugfs_vbif_init(struct dpu_kms *dpu_kms, struct dentry *debugfs_root);
52 
53 #endif /* __DPU_VBIF_H__ */
54