From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [mchehab-media-next:master 259/331] drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1231:7: warning: Branch condition evaluates to a garbage value [clang-analyzer-core.uninitialized.Branch]
Date: Sat, 19 Mar 2022 16:44:38 +0800 [thread overview]
Message-ID: <202203191647.oSnuoCij-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 22701 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: linux-media(a)vger.kernel.org
CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
tree: git://linuxtv.org/mchehab/media-next.git master
head: 47aa866f248c89b319b99ac7b21a0a961ed2264a
commit: 46fb99951fe2c71adfd7f4ea4439af5ed5ebb7f7 [259/331] media: platform: place NXP drivers on a separate dir
:::::: branch date: 26 hours ago
:::::: commit date: 5 days ago
config: arm-randconfig-c002-20220318 (https://download.01.org/0day-ci/archive/20220319/202203191647.oSnuoCij-lkp(a)intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a6e70e4056dff962ec634c5bd4f2f4105a0bef71)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
git remote add mchehab-media-next git://linuxtv.org/mchehab/media-next.git
git fetch --no-tags mchehab-media-next master
git checkout 46fb99951fe2c71adfd7f4ea4439af5ed5ebb7f7
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:902:2: note: Taking true branch
if (img_fmt == MXC_JPEG_INVALID)
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:903:3: note: Left side of '&&' is true
dev_err(jpeg->dev, "No valid image format detected\n");
^
include/linux/dev_printk.h:144:2: note: expanded from macro 'dev_err'
dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
^
include/linux/dev_printk.h:109:3: note: expanded from macro 'dev_printk_index_wrap'
dev_printk_index_emit(level, fmt); \
^
include/linux/dev_printk.h:105:2: note: expanded from macro 'dev_printk_index_emit'
printk_index_subsys_emit("%s %s: ", level, fmt)
^
include/linux/printk.h:413:2: note: expanded from macro 'printk_index_subsys_emit'
__printk_index_emit(fmt, level, subsys_fmt_prefix)
^
include/linux/printk.h:370:7: note: expanded from macro '__printk_index_emit'
if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:903:3: note: Taking true branch
dev_err(jpeg->dev, "No valid image format detected\n");
^
include/linux/dev_printk.h:144:2: note: expanded from macro 'dev_err'
dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
^
include/linux/dev_printk.h:109:3: note: expanded from macro 'dev_printk_index_wrap'
dev_printk_index_emit(level, fmt); \
^
include/linux/dev_printk.h:105:2: note: expanded from macro 'dev_printk_index_emit'
printk_index_subsys_emit("%s %s: ", level, fmt)
^
include/linux/printk.h:413:2: note: expanded from macro 'printk_index_subsys_emit'
__printk_index_emit(fmt, level, subsys_fmt_prefix)
^
include/linux/printk.h:370:3: note: expanded from macro '__printk_index_emit'
if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:903:3: note: '?' condition is true
dev_err(jpeg->dev, "No valid image format detected\n");
^
include/linux/dev_printk.h:144:2: note: expanded from macro 'dev_err'
dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
^
include/linux/dev_printk.h:109:3: note: expanded from macro 'dev_printk_index_wrap'
dev_printk_index_emit(level, fmt); \
^
include/linux/dev_printk.h:105:2: note: expanded from macro 'dev_printk_index_emit'
printk_index_subsys_emit("%s %s: ", level, fmt)
^
include/linux/printk.h:413:2: note: expanded from macro 'printk_index_subsys_emit'
__printk_index_emit(fmt, level, subsys_fmt_prefix)
^
include/linux/printk.h:379:12: note: expanded from macro '__printk_index_emit'
.fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:903:3: note: '?' condition is true
dev_err(jpeg->dev, "No valid image format detected\n");
^
include/linux/dev_printk.h:144:2: note: expanded from macro 'dev_err'
dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
^
include/linux/dev_printk.h:109:3: note: expanded from macro 'dev_printk_index_wrap'
dev_printk_index_emit(level, fmt); \
^
include/linux/dev_printk.h:105:2: note: expanded from macro 'dev_printk_index_emit'
printk_index_subsys_emit("%s %s: ", level, fmt)
^
include/linux/printk.h:413:2: note: expanded from macro 'printk_index_subsys_emit'
__printk_index_emit(fmt, level, subsys_fmt_prefix)
^
include/linux/printk.h:383:14: note: expanded from macro '__printk_index_emit'
.level = __builtin_constant_p(_level) ? (_level) : NULL, \
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:903:3: note: Loop condition is false. Exiting loop
dev_err(jpeg->dev, "No valid image format detected\n");
^
include/linux/dev_printk.h:144:2: note: expanded from macro 'dev_err'
dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
^
include/linux/dev_printk.h:109:3: note: expanded from macro 'dev_printk_index_wrap'
dev_printk_index_emit(level, fmt); \
^
include/linux/dev_printk.h:105:2: note: expanded from macro 'dev_printk_index_emit'
printk_index_subsys_emit("%s %s: ", level, fmt)
^
include/linux/printk.h:413:2: note: expanded from macro 'printk_index_subsys_emit'
__printk_index_emit(fmt, level, subsys_fmt_prefix)
^
include/linux/printk.h:369:2: note: expanded from macro '__printk_index_emit'
do { \
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:905:5: note: The result of the left shift is undefined because the left operand is negative
STM_CTRL_IMAGE_FORMAT(img_fmt);
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.h:84:52: note: expanded from macro 'STM_CTRL_IMAGE_FORMAT'
#define STM_CTRL_IMAGE_FORMAT(img_fmt) ((img_fmt) << 3)
~~~~~~~~~ ^
>> drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1231:7: warning: Branch condition evaluates to a garbage value [clang-analyzer-core.uninitialized.Branch]
if (!q->sizeimage[0])
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1823:8: note: Calling 'mxc_jpeg_try_fmt_vid_out'
ret = mxc_jpeg_try_fmt_vid_out(file, priv, f);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1720:16: note: Assuming field 'mode' is not equal to MXC_JPEG_ENCODE
int q_type = (jpeg->mode == MXC_JPEG_ENCODE) ?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1720:15: note: '?' condition is false
int q_type = (jpeg->mode == MXC_JPEG_ENCODE) ?
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1723:7: note: Assuming field 'type' is not equal to V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
if (!V4L2_TYPE_IS_MULTIPLANAR(f->type)) {
^
include/uapi/linux/videodev2.h:161:3: note: expanded from macro 'V4L2_TYPE_IS_MULTIPLANAR'
((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1723:7: note: Left side of '||' is false
if (!V4L2_TYPE_IS_MULTIPLANAR(f->type)) {
^
include/uapi/linux/videodev2.h:161:3: note: expanded from macro 'V4L2_TYPE_IS_MULTIPLANAR'
((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE \
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1723:7: note: Assuming field 'type' is equal to V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
if (!V4L2_TYPE_IS_MULTIPLANAR(f->type)) {
^
include/uapi/linux/videodev2.h:162:6: note: expanded from macro 'V4L2_TYPE_IS_MULTIPLANAR'
|| (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1723:2: note: Taking false branch
if (!V4L2_TYPE_IS_MULTIPLANAR(f->type)) {
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1729:7: note: 'fmt' is non-null
if (!fmt || fmt->flags != q_type) {
^~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1729:6: note: Left side of '||' is false
if (!fmt || fmt->flags != q_type) {
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1729:14: note: Assuming 'q_type' is equal to field 'flags'
if (!fmt || fmt->flags != q_type) {
^~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1729:2: note: Taking false branch
if (!fmt || fmt->flags != q_type) {
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1739:9: note: Calling 'mxc_jpeg_try_fmt'
return mxc_jpeg_try_fmt(f, fmt, ctx, q_type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1615:11: note: Assuming field 'width' is >= MXC_JPEG_MAX_WIDTH
u32 w = (pix_mp->width < MXC_JPEG_MAX_WIDTH) ?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1615:10: note: '?' condition is false
u32 w = (pix_mp->width < MXC_JPEG_MAX_WIDTH) ?
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1617:11: note: Assuming field 'height' is >= MXC_JPEG_MAX_HEIGHT
u32 h = (pix_mp->height < MXC_JPEG_MAX_HEIGHT) ?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1617:10: note: '?' condition is false
u32 h = (pix_mp->height < MXC_JPEG_MAX_HEIGHT) ?
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1648:14: note: Assuming 'i' is >= field 'num_planes'
for (i = 0; i < pix_mp->num_planes; i++) {
^~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1648:2: note: Loop condition is false. Execution continues on line 1655
for (i = 0; i < pix_mp->num_planes; i++) {
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1655:2: note: Calling 'mxc_jpeg_bytesperline'
mxc_jpeg_bytesperline(&tmp_q, 8);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1207:6: note: Assuming the condition is true
if (q->fmt->fourcc == V4L2_PIX_FMT_JPEG) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1207:2: note: Taking true branch
if (q->fmt->fourcc == V4L2_PIX_FMT_JPEG) {
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1655:2: note: Returning from 'mxc_jpeg_bytesperline'
mxc_jpeg_bytesperline(&tmp_q, 8);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1656:2: note: Calling 'mxc_jpeg_sizeimage'
mxc_jpeg_sizeimage(&tmp_q);
^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1229:2: note: Taking true branch
if (q->fmt->fourcc == V4L2_PIX_FMT_JPEG) {
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1231:7: note: Branch condition evaluates to a garbage value
if (!q->sizeimage[0])
^~~~~~~~~~~~~~~~
>> drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1662:22: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
pfmt->bytesperline = tmp_q.bytesperline[i];
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1823:8: note: Calling 'mxc_jpeg_try_fmt_vid_out'
ret = mxc_jpeg_try_fmt_vid_out(file, priv, f);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1720:16: note: Assuming field 'mode' is not equal to MXC_JPEG_ENCODE
int q_type = (jpeg->mode == MXC_JPEG_ENCODE) ?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1720:15: note: '?' condition is false
int q_type = (jpeg->mode == MXC_JPEG_ENCODE) ?
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1723:7: note: Assuming field 'type' is not equal to V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
if (!V4L2_TYPE_IS_MULTIPLANAR(f->type)) {
^
include/uapi/linux/videodev2.h:161:3: note: expanded from macro 'V4L2_TYPE_IS_MULTIPLANAR'
((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1723:7: note: Left side of '||' is false
if (!V4L2_TYPE_IS_MULTIPLANAR(f->type)) {
^
include/uapi/linux/videodev2.h:161:3: note: expanded from macro 'V4L2_TYPE_IS_MULTIPLANAR'
((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE \
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1723:7: note: Assuming field 'type' is equal to V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
if (!V4L2_TYPE_IS_MULTIPLANAR(f->type)) {
^
include/uapi/linux/videodev2.h:162:6: note: expanded from macro 'V4L2_TYPE_IS_MULTIPLANAR'
|| (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1723:2: note: Taking false branch
if (!V4L2_TYPE_IS_MULTIPLANAR(f->type)) {
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1729:7: note: 'fmt' is non-null
if (!fmt || fmt->flags != q_type) {
^~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1729:6: note: Left side of '||' is false
if (!fmt || fmt->flags != q_type) {
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1729:14: note: Assuming 'q_type' is equal to field 'flags'
if (!fmt || fmt->flags != q_type) {
^~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1729:2: note: Taking false branch
if (!fmt || fmt->flags != q_type) {
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1739:9: note: Calling 'mxc_jpeg_try_fmt'
return mxc_jpeg_try_fmt(f, fmt, ctx, q_type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1615:11: note: Assuming field 'width' is >= MXC_JPEG_MAX_WIDTH
u32 w = (pix_mp->width < MXC_JPEG_MAX_WIDTH) ?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1615:10: note: '?' condition is false
u32 w = (pix_mp->width < MXC_JPEG_MAX_WIDTH) ?
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1617:11: note: Assuming field 'height' is >= MXC_JPEG_MAX_HEIGHT
u32 h = (pix_mp->height < MXC_JPEG_MAX_HEIGHT) ?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1617:10: note: '?' condition is false
u32 h = (pix_mp->height < MXC_JPEG_MAX_HEIGHT) ?
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1648:14: note: Assuming 'i' is < field 'num_planes'
for (i = 0; i < pix_mp->num_planes; i++) {
^~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1648:2: note: Loop condition is true. Entering loop body
for (i = 0; i < pix_mp->num_planes; i++) {
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1648:14: note: Assuming 'i' is >= field 'num_planes'
for (i = 0; i < pix_mp->num_planes; i++) {
^~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1648:2: note: Loop condition is false. Execution continues on line 1655
for (i = 0; i < pix_mp->num_planes; i++) {
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1655:2: note: Calling 'mxc_jpeg_bytesperline'
mxc_jpeg_bytesperline(&tmp_q, 8);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1207:6: note: Assuming the condition is true
if (q->fmt->fourcc == V4L2_PIX_FMT_JPEG) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1207:2: note: Taking true branch
if (q->fmt->fourcc == V4L2_PIX_FMT_JPEG) {
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1655:2: note: Returning from 'mxc_jpeg_bytesperline'
mxc_jpeg_bytesperline(&tmp_q, 8);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1656:2: note: Calling 'mxc_jpeg_sizeimage'
mxc_jpeg_sizeimage(&tmp_q);
^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1229:2: note: Taking true branch
if (q->fmt->fourcc == V4L2_PIX_FMT_JPEG) {
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1231:7: note: Assuming the condition is false
if (!q->sizeimage[0])
^~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1231:3: note: Taking false branch
if (!q->sizeimage[0])
^
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1235:7: note: Assuming the condition is false
if (q->sizeimage[0] > MXC_JPEG_MAX_SIZEIMAGE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1235:3: note: Taking false branch
if (q->sizeimage[0] > MXC_JPEG_MAX_SIZEIMAGE)
vim +1231 drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 1226
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 1227 static void mxc_jpeg_sizeimage(struct mxc_jpeg_q_data *q)
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 1228 {
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 1229 if (q->fmt->fourcc == V4L2_PIX_FMT_JPEG) {
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 1230 /* if no sizeimage from user, assume worst jpeg compression */
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 @1231 if (!q->sizeimage[0])
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 1232 q->sizeimage[0] = 6 * q->w * q->h;
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 1233 q->sizeimage[1] = 0;
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 1234
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 1235 if (q->sizeimage[0] > MXC_JPEG_MAX_SIZEIMAGE)
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 1236 q->sizeimage[0] = MXC_JPEG_MAX_SIZEIMAGE;
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 1237
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 1238 /* jpeg stream size must be multiple of 1K */
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 1239 q->sizeimage[0] = ALIGN(q->sizeimage[0], 1024);
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 1240 } else {
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 1241 q->sizeimage[0] = q->bytesperline[0] * q->h;
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 1242 q->sizeimage[1] = 0;
784a1883cff07e drivers/media/platform/imx-jpeg/mxc-jpeg.c Ming Qian 2021-12-24 1243 if (q->fmt->fourcc == V4L2_PIX_FMT_NV12M)
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 1244 q->sizeimage[1] = q->sizeimage[0] / 2;
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 1245 }
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 1246 }
2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 1247
:::::: The code at line 1231 was first introduced by commit
:::::: 2db16c6ed72ce644d5639b3ed15e5817442db4ba media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder
:::::: TO: Mirela Rabulea <mirela.rabulea@nxp.com>
:::::: CC: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
reply other threads:[~2022-03-19 8:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202203191647.oSnuoCij-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.