* [jmondi:jmondi/media-stage/pispbe 3/4] drivers/media/platform/raspberrypi/pisp_be/pisp_be.c:275:27: warning: shift count >= width of type
@ 2024-01-29 2:36 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-01-29 2:36 UTC (permalink / raw)
To: Jacopo Mondi; +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jmondi/linux.git jmondi/media-stage/pispbe
head: 1e94449ecd7f9aa59eae24b5b76cd3c461d8b613
commit: e4109de6a8b9abac9f0a87c1cf6d8b1683ec00f7 [3/4] fixup! media: raspberrypi: Add support for PiSP BE
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20240129/202401291016.iFQ01xG8-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240129/202401291016.iFQ01xG8-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/202401291016.iFQ01xG8-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/media/platform/raspberrypi/pisp_be/pisp_be.c:20:
drivers/media/platform/raspberrypi/pisp_be/pisp_be_formats.h:236:18: error: use of undeclared identifier 'V4L2_PIX_FMT_RGB48'
236 | .fourcc = V4L2_PIX_FMT_RGB48,
| ^
drivers/media/platform/raspberrypi/pisp_be/pisp_be_formats.h:245:18: error: use of undeclared identifier 'V4L2_PIX_FMT_BGR48'
245 | .fourcc = V4L2_PIX_FMT_BGR48,
| ^
drivers/media/platform/raspberrypi/pisp_be/pisp_be_formats.h:441:18: error: use of undeclared identifier 'V4L2_PIX_FMT_PISP_COMP1_BGGR'
441 | .fourcc = V4L2_PIX_FMT_PISP_COMP1_BGGR,
| ^
drivers/media/platform/raspberrypi/pisp_be/pisp_be_formats.h:450:18: error: use of undeclared identifier 'V4L2_PIX_FMT_PISP_COMP1_RGGB'
450 | .fourcc = V4L2_PIX_FMT_PISP_COMP1_RGGB,
| ^
drivers/media/platform/raspberrypi/pisp_be/pisp_be_formats.h:459:18: error: use of undeclared identifier 'V4L2_PIX_FMT_PISP_COMP1_GRBG'
459 | .fourcc = V4L2_PIX_FMT_PISP_COMP1_GRBG,
| ^
drivers/media/platform/raspberrypi/pisp_be/pisp_be_formats.h:468:18: error: use of undeclared identifier 'V4L2_PIX_FMT_PISP_COMP1_GBRG'
468 | .fourcc = V4L2_PIX_FMT_PISP_COMP1_GBRG,
| ^
drivers/media/platform/raspberrypi/pisp_be/pisp_be_formats.h:495:14: error: use of undeclared identifier 'V4L2_PIX_FMT_PISP_COMP1_MONO'
495 | .fourcc = V4L2_PIX_FMT_PISP_COMP1_MONO,
| ^
drivers/media/platform/raspberrypi/pisp_be/pisp_be_formats.h:505:18: error: use of undeclared identifier 'V4L2_PIX_FMT_RPI_BE'
505 | .fourcc = V4L2_PIX_FMT_RPI_BE,
| ^
drivers/media/platform/raspberrypi/pisp_be/pisp_be_formats.h:513:18: error: use of undeclared identifier 'V4L2_META_FMT_RPI_BE_CFG'
513 | .fourcc = V4L2_META_FMT_RPI_BE_CFG,
| ^
>> drivers/media/platform/raspberrypi/pisp_be/pisp_be.c:275:27: warning: shift count >= width of type [-Wshift-count-overflow]
275 | job->hw_dma_addrs[u] >> 32);
| ^ ~~
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c:309:63: warning: shift count >= width of type [-Wshift-count-overflow]
309 | pispbe_wr(pispbe, PISP_BE_TILE_ADDR_HI_REG, (u32)(job->tiles >> 32));
| ^ ~~
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c:1111:31: error: invalid application of 'sizeof' to an incomplete type 'const struct pisp_be_format[]'
1111 | for (unsigned int i = 0; i < ARRAY_SIZE(supported_formats); i++) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/array_size.h:11:32: note: expanded from macro 'ARRAY_SIZE'
11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^~~~~
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c:1161:16: error: use of undeclared identifier 'V4L2_PIX_FMT_RPI_BE'
1161 | if (pixfmt == V4L2_PIX_FMT_RPI_BE)
| ^
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c:1270:27: error: use of undeclared identifier 'V4L2_META_FMT_RPI_BE_CFG'
1270 | f->fmt.meta.dataformat = V4L2_META_FMT_RPI_BE_CFG;
| ^
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c:1289:27: error: use of undeclared identifier 'V4L2_PIX_FMT_RPI_BE'
1289 | f->fmt.meta.dataformat = V4L2_PIX_FMT_RPI_BE;
| ^
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c:1385:21: error: use of undeclared identifier 'V4L2_META_FMT_RPI_BE_CFG'
1385 | f->pixelformat = V4L2_META_FMT_RPI_BE_CFG;
| ^
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c:1387:21: error: use of undeclared identifier 'V4L2_PIX_FMT_RPI_BE'
1387 | f->pixelformat = V4L2_PIX_FMT_RPI_BE;
| ^
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c:1392:18: error: invalid application of 'sizeof' to an incomplete type 'const struct pisp_be_format[]'
1392 | if (f->index >= ARRAY_SIZE(supported_formats))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/array_size.h:11:32: note: expanded from macro 'ARRAY_SIZE'
11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^~~~~
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c:1499:28: error: use of undeclared identifier 'V4L2_META_FMT_RPI_BE_CFG'
1499 | f->fmt.meta.dataformat = V4L2_META_FMT_RPI_BE_CFG;
| ^
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c:1506:28: error: use of undeclared identifier 'V4L2_PIX_FMT_RPI_BE'
1506 | f->fmt.meta.dataformat = V4L2_PIX_FMT_RPI_BE;
| ^
2 warnings and 18 errors generated.
vim +275 drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
dff3569dbc4dad Jacopo Mondi 2024-01-25 251
dff3569dbc4dad Jacopo Mondi 2024-01-25 252 /*
dff3569dbc4dad Jacopo Mondi 2024-01-25 253 * Queue a job to the h/w. If the h/w is idle it will begin immediately.
dff3569dbc4dad Jacopo Mondi 2024-01-25 254 * Caller must ensure it is "safe to queue", i.e. we don't already have a
dff3569dbc4dad Jacopo Mondi 2024-01-25 255 * queued, unstarted job.
dff3569dbc4dad Jacopo Mondi 2024-01-25 256 */
dff3569dbc4dad Jacopo Mondi 2024-01-25 257 static void pispbe_queue_job(struct pispbe_dev *pispbe,
dff3569dbc4dad Jacopo Mondi 2024-01-25 258 struct pispbe_job_descriptor *job)
dff3569dbc4dad Jacopo Mondi 2024-01-25 259 {
dff3569dbc4dad Jacopo Mondi 2024-01-25 260 unsigned int begin, end;
dff3569dbc4dad Jacopo Mondi 2024-01-25 261
dff3569dbc4dad Jacopo Mondi 2024-01-25 262 if (pispbe_rd(pispbe, PISP_BE_STATUS_REG) & PISP_BE_STATUS_QUEUED)
dff3569dbc4dad Jacopo Mondi 2024-01-25 263 dev_err(pispbe->dev, "ERROR: not safe to queue new job!\n");
dff3569dbc4dad Jacopo Mondi 2024-01-25 264
dff3569dbc4dad Jacopo Mondi 2024-01-25 265 /*
dff3569dbc4dad Jacopo Mondi 2024-01-25 266 * Write configuration to hardware. DMA addresses and enable flags
dff3569dbc4dad Jacopo Mondi 2024-01-25 267 * are passed separately, because the driver needs to sanitize them,
dff3569dbc4dad Jacopo Mondi 2024-01-25 268 * and we don't want to modify (or be vulnerable to modifications of)
dff3569dbc4dad Jacopo Mondi 2024-01-25 269 * the mmap'd buffer.
dff3569dbc4dad Jacopo Mondi 2024-01-25 270 */
dff3569dbc4dad Jacopo Mondi 2024-01-25 271 for (unsigned int u = 0; u < N_HW_ADDRESSES; ++u) {
dff3569dbc4dad Jacopo Mondi 2024-01-25 272 pispbe_wr(pispbe, PISP_BE_IO_INPUT_ADDR0(u),
dff3569dbc4dad Jacopo Mondi 2024-01-25 273 job->hw_dma_addrs[u]);
dff3569dbc4dad Jacopo Mondi 2024-01-25 274 pispbe_wr(pispbe, PISP_BE_IO_INPUT_ADDR0(u) + 4,
dff3569dbc4dad Jacopo Mondi 2024-01-25 @275 job->hw_dma_addrs[u] >> 32);
dff3569dbc4dad Jacopo Mondi 2024-01-25 276 }
dff3569dbc4dad Jacopo Mondi 2024-01-25 277 pispbe_wr(pispbe, PISP_BE_GLOBAL_BAYER_ENABLE, job->hw_enables[0]);
dff3569dbc4dad Jacopo Mondi 2024-01-25 278 pispbe_wr(pispbe, PISP_BE_GLOBAL_RGB_ENABLE, job->hw_enables[1]);
dff3569dbc4dad Jacopo Mondi 2024-01-25 279
dff3569dbc4dad Jacopo Mondi 2024-01-25 280 /*
dff3569dbc4dad Jacopo Mondi 2024-01-25 281 * Everything else is as supplied by the user. Buffer sizes not
dff3569dbc4dad Jacopo Mondi 2024-01-25 282 * checked!
dff3569dbc4dad Jacopo Mondi 2024-01-25 283 */
dff3569dbc4dad Jacopo Mondi 2024-01-25 284 begin = offsetof(struct pisp_be_config, global.bayer_order)
dff3569dbc4dad Jacopo Mondi 2024-01-25 285 / sizeof(u32);
dff3569dbc4dad Jacopo Mondi 2024-01-25 286 end = offsetof(struct pisp_be_config, axi) / sizeof(u32);
dff3569dbc4dad Jacopo Mondi 2024-01-25 287 for (unsigned int u = begin; u < end; u++)
dff3569dbc4dad Jacopo Mondi 2024-01-25 288 pispbe_wr(pispbe, PISP_BE_CONFIG_BASE_REG + 4 * u,
dff3569dbc4dad Jacopo Mondi 2024-01-25 289 ((u32 *)job->config)[u]);
dff3569dbc4dad Jacopo Mondi 2024-01-25 290
dff3569dbc4dad Jacopo Mondi 2024-01-25 291 /* Read back the addresses -- an error here could be fatal */
dff3569dbc4dad Jacopo Mondi 2024-01-25 292 for (unsigned int u = 0; u < N_HW_ADDRESSES; ++u) {
dff3569dbc4dad Jacopo Mondi 2024-01-25 293 unsigned int offset = PISP_BE_IO_INPUT_ADDR0(u);
dff3569dbc4dad Jacopo Mondi 2024-01-25 294 u64 along = pispbe_rd(pispbe, offset);
dff3569dbc4dad Jacopo Mondi 2024-01-25 295
dff3569dbc4dad Jacopo Mondi 2024-01-25 296 along += ((u64)pispbe_rd(pispbe, offset + 4)) << 32;
dff3569dbc4dad Jacopo Mondi 2024-01-25 297 if (along != (u64)(job->hw_dma_addrs[u])) {
dff3569dbc4dad Jacopo Mondi 2024-01-25 298 dev_err(pispbe->dev,
dff3569dbc4dad Jacopo Mondi 2024-01-25 299 "ISP BE config error: check if ISP RAMs enabled?\n");
dff3569dbc4dad Jacopo Mondi 2024-01-25 300 return;
dff3569dbc4dad Jacopo Mondi 2024-01-25 301 }
dff3569dbc4dad Jacopo Mondi 2024-01-25 302 }
dff3569dbc4dad Jacopo Mondi 2024-01-25 303
dff3569dbc4dad Jacopo Mondi 2024-01-25 304 /*
dff3569dbc4dad Jacopo Mondi 2024-01-25 305 * Write tile pointer to hardware. Tile offsets and sizes not checked
dff3569dbc4dad Jacopo Mondi 2024-01-25 306 * (and even if checked, the user could subsequently modify them)!
dff3569dbc4dad Jacopo Mondi 2024-01-25 307 */
dff3569dbc4dad Jacopo Mondi 2024-01-25 308 pispbe_wr(pispbe, PISP_BE_TILE_ADDR_LO_REG, (u32)job->tiles);
dff3569dbc4dad Jacopo Mondi 2024-01-25 309 pispbe_wr(pispbe, PISP_BE_TILE_ADDR_HI_REG, (u32)(job->tiles >> 32));
dff3569dbc4dad Jacopo Mondi 2024-01-25 310
dff3569dbc4dad Jacopo Mondi 2024-01-25 311 /* Enqueue the job */
dff3569dbc4dad Jacopo Mondi 2024-01-25 312 pispbe_wr(pispbe, PISP_BE_CONTROL_REG,
dff3569dbc4dad Jacopo Mondi 2024-01-25 313 PISP_BE_CONTROL_COPY_CONFIG | PISP_BE_CONTROL_QUEUE_JOB |
dff3569dbc4dad Jacopo Mondi 2024-01-25 314 PISP_BE_CONTROL_NUM_TILES(job->config->num_tiles));
dff3569dbc4dad Jacopo Mondi 2024-01-25 315 }
dff3569dbc4dad Jacopo Mondi 2024-01-25 316
:::::: The code at line 275 was first introduced by commit
:::::: dff3569dbc4dadee5907b7d0a5a98089aaeb32ca media: raspberrypi: Add support for PiSP BE
:::::: TO: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
:::::: CC: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-29 2:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-29 2:36 [jmondi:jmondi/media-stage/pispbe 3/4] drivers/media/platform/raspberrypi/pisp_be/pisp_be.c:275:27: warning: shift count >= width of type kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox