Lines Matching full:fw

17 static int fw_next(struct tegra_drm_firewall *fw, u32 *word)  in fw_next()  argument
19 if (fw->pos == fw->end) in fw_next()
22 *word = fw->data[fw->pos++]; in fw_next()
27 static bool fw_check_addr_valid(struct tegra_drm_firewall *fw, u32 offset) in fw_check_addr_valid() argument
31 for (i = 0; i < fw->submit->num_used_mappings; i++) { in fw_check_addr_valid()
32 struct tegra_drm_mapping *m = fw->submit->used_mappings[i].mapping; in fw_check_addr_valid()
41 static int fw_check_reg(struct tegra_drm_firewall *fw, u32 offset) in fw_check_reg() argument
47 err = fw_next(fw, &word); in fw_check_reg()
51 if (!fw->client->ops->is_addr_reg) in fw_check_reg()
54 is_addr = fw->client->ops->is_addr_reg(fw->client->base.dev, fw->class, in fw_check_reg()
60 if (!fw_check_addr_valid(fw, word)) in fw_check_reg()
66 static int fw_check_regs_seq(struct tegra_drm_firewall *fw, u32 offset, in fw_check_regs_seq() argument
72 if (fw_check_reg(fw, offset)) in fw_check_regs_seq()
82 static int fw_check_regs_mask(struct tegra_drm_firewall *fw, u32 offset, in fw_check_regs_mask() argument
89 if (fw_check_reg(fw, offset+bit)) in fw_check_regs_mask()
96 static int fw_check_regs_imm(struct tegra_drm_firewall *fw, u32 offset) in fw_check_regs_imm() argument
100 if (!fw->client->ops->is_addr_reg) in fw_check_regs_imm()
103 is_addr = fw->client->ops->is_addr_reg(fw->client->base.dev, fw->class, in fw_check_regs_imm()
111 static int fw_check_class(struct tegra_drm_firewall *fw, u32 class) in fw_check_class() argument
113 if (!fw->client->ops->is_valid_class) { in fw_check_class()
114 if (class == fw->client->base.class) in fw_check_class()
120 if (!fw->client->ops->is_valid_class(class)) in fw_check_class()
148 struct tegra_drm_firewall fw = { in tegra_drm_fw_validate() local
160 while (fw.pos != fw.end) { in tegra_drm_fw_validate()
163 err = fw_next(&fw, &word); in tegra_drm_fw_validate()
174 err = fw_check_class(&fw, class); in tegra_drm_fw_validate()
175 fw.class = class; in tegra_drm_fw_validate()
178 err = fw_check_regs_mask(&fw, offset, mask); in tegra_drm_fw_validate()
182 offset, mask, class, fw.pos-1); in tegra_drm_fw_validate()
187 err = fw_check_regs_seq(&fw, offset, count, true); in tegra_drm_fw_validate()
191 offset, count, fw.class, fw.pos-1); in tegra_drm_fw_validate()
196 err = fw_check_regs_seq(&fw, offset, count, false); in tegra_drm_fw_validate()
200 offset, count, fw.class, fw.pos-1); in tegra_drm_fw_validate()
205 err = fw_check_regs_mask(&fw, offset, mask); in tegra_drm_fw_validate()
209 offset, mask, fw.class, fw.pos-1); in tegra_drm_fw_validate()
214 err = fw_check_regs_imm(&fw, offset); in tegra_drm_fw_validate()
218 offset, fw.class, fw.pos-1); in tegra_drm_fw_validate()
229 err = fw_check_regs_seq(&fw, offset, payload, true); in tegra_drm_fw_validate()
233 offset, fw.class, fw.pos-1); in tegra_drm_fw_validate()
240 err = fw_check_regs_seq(&fw, offset, payload, false); in tegra_drm_fw_validate()
244 offset, fw.class, fw.pos-1); in tegra_drm_fw_validate()
248 fw.pos-1); in tegra_drm_fw_validate()