From: kbuild test robot <lkp@intel.com>
To: Vikash Garodia <vgarodia@codeaurora.org>
Cc: kbuild-all@01.org, stanimir.varbanov@linaro.org,
hverkuil@xs4all.nl, mchehab@kernel.org, robh@kernel.org,
mark.rutland@arm.com, andy.gross@linaro.org, arnd@arndb.de,
bjorn.andersson@linaro.org, linux-media@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-soc@vger.kernel.org, devicetree@vger.kernel.org,
acourbot@chromium.org, vgarodia@codeaurora.org
Subject: Re: [PATCH v6 4/4] venus: firmware: register separate platform_device for firmware loader
Date: Thu, 30 Aug 2018 11:53:17 +0800 [thread overview]
Message-ID: <201808301109.wavug380%fengguang.wu@intel.com> (raw)
In-Reply-To: <1535034528-11590-5-git-send-email-vgarodia@codeaurora.org>
[-- Attachment #1: Type: text/plain, Size: 7699 bytes --]
Hi Stanimir,
I love your patch! Yet something to improve:
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v4.19-rc1 next-20180829]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Vikash-Garodia/Venus-updates-PIL/20180824-023823
base: git://linuxtv.org/media_tree.git master
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=arm
All errors (new ones prefixed by >>):
drivers/media/platform/qcom/venus/firmware.c: In function 'venus_load_fw':
drivers/media/platform/qcom/venus/firmware.c:113:9: error: implicit declaration of function 'qcom_mdt_load_no_init'; did you mean 'qcom_mdt_load'? [-Werror=implicit-function-declaration]
ret = qcom_mdt_load_no_init(dev, mdt, fwname, VENUS_PAS_ID,
^~~~~~~~~~~~~~~~~~~~~
qcom_mdt_load
drivers/media/platform/qcom/venus/firmware.c: In function 'venus_firmware_init':
>> drivers/media/platform/qcom/venus/firmware.c:258:8: error: too few arguments to function 'of_dma_configure'
ret = of_dma_configure(&pdev->dev, np);
^~~~~~~~~~~~~~~~
In file included from drivers/media/platform/qcom/venus/firmware.c:23:0:
include/linux/of_device.h:58:5: note: declared here
int of_dma_configure(struct device *dev,
^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/of_dma_configure +258 drivers/media/platform/qcom/venus/firmware.c
65
66 static int venus_load_fw(struct venus_core *core, const char *fwname,
67 phys_addr_t *mem_phys, size_t *mem_size)
68 {
69 const struct firmware *mdt;
70 struct device_node *node;
71 struct device *dev;
72 struct resource r;
73 ssize_t fw_size;
74 void *mem_va;
75 int ret;
76
77 dev = core->dev;
78 node = of_parse_phandle(dev->of_node, "memory-region", 0);
79 if (!node) {
80 dev_err(dev, "no memory-region specified\n");
81 return -EINVAL;
82 }
83
84 ret = of_address_to_resource(node, 0, &r);
85 if (ret)
86 return ret;
87
88 *mem_phys = r.start;
89 *mem_size = resource_size(&r);
90
91 if (*mem_size < VENUS_FW_MEM_SIZE)
92 return -EINVAL;
93
94 mem_va = memremap(r.start, *mem_size, MEMREMAP_WC);
95 if (!mem_va) {
96 dev_err(dev, "unable to map memory region: %pa+%zx\n",
97 &r.start, *mem_size);
98 return -ENOMEM;
99 }
100
101 ret = request_firmware(&mdt, fwname, dev);
102 if (ret < 0)
103 goto err_unmap;
104
105 fw_size = qcom_mdt_get_size(mdt);
106 if (fw_size < 0) {
107 ret = fw_size;
108 release_firmware(mdt);
109 goto err_unmap;
110 }
111
112 if (core->no_tz)
> 113 ret = qcom_mdt_load_no_init(dev, mdt, fwname, VENUS_PAS_ID,
114 mem_va, *mem_phys, *mem_size, NULL);
115 else
116 ret = qcom_mdt_load(dev, mdt, fwname, VENUS_PAS_ID,
117 mem_va, *mem_phys, *mem_size, NULL);
118
119 release_firmware(mdt);
120
121 err_unmap:
122 memunmap(mem_va);
123 return ret;
124 }
125
126 static int venus_boot_no_tz(struct venus_core *core, phys_addr_t mem_phys,
127 size_t mem_size)
128 {
129 struct iommu_domain *iommu_dom;
130 struct device *dev;
131 int ret;
132
133 dev = core->fw.dev;
134 if (!dev)
135 return -EPROBE_DEFER;
136
137 iommu_dom = iommu_domain_alloc(&platform_bus_type);
138 if (!iommu_dom) {
139 dev_err(dev, "Failed to allocate iommu domain\n");
140 return -ENOMEM;
141 }
142
143 ret = iommu_attach_device(iommu_dom, dev);
144 if (ret) {
145 dev_err(dev, "could not attach device\n");
146 goto err_attach;
147 }
148
149 ret = iommu_map(iommu_dom, VENUS_FW_START_ADDR, mem_phys, mem_size,
150 IOMMU_READ | IOMMU_WRITE | IOMMU_PRIV);
151 if (ret) {
152 dev_err(dev, "could not map video firmware region\n");
153 goto err_map;
154 }
155
156 core->fw.iommu_domain = iommu_dom;
157 venus_reset_cpu(core);
158
159 return 0;
160
161 err_map:
162 iommu_detach_device(iommu_dom, dev);
163 err_attach:
164 iommu_domain_free(iommu_dom);
165 return ret;
166 }
167
168 static int venus_shutdown_no_tz(struct venus_core *core)
169 {
170 struct iommu_domain *iommu;
171 size_t unmapped;
172 u32 reg;
173 struct device *dev = core->fw.dev;
174 void __iomem *base = core->base;
175
176 /* Assert the reset to ARM9 */
177 reg = readl_relaxed(base + WRAPPER_A9SS_SW_RESET);
178 reg |= WRAPPER_A9SS_SW_RESET_BIT;
179 writel_relaxed(reg, base + WRAPPER_A9SS_SW_RESET);
180
181 /* Make sure reset is asserted before the mapping is removed */
182 mb();
183
184 iommu = core->fw.iommu_domain;
185
186 unmapped = iommu_unmap(iommu, VENUS_FW_START_ADDR, VENUS_FW_MEM_SIZE);
187 if (unmapped != VENUS_FW_MEM_SIZE)
188 dev_err(dev, "failed to unmap firmware\n");
189
190 iommu_detach_device(iommu, dev);
191 iommu_domain_free(iommu);
192
193 return 0;
194 }
195
196 int venus_boot(struct venus_core *core)
197 {
198 struct device *dev = core->dev;
199 phys_addr_t mem_phys;
200 size_t mem_size;
201 int ret;
202
203 if (!IS_ENABLED(CONFIG_QCOM_MDT_LOADER) ||
204 (!core->no_tz && !qcom_scm_is_available()))
205 return -EPROBE_DEFER;
206
207 ret = venus_load_fw(core, core->res->fwname, &mem_phys, &mem_size);
208 if (ret) {
209 dev_err(dev, "fail to load video firmware\n");
210 return -EINVAL;
211 }
212
213 if (core->no_tz)
214 ret = venus_boot_no_tz(core, mem_phys, mem_size);
215 else
216 ret = qcom_scm_pas_auth_and_reset(VENUS_PAS_ID);
217
218 return ret;
219 }
220
221 int venus_shutdown(struct venus_core *core)
222 {
223 int ret;
224
225 if (core->no_tz)
226 ret = venus_shutdown_no_tz(core);
227 else
228 ret = qcom_scm_pas_shutdown(VENUS_PAS_ID);
229
230 return ret;
231 }
232
233 int venus_firmware_init(struct venus_core *core)
234 {
235 struct platform_device_info info;
236 struct platform_device *pdev;
237 struct device_node *np;
238 int ret;
239
240 np = of_get_child_by_name(core->dev->of_node, "video-firmware");
241 if (!np)
242 return 0;
243
244 memset(&info, 0, sizeof(info));
245 info.fwnode = &np->fwnode;
246 info.parent = core->dev;
247 info.name = np->name;
248 info.dma_mask = DMA_BIT_MASK(32);
249
250 pdev = platform_device_register_full(&info);
251 if (IS_ERR(pdev)) {
252 of_node_put(np);
253 return PTR_ERR(pdev);
254 }
255
256 pdev->dev.of_node = np;
257
> 258 ret = of_dma_configure(&pdev->dev, np);
259 if (ret)
260 dev_err(core->dev, "dma configure fail\n");
261
262 of_node_put(np);
263
264 if (ret)
265 return ret;
266
267 core->no_tz = true;
268 core->fw.dev = &pdev->dev;
269
270 return 0;
271 }
272
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 66120 bytes --]
next prev parent reply other threads:[~2018-08-30 3:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-23 14:28 [PATCH v6 0/4] Venus updates - PIL Vikash Garodia
2018-08-23 14:28 ` [PATCH v6 1/4] venus: firmware: add routine to reset ARM9 Vikash Garodia
2018-08-24 7:38 ` Alexandre Courbot
2018-08-24 8:57 ` Stanimir Varbanov
2018-08-24 12:35 ` Vikash Garodia
2018-08-27 3:04 ` Alexandre Courbot
2018-08-27 10:56 ` Stanimir Varbanov
2018-08-28 5:43 ` Alexandre Courbot
2018-08-23 14:28 ` [PATCH v6 2/4] venus: firmware: move load firmware in a separate function Vikash Garodia
2018-08-24 7:39 ` Alexandre Courbot
2018-08-24 9:01 ` Stanimir Varbanov
2018-08-27 3:10 ` Alexandre Courbot
2018-08-23 14:28 ` [PATCH v6 3/4] venus: firmware: add no TZ boot and shutdown routine Vikash Garodia
2018-08-24 7:39 ` Alexandre Courbot
2018-08-24 12:26 ` Vikash Garodia
2018-08-27 3:06 ` Alexandre Courbot
2018-08-27 12:49 ` Vikash Garodia
2018-08-28 5:45 ` Alexandre Courbot
2018-08-23 14:28 ` [PATCH v6 4/4] venus: firmware: register separate platform_device for firmware loader Vikash Garodia
2018-08-24 6:45 ` Stephen Boyd
2018-08-24 7:39 ` Alexandre Courbot
2018-08-28 22:15 ` Rob Herring
2018-08-30 3:53 ` kbuild test robot [this message]
2018-08-24 7:39 ` [PATCH v6 0/4] Venus updates - PIL Alexandre Courbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201808301109.wavug380%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=acourbot@chromium.org \
--cc=andy.gross@linaro.org \
--cc=arnd@arndb.de \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil@xs4all.nl \
--cc=kbuild-all@01.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-soc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mchehab@kernel.org \
--cc=robh@kernel.org \
--cc=stanimir.varbanov@linaro.org \
--cc=vgarodia@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).