![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0-only */ 0002 /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. 0003 */ 0004 0005 #ifndef _DPU_HW_VBIF_H 0006 #define _DPU_HW_VBIF_H 0007 0008 #include "dpu_hw_catalog.h" 0009 #include "dpu_hw_mdss.h" 0010 #include "dpu_hw_util.h" 0011 0012 struct dpu_hw_vbif; 0013 0014 /** 0015 * struct dpu_hw_vbif_ops : Interface to the VBIF hardware driver functions 0016 * Assumption is these functions will be called after clocks are enabled 0017 */ 0018 struct dpu_hw_vbif_ops { 0019 /** 0020 * set_limit_conf - set transaction limit config 0021 * @vbif: vbif context driver 0022 * @xin_id: client interface identifier 0023 * @rd: true for read limit; false for write limit 0024 * @limit: outstanding transaction limit 0025 */ 0026 void (*set_limit_conf)(struct dpu_hw_vbif *vbif, 0027 u32 xin_id, bool rd, u32 limit); 0028 0029 /** 0030 * get_limit_conf - get transaction limit config 0031 * @vbif: vbif context driver 0032 * @xin_id: client interface identifier 0033 * @rd: true for read limit; false for write limit 0034 * @return: outstanding transaction limit 0035 */ 0036 u32 (*get_limit_conf)(struct dpu_hw_vbif *vbif, 0037 u32 xin_id, bool rd); 0038 0039 /** 0040 * set_halt_ctrl - set halt control 0041 * @vbif: vbif context driver 0042 * @xin_id: client interface identifier 0043 * @enable: halt control enable 0044 */ 0045 void (*set_halt_ctrl)(struct dpu_hw_vbif *vbif, 0046 u32 xin_id, bool enable); 0047 0048 /** 0049 * get_halt_ctrl - get halt control 0050 * @vbif: vbif context driver 0051 * @xin_id: client interface identifier 0052 * @return: halt control enable 0053 */ 0054 bool (*get_halt_ctrl)(struct dpu_hw_vbif *vbif, 0055 u32 xin_id); 0056 0057 /** 0058 * set_qos_remap - set QoS priority remap 0059 * @vbif: vbif context driver 0060 * @xin_id: client interface identifier 0061 * @level: priority level 0062 * @remap_level: remapped level 0063 */ 0064 void (*set_qos_remap)(struct dpu_hw_vbif *vbif, 0065 u32 xin_id, u32 level, u32 remap_level); 0066 0067 /** 0068 * set_mem_type - set memory type 0069 * @vbif: vbif context driver 0070 * @xin_id: client interface identifier 0071 * @value: memory type value 0072 */ 0073 void (*set_mem_type)(struct dpu_hw_vbif *vbif, 0074 u32 xin_id, u32 value); 0075 0076 /** 0077 * clear_errors - clear any vbif errors 0078 * This function clears any detected pending/source errors 0079 * on the VBIF interface, and optionally returns the detected 0080 * error mask(s). 0081 * @vbif: vbif context driver 0082 * @pnd_errors: pointer to pending error reporting variable 0083 * @src_errors: pointer to source error reporting variable 0084 */ 0085 void (*clear_errors)(struct dpu_hw_vbif *vbif, 0086 u32 *pnd_errors, u32 *src_errors); 0087 0088 /** 0089 * set_write_gather_en - set write_gather enable 0090 * @vbif: vbif context driver 0091 * @xin_id: client interface identifier 0092 */ 0093 void (*set_write_gather_en)(struct dpu_hw_vbif *vbif, u32 xin_id); 0094 }; 0095 0096 struct dpu_hw_vbif { 0097 /* base */ 0098 struct dpu_hw_blk_reg_map hw; 0099 0100 /* vbif */ 0101 enum dpu_vbif idx; 0102 const struct dpu_vbif_cfg *cap; 0103 0104 /* ops */ 0105 struct dpu_hw_vbif_ops ops; 0106 }; 0107 0108 /** 0109 * dpu_hw_vbif_init - initializes the vbif driver for the passed interface idx 0110 * @idx: Interface index for which driver object is required 0111 * @addr: Mapped register io address of MDSS 0112 * @m: Pointer to mdss catalog data 0113 */ 0114 struct dpu_hw_vbif *dpu_hw_vbif_init(enum dpu_vbif idx, 0115 void __iomem *addr, 0116 const struct dpu_mdss_cfg *m); 0117 0118 void dpu_hw_vbif_destroy(struct dpu_hw_vbif *vbif); 0119 0120 #endif /*_DPU_HW_VBIF_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |