tree:
https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: e92ded952728bab9fd34be3b2c27aa5452223ced
commit: 6013f1550f9151fdb4c1875743ccbf1453bbb9ad [61/63] CHROMIUM: media: platform:
mtk-mdp3: add mt8192 settings
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add chrome-os
https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout 6013f1550f9151fdb4c1875743ccbf1453bbb9ad
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/vdso/const.h:5,
from include/linux/const.h:4,
from include/linux/list.h:8,
from include/linux/mutex.h:15,
from include/linux/remoteproc.h:39,
from drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:7:
drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c: In function
'mdp_vpu_dev_init':
> drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:179:15: warning:
cast from pointer to integer of different size [-Wpointer-to-int-cast]
179 |
pool = ALIGN((phys_addr_t)vpu->work + vpu->work_size, 8);
| ^
include/uapi/linux/const.h:32:41: note: in definition of macro
'__ALIGN_KERNEL_MASK'
32 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
| ^
include/linux/kernel.h:33:22: note: in expansion of macro '__ALIGN_KERNEL'
33 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
| ^~~~~~~~~~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:179:9: note: in expansion of macro
'ALIGN'
179 | pool = ALIGN((phys_addr_t)vpu->work + vpu->work_size, 8);
| ^~~~~
> drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:179:15: warning:
cast from pointer to integer of different size [-Wpointer-to-int-cast]
179 |
pool = ALIGN((phys_addr_t)vpu->work + vpu->work_size, 8);
| ^
include/uapi/linux/const.h:32:47: note: in definition of macro
'__ALIGN_KERNEL_MASK'
32 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
| ^~~~
include/linux/kernel.h:33:22: note: in expansion of macro '__ALIGN_KERNEL'
33 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
| ^~~~~~~~~~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:179:9: note: in expansion of macro
'ALIGN'
179 | pool = ALIGN((phys_addr_t)vpu->work + vpu->work_size, 8);
| ^~~~~
> drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:179:15: warning:
cast from pointer to integer of different size [-Wpointer-to-int-cast]
179 |
pool = ALIGN((phys_addr_t)vpu->work + vpu->work_size, 8);
| ^
include/uapi/linux/const.h:32:58: note: in definition of macro
'__ALIGN_KERNEL_MASK'
32 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
| ^~~~
include/linux/kernel.h:33:22: note: in expansion of macro '__ALIGN_KERNEL'
33 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
| ^~~~~~~~~~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:179:9: note: in expansion of macro
'ALIGN'
179 | pool = ALIGN((phys_addr_t)vpu->work + vpu->work_size, 8);
| ^~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:180:25: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
180 | if (pool + pool_size - (phys_addr_t)vpu->work > mem_size) {
| ^
> drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:192:14: warning:
cast to pointer from integer of different size [-Wint-to-pointer-cast]
192 |
vpu->pool = (struct mdp_config_pool *)pool;
| ^
drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c: In function 'mdp_config_get':
drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:239:28: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
239 | ((unsigned long)config - (phys_addr_t)vpu->work);
| ^
drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c: In function 'mdp_vpu_process':
drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:309:12: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
309 | addr.va = (phys_addr_t)ctx->vpu_dev->work;
| ^
vim +179 drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c
8660eb85c280f2 mtk18742 2021-02-04 151
8660eb85c280f2 mtk18742 2021-02-04 152 int mdp_vpu_dev_init(struct mdp_vpu_dev *vpu,
struct mtk_scp *scp,
8660eb85c280f2 mtk18742 2021-02-04 153 struct mutex *lock)
8660eb85c280f2 mtk18742 2021-02-04 154 {
8660eb85c280f2 mtk18742 2021-02-04 155 struct mdp_ipi_init_msg msg = {
8660eb85c280f2 mtk18742 2021-02-04 156 .drv_data = (unsigned long)vpu,
8660eb85c280f2 mtk18742 2021-02-04 157 };
8660eb85c280f2 mtk18742 2021-02-04 158 size_t mem_size;
8660eb85c280f2 mtk18742 2021-02-04 159 phys_addr_t pool;
8660eb85c280f2 mtk18742 2021-02-04 160 const size_t pool_size = sizeof(struct
mdp_config_pool);
8660eb85c280f2 mtk18742 2021-02-04 161 struct mdp_dev *mdp = vpu_to_mdp(vpu);
8660eb85c280f2 mtk18742 2021-02-04 162 int err;
8660eb85c280f2 mtk18742 2021-02-04 163
8660eb85c280f2 mtk18742 2021-02-04 164 init_completion(&vpu->ipi_acked);
8660eb85c280f2 mtk18742 2021-02-04 165 vpu->scp = scp;
8660eb85c280f2 mtk18742 2021-02-04 166 vpu->lock = lock;
8660eb85c280f2 mtk18742 2021-02-04 167 vpu->work_size = 0;
8660eb85c280f2 mtk18742 2021-02-04 168 err = mdp_vpu_sendmsg(vpu, SCP_IPI_MDP_INIT,
&msg, sizeof(msg));
8660eb85c280f2 mtk18742 2021-02-04 169 if (err)
8660eb85c280f2 mtk18742 2021-02-04 170 goto err_work_size;
8660eb85c280f2 mtk18742 2021-02-04 171 /* vpu work_size was set in
mdp_vpu_ipi_handle_init_ack */
8660eb85c280f2 mtk18742 2021-02-04 172
8660eb85c280f2 mtk18742 2021-02-04 173 mem_size = vpu_alloc_size;
8660eb85c280f2 mtk18742 2021-02-04 174 if (mdp_vpu_shared_mem_alloc(vpu)) {
8660eb85c280f2 mtk18742 2021-02-04 175 dev_err(&mdp->pdev->dev, "VPU
memory alloc fail!");
8660eb85c280f2 mtk18742 2021-02-04 176 goto err_mem_alloc;
8660eb85c280f2 mtk18742 2021-02-04 177 }
8660eb85c280f2 mtk18742 2021-02-04 178
8660eb85c280f2 mtk18742 2021-02-04 @179 pool = ALIGN((phys_addr_t)vpu->work +
vpu->work_size, 8);
8660eb85c280f2 mtk18742 2021-02-04 180 if (pool + pool_size - (phys_addr_t)vpu->work
> mem_size) {
8660eb85c280f2 mtk18742 2021-02-04 181 dev_err(&mdp->pdev->dev,
8660eb85c280f2 mtk18742 2021-02-04 182 "VPU memory insufficient: %zx + %zx >
%zx",
8660eb85c280f2 mtk18742 2021-02-04 183 vpu->work_size, pool_size, mem_size);
8660eb85c280f2 mtk18742 2021-02-04 184 err = -ENOMEM;
8660eb85c280f2 mtk18742 2021-02-04 185 goto err_mem_size;
8660eb85c280f2 mtk18742 2021-02-04 186 }
8660eb85c280f2 mtk18742 2021-02-04 187
8660eb85c280f2 mtk18742 2021-02-04 188 dev_dbg(&mdp->pdev->dev,
8660eb85c280f2 mtk18742 2021-02-04 189 "VPU work:%pK pa:%pad sz:%zx pool:%pa
sz:%zx (mem sz:%zx)",
8660eb85c280f2 mtk18742 2021-02-04 190 vpu->work, &vpu->work_addr,
vpu->work_size,
8660eb85c280f2 mtk18742 2021-02-04 191 &pool, pool_size, mem_size);
8660eb85c280f2 mtk18742 2021-02-04 @192 vpu->pool = (struct mdp_config_pool *)pool;
8660eb85c280f2 mtk18742 2021-02-04 193 msg.work_addr = vpu->work_addr;
8660eb85c280f2 mtk18742 2021-02-04 194 msg.work_size = vpu->work_size;
8660eb85c280f2 mtk18742 2021-02-04 195 err = mdp_vpu_sendmsg(vpu, SCP_IPI_MDP_INIT,
&msg, sizeof(msg));
8660eb85c280f2 mtk18742 2021-02-04 196 if (err)
8660eb85c280f2 mtk18742 2021-02-04 197 goto err_work_size;
8660eb85c280f2 mtk18742 2021-02-04 198
8660eb85c280f2 mtk18742 2021-02-04 199 memset(vpu->pool, 0, sizeof(*vpu->pool));
8660eb85c280f2 mtk18742 2021-02-04 200 return 0;
8660eb85c280f2 mtk18742 2021-02-04 201
8660eb85c280f2 mtk18742 2021-02-04 202 err_work_size:
8660eb85c280f2 mtk18742 2021-02-04 203 switch (vpu->status) {
8660eb85c280f2 mtk18742 2021-02-04 204 case -MDP_IPI_EBUSY:
8660eb85c280f2 mtk18742 2021-02-04 205 err = -EBUSY;
8660eb85c280f2 mtk18742 2021-02-04 206 break;
8660eb85c280f2 mtk18742 2021-02-04 207 case -MDP_IPI_ENOMEM:
8660eb85c280f2 mtk18742 2021-02-04 208 err = -ENOSPC; /* -ENOMEM */
8660eb85c280f2 mtk18742 2021-02-04 209 break;
8660eb85c280f2 mtk18742 2021-02-04 210 }
8660eb85c280f2 mtk18742 2021-02-04 211 return err;
8660eb85c280f2 mtk18742 2021-02-04 212 err_mem_size:
8660eb85c280f2 mtk18742 2021-02-04 213 err_mem_alloc:
8660eb85c280f2 mtk18742 2021-02-04 214 return err;
8660eb85c280f2 mtk18742 2021-02-04 215 }
8660eb85c280f2 mtk18742 2021-02-04 216
:::::: The code at line 179 was first introduced by commit
:::::: 8660eb85c280f20d258629093be82696c2a8be42 CHROMIUM: media: platform: mtk-mdp3: add
first version about MDP3
:::::: TO: mtk18742 <moudy.ho(a)mediatek.com>
:::::: CC: Commit Bot <commit-bot(a)chromium.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org