From: kernel test robot <lkp@intel.com>
To: Dikshita Agarwal via B4 Relay
<devnull+quic_dikshita.quicinc.com@kernel.org>,
Vikash Garodia <quic_vgarodia@quicinc.com>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>
Cc: oe-kbuild-all@lists.linux.dev, linux-media@vger.kernel.org,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Dikshita Agarwal <quic_dikshita@quicinc.com>
Subject: Re: [PATCH v3 07/29] media: iris: implement video firmware load/unload
Date: Wed, 28 Aug 2024 07:13:58 +0800 [thread overview]
Message-ID: <202408280657.WziT1uXM-lkp@intel.com> (raw)
In-Reply-To: <20240827-iris_v3-v3-7-c5fdbbe65e70@quicinc.com>
Hi Dikshita,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 31aaa7d95e09892c81df0d7c49ae85640fa4e202]
url: https://github.com/intel-lab-lkp/linux/commits/Dikshita-Agarwal-via-B4-Relay/dt-bindings-media-Add-sm8550-dt-schema/20240827-181059
base: 31aaa7d95e09892c81df0d7c49ae85640fa4e202
patch link: https://lore.kernel.org/r/20240827-iris_v3-v3-7-c5fdbbe65e70%40quicinc.com
patch subject: [PATCH v3 07/29] media: iris: implement video firmware load/unload
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20240828/202408280657.WziT1uXM-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240828/202408280657.WziT1uXM-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408280657.WziT1uXM-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from include/linux/of_reserved_mem.h:5,
from drivers/media/platform/qcom/iris/iris_firmware.c:9:
drivers/media/platform/qcom/iris/iris_firmware.c: In function 'iris_load_fw_to_memory':
>> drivers/media/platform/qcom/iris/iris_firmware.c:80:36: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'ssize_t' {aka 'int'} [-Wformat=]
80 | dev_err(core->dev, "out of bound fw image fw size: %ld, res_size: %lu\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:154:56: note: in expansion of macro 'dev_fmt'
154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/media/platform/qcom/iris/iris_firmware.c:80:17: note: in expansion of macro 'dev_err'
80 | dev_err(core->dev, "out of bound fw image fw size: %ld, res_size: %lu\n",
| ^~~~~~~
drivers/media/platform/qcom/iris/iris_firmware.c:80:70: note: format string is defined here
80 | dev_err(core->dev, "out of bound fw image fw size: %ld, res_size: %lu\n",
| ~~^
| |
| long int
| %d
>> drivers/media/platform/qcom/iris/iris_firmware.c:80:36: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
80 | dev_err(core->dev, "out of bound fw image fw size: %ld, res_size: %lu\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:154:56: note: in expansion of macro 'dev_fmt'
154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/media/platform/qcom/iris/iris_firmware.c:80:17: note: in expansion of macro 'dev_err'
80 | dev_err(core->dev, "out of bound fw image fw size: %ld, res_size: %lu\n",
| ^~~~~~~
drivers/media/platform/qcom/iris/iris_firmware.c:80:85: note: format string is defined here
80 | dev_err(core->dev, "out of bound fw image fw size: %ld, res_size: %lu\n",
| ~~^
| |
| long unsigned int
| %u
vim +80 drivers/media/platform/qcom/iris/iris_firmware.c
> 9 #include <linux/of_reserved_mem.h>
10 #include <linux/soc/qcom/mdt_loader.h>
11
12 #include "iris_core.h"
13 #include "iris_firmware.h"
14
15 #define MAX_FIRMWARE_NAME_SIZE 128
16
17 static int iris_protect_cp_mem(struct iris_core *core)
18 {
19 struct tz_cp_config *cp_config;
20 int ret;
21
22 cp_config = core->iris_platform_data->tz_cp_config_data;
23
24 ret = qcom_scm_mem_protect_video_var(cp_config->cp_start,
25 cp_config->cp_size,
26 cp_config->cp_nonpixel_start,
27 cp_config->cp_nonpixel_size);
28 if (ret)
29 dev_err(core->dev, "failed to protect memory(%d)\n", ret);
30
31 return ret;
32 }
33
34 static int iris_load_fw_to_memory(struct iris_core *core, const char *fw_name)
35 {
36 const struct firmware *firmware = NULL;
37 struct device_node *node = NULL;
38 struct reserved_mem *rmem;
39 phys_addr_t mem_phys = 0;
40 void *mem_virt = NULL;
41 size_t res_size = 0;
42 ssize_t fw_size = 0;
43 struct device *dev;
44 int pas_id = 0;
45 int ret;
46
47 if (!fw_name || !(*fw_name) || !core)
48 return -EINVAL;
49
50 dev = core->dev;
51
52 if (strlen(fw_name) >= MAX_FIRMWARE_NAME_SIZE - 4)
53 return -EINVAL;
54
55 pas_id = core->iris_platform_data->pas_id;
56
57 node = of_parse_phandle(dev->of_node, "memory-region", 0);
58 if (!node)
59 return -EINVAL;
60
61 rmem = of_reserved_mem_lookup(node);
62 if (!rmem) {
63 ret = -EINVAL;
64 goto err_put_node;
65 }
66
67 mem_phys = rmem->base;
68 res_size = rmem->size;
69
70 ret = request_firmware(&firmware, fw_name, dev);
71 if (ret) {
72 dev_err(core->dev, "failed to request fw \"%s\", error %d\n",
73 fw_name, ret);
74 goto err_put_node;
75 }
76
77 fw_size = qcom_mdt_get_size(firmware);
78 if (fw_size < 0 || res_size < (size_t)fw_size) {
79 ret = -EINVAL;
> 80 dev_err(core->dev, "out of bound fw image fw size: %ld, res_size: %lu\n",
81 fw_size, res_size);
82 goto err_release_fw;
83 }
84
85 mem_virt = memremap(mem_phys, res_size, MEMREMAP_WC);
86 if (!mem_virt) {
87 dev_err(core->dev, "failed to remap fw memory phys %pa[p]\n",
88 &mem_phys);
89 goto err_release_fw;
90 }
91
92 ret = qcom_mdt_load(dev, firmware, fw_name,
93 pas_id, mem_virt, mem_phys, res_size, NULL);
94 if (ret) {
95 dev_err(core->dev, "error %d loading fw \"%s\"\n",
96 ret, fw_name);
97 goto err_mem_unmap;
98 }
99 ret = qcom_scm_pas_auth_and_reset(pas_id);
100 if (ret) {
101 dev_err(core->dev, "error %d authenticating fw \"%s\"\n",
102 ret, fw_name);
103 goto err_mem_unmap;
104 }
105
106 return ret;
107
108 err_mem_unmap:
109 memunmap(mem_virt);
110 err_release_fw:
111 release_firmware(firmware);
112 err_put_node:
113 of_node_put(node);
114 return ret;
115 }
116
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-08-27 23:14 UTC|newest]
Thread overview: 93+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-27 10:05 [PATCH v3 00/29] Qualcomm iris video decoder driver Dikshita Agarwal via B4 Relay
2024-08-27 10:05 ` [PATCH v3 01/29] dt-bindings: media: Add sm8550 dt schema Dikshita Agarwal via B4 Relay
2024-08-27 10:42 ` Krzysztof Kozlowski
2024-09-05 5:41 ` Dikshita Agarwal
2024-08-27 10:05 ` [PATCH v3 02/29] media: MAINTAINERS: Add Qualcomm Iris video accelerator driver Dikshita Agarwal via B4 Relay
2024-08-27 10:42 ` Krzysztof Kozlowski
2024-09-05 5:47 ` Dikshita Agarwal
2024-09-05 10:10 ` Dmitry Baryshkov
2024-09-05 11:02 ` Dikshita Agarwal
2024-09-05 11:02 ` Dmitry Baryshkov
2024-09-05 11:14 ` Dikshita Agarwal
2024-08-27 10:05 ` [PATCH v3 03/29] media: iris: add platform driver for iris video device Dikshita Agarwal via B4 Relay
2024-08-27 14:08 ` Bryan O'Donoghue
2024-08-29 9:13 ` Dmitry Baryshkov
2024-08-29 9:36 ` Bryan O'Donoghue
2024-09-05 6:12 ` Dikshita Agarwal
2024-09-05 6:15 ` Dikshita Agarwal
2024-09-05 10:11 ` Dmitry Baryshkov
2024-09-05 10:59 ` Dikshita Agarwal
2024-09-05 11:07 ` Dmitry Baryshkov
2024-09-05 11:13 ` Dikshita Agarwal
2024-08-27 10:05 ` [PATCH v3 04/29] media: iris: initialize power resources Dikshita Agarwal via B4 Relay
2024-08-27 10:51 ` Krzysztof Kozlowski
2024-09-05 11:53 ` Dikshita Agarwal
2024-09-05 11:57 ` Krzysztof Kozlowski
2024-09-06 11:21 ` Vikash Garodia
2024-09-06 12:04 ` Krzysztof Kozlowski
2024-09-06 19:47 ` Vikash Garodia
2024-09-07 9:07 ` Krzysztof Kozlowski
2024-08-27 10:05 ` [PATCH v3 05/29] media: iris: implement iris v4l2 file ops Dikshita Agarwal via B4 Relay
2024-09-06 19:05 ` Markus Elfring
2024-09-07 8:52 ` Markus Elfring
2024-08-27 10:05 ` [PATCH v3 06/29] media: iris: introduce iris core state management with shared queues Dikshita Agarwal via B4 Relay
2024-08-28 2:38 ` kernel test robot
2024-08-27 10:05 ` [PATCH v3 07/29] media: iris: implement video firmware load/unload Dikshita Agarwal via B4 Relay
2024-08-27 23:13 ` kernel test robot [this message]
2024-08-31 13:18 ` Bryan O'Donoghue
2024-09-02 0:04 ` Dmitry Baryshkov
2024-09-05 6:17 ` Dikshita Agarwal
2024-08-27 10:05 ` [PATCH v3 08/29] media: iris: implement boot sequence of the firmware Dikshita Agarwal via B4 Relay
2024-09-05 12:34 ` Bryan O'Donoghue
2024-09-06 11:27 ` Vikash Garodia
2024-08-27 10:05 ` [PATCH v3 09/29] media: iris: introduce Host firmware interface with necessary hooks Dikshita Agarwal via B4 Relay
2024-09-05 12:36 ` Bryan O'Donoghue
2024-09-24 9:13 ` Dikshita Agarwal
2024-09-05 13:10 ` Bryan O'Donoghue
2024-09-06 13:31 ` Vikash Garodia
2024-08-27 10:05 ` [PATCH v3 10/29] media: iris: implement power management Dikshita Agarwal via B4 Relay
2024-09-05 13:23 ` Bryan O'Donoghue
2024-09-05 13:46 ` Krzysztof Kozlowski
2024-09-24 8:38 ` Dikshita Agarwal
2024-09-24 8:36 ` Dikshita Agarwal
2024-08-27 10:05 ` [PATCH v3 11/29] media: iris: implement reqbuf ioctl with vb2_queue_setup Dikshita Agarwal via B4 Relay
2024-09-06 12:50 ` Bryan O'Donoghue
2024-09-06 13:05 ` Bryan O'Donoghue
2024-09-26 10:47 ` Dikshita Agarwal
2024-08-27 10:05 ` [PATCH v3 12/29] media: iris: implement s_fmt, g_fmt and try_fmt ioctls Dikshita Agarwal via B4 Relay
2024-09-24 14:41 ` Bryan O'Donoghue
2024-09-26 10:49 ` Dikshita Agarwal
2024-08-27 10:05 ` [PATCH v3 13/29] media: iris: implement g_selection ioctl Dikshita Agarwal via B4 Relay
2024-08-27 10:05 ` [PATCH v3 14/29] media: iris: implement enum_fmt and enum_frameintervals ioctls Dikshita Agarwal via B4 Relay
2024-08-27 10:05 ` [PATCH v3 15/29] media: iris: implement subscribe_event and unsubscribe_event ioctls Dikshita Agarwal via B4 Relay
2024-08-27 10:05 ` [PATCH v3 16/29] media: iris: implement iris v4l2_ctrl_ops and prepare capabilities Dikshita Agarwal via B4 Relay
2024-08-29 9:33 ` Dmitry Baryshkov
2024-10-01 13:01 ` Vedang Nagar
2024-10-06 16:46 ` Dmitry Baryshkov
2024-08-27 10:05 ` [PATCH v3 17/29] media: iris: implement query_cap, query_ctrl and query_menu ioctls Dikshita Agarwal via B4 Relay
2024-09-24 14:49 ` Bryan O'Donoghue
2024-09-26 10:50 ` Dikshita Agarwal
2024-08-27 10:05 ` [PATCH v3 18/29] media: iris: implement vb2 streaming ops Dikshita Agarwal via B4 Relay
2024-08-28 0:26 ` kernel test robot
2024-08-27 10:05 ` [PATCH v3 19/29] media: iris: implement set properties to firmware during streamon Dikshita Agarwal via B4 Relay
2024-09-24 15:09 ` Bryan O'Donoghue
2024-08-27 10:05 ` [PATCH v3 20/29] media: iris: subscribe parameters and properties to firmware for hfi_gen2 Dikshita Agarwal via B4 Relay
2024-09-24 15:16 ` Bryan O'Donoghue
2024-09-26 10:55 ` Dikshita Agarwal
2024-08-27 10:05 ` [PATCH v3 21/29] media: iris: allocate, initialize and queue internal buffers Dikshita Agarwal via B4 Relay
2024-08-27 10:05 ` [PATCH v3 22/29] media: iris: implement vb2 ops for buf_queue and firmware response Dikshita Agarwal via B4 Relay
2024-08-27 10:05 ` [PATCH v3 23/29] media: iris: add support for dynamic resolution change Dikshita Agarwal via B4 Relay
2024-08-27 10:05 ` [PATCH v3 24/29] media: iris: handle streamoff/on from client in " Dikshita Agarwal via B4 Relay
2024-08-27 10:05 ` [PATCH v3 25/29] media: iris: add support for drain sequence Dikshita Agarwal via B4 Relay
2024-08-27 10:05 ` [PATCH v3 26/29] media: iris: add check whether the video session is supported or not Dikshita Agarwal via B4 Relay
2024-08-27 10:05 ` [PATCH v3 27/29] media: iris: implement power scaling for vpu2 and vpu3 Dikshita Agarwal via B4 Relay
2024-08-27 10:05 ` [PATCH v3 28/29] media: iris: add allow checks for v4l2 ioctls Dikshita Agarwal via B4 Relay
2024-08-27 10:05 ` [PATCH v3 29/29] media: iris: add check to allow sub states transitions Dikshita Agarwal via B4 Relay
2024-08-27 13:41 ` [PATCH v3 00/29] Qualcomm iris video decoder driver neil.armstrong
2024-09-24 9:13 ` Dikshita Agarwal
2024-10-01 13:28 ` Neil Armstrong
2024-08-31 15:18 ` Bryan O'Donoghue
2024-09-02 0:02 ` Dmitry Baryshkov
2024-09-06 14:19 ` Nicolas Dufresne
2024-09-06 19:26 ` Vikash Garodia
2024-09-06 16:28 ` Abhinav Kumar
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=202408280657.WziT1uXM-lkp@intel.com \
--to=lkp@intel.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=devnull+quic_dikshita.quicinc.com@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=p.zabel@pengutronix.de \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_dikshita@quicinc.com \
--cc=quic_vgarodia@quicinc.com \
--cc=robh@kernel.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).