* [PATCH 0/4] [media] Fixes for colorspace logic in exynos-gsc and s5p-mfc drivers
@ 2017-02-09 19:43 Thibault Saunier
2017-02-09 19:43 ` [PATCH 1/4] [media] exynos-gsc: Use 576p instead 720p as a threshold for colorspaces Thibault Saunier
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Thibault Saunier @ 2017-02-09 19:43 UTC (permalink / raw)
To: linux-kernel
Cc: Mauro Carvalho Chehab, Andi Shyti, Shuah Khan, Inki Dae,
Nicolas Dufresne, Javier Martinez Canillas,
Mauro Carvalho Chehab, Marek Szyprowski, Kukjin Kim,
linux-samsung-soc, Sylwester Nawrocki, linux-media,
Krzysztof Kozlowski, linux-arm-kernel, Ulf Hansson,
Thibault Saunier
Hello,
This patchset fixes a few issues on the colorspace logic for the exynos-gsc
and s5p-mfc drivers.
We now handle the colorspace in those drivers, and make sure to respect user setting if
possible.
We also now set the 'v4l2_pix_format:field' if userspace passed ANY, avoiding GStreamer
spamming error at us about the driver not following the standard.
Best regards,
Thibault Saunier
Javier Martinez Canillas (1):
[media] exynos-gsc: Use 576p instead 720p as a threshold for
colorspaces
Thibault Saunier (3):
[media] exynos-gsc: Respect userspace colorspace setting
[media] s5p-mfc: Set colorspace in VIDIO_{G,TRY}_FMT
[media] s5p-mfc: Always check and set 'v4l2_pix_format:field' field
drivers/media/platform/exynos-gsc/gsc-core.c | 22 +++++++++++----
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 42 ++++++++++++++++++++++++++--
2 files changed, 57 insertions(+), 7 deletions(-)
--
2.11.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/4] [media] exynos-gsc: Use 576p instead 720p as a threshold for colorspaces
2017-02-09 19:43 [PATCH 0/4] [media] Fixes for colorspace logic in exynos-gsc and s5p-mfc drivers Thibault Saunier
@ 2017-02-09 19:43 ` Thibault Saunier
2017-02-09 19:43 ` [PATCH 2/4] [media] exynos-gsc: Respect userspace colorspace setting Thibault Saunier
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Thibault Saunier @ 2017-02-09 19:43 UTC (permalink / raw)
To: linux-kernel
Cc: Mauro Carvalho Chehab, Andi Shyti, Shuah Khan, Inki Dae,
Nicolas Dufresne, Javier Martinez Canillas,
Mauro Carvalho Chehab, Marek Szyprowski, Kukjin Kim,
linux-samsung-soc, Sylwester Nawrocki, linux-media,
Krzysztof Kozlowski, linux-arm-kernel, Ulf Hansson
From: Javier Martinez Canillas <javier@osg.samsung.com>
The media documentation says that the V4L2_COLORSPACE_SMPTE170M colorspace
should be used for SDTV and V4L2_COLORSPACE_REC709 for HDTV. But drivers
don't agree on the display resolution that should be used as a threshold.
Some drivers set V4L2_COLORSPACE_REC709 for 720p and higher while others
set V4L2_COLORSPACE_REC709 for anything higher than 576p. Newers drivers
use the latter and that also matches what user-space multimedia programs
do (i.e: GStreamer), so change the driver logic to be aligned with this.
Also, check for the resolution in G_FMT instead unconditionally setting
the V4L2_COLORSPACE_REC709 colorspace.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/media/platform/exynos-gsc/gsc-core.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c
index cbb03768f5d7..2beb43401987 100644
--- a/drivers/media/platform/exynos-gsc/gsc-core.c
+++ b/drivers/media/platform/exynos-gsc/gsc-core.c
@@ -445,7 +445,7 @@ int gsc_try_fmt_mplane(struct gsc_ctx *ctx, struct v4l2_format *f)
pix_mp->num_planes = fmt->num_planes;
- if (pix_mp->width >= 1280) /* HD */
+ if (pix_mp->width > 720 && pix_mp->height > 576) /* HD */
pix_mp->colorspace = V4L2_COLORSPACE_REC709;
else /* SD */
pix_mp->colorspace = V4L2_COLORSPACE_SMPTE170M;
@@ -492,7 +492,10 @@ int gsc_g_fmt_mplane(struct gsc_ctx *ctx, struct v4l2_format *f)
pix_mp->height = frame->f_height;
pix_mp->field = V4L2_FIELD_NONE;
pix_mp->pixelformat = frame->fmt->pixelformat;
- pix_mp->colorspace = V4L2_COLORSPACE_REC709;
+ if (pix_mp->width > 720 && pix_mp->height > 576) /* HD */
+ pix_mp->colorspace = V4L2_COLORSPACE_REC709;
+ else /* SD */
+ pix_mp->colorspace = V4L2_COLORSPACE_SMPTE170M;
pix_mp->num_planes = frame->fmt->num_planes;
for (i = 0; i < pix_mp->num_planes; ++i) {
--
2.11.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/4] [media] exynos-gsc: Respect userspace colorspace setting
2017-02-09 19:43 [PATCH 0/4] [media] Fixes for colorspace logic in exynos-gsc and s5p-mfc drivers Thibault Saunier
2017-02-09 19:43 ` [PATCH 1/4] [media] exynos-gsc: Use 576p instead 720p as a threshold for colorspaces Thibault Saunier
@ 2017-02-09 19:43 ` Thibault Saunier
2017-02-09 19:43 ` [PATCH 3/4] [media] s5p-mfc: Set colorspace in VIDIO_{G,TRY}_FMT Thibault Saunier
2017-02-09 19:43 ` [PATCH 4/4] [media] s5p-mfc: Always check and set 'v4l2_pix_format:field' field Thibault Saunier
3 siblings, 0 replies; 8+ messages in thread
From: Thibault Saunier @ 2017-02-09 19:43 UTC (permalink / raw)
To: linux-kernel
Cc: Mauro Carvalho Chehab, Andi Shyti, Shuah Khan, Inki Dae,
Nicolas Dufresne, Javier Martinez Canillas,
Mauro Carvalho Chehab, Marek Szyprowski, Kukjin Kim,
linux-samsung-soc, Sylwester Nawrocki, linux-media,
Krzysztof Kozlowski, linux-arm-kernel, Ulf Hansson,
Thibault Saunier
If the colorspace is specified by userspace we should respect
it and not reset it ourself if we can support it.
Signed-off-by: Thibault Saunier <thibault.saunier@osg.samsung.com>
---
drivers/media/platform/exynos-gsc/gsc-core.c | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c
index 2beb43401987..63bb4577827d 100644
--- a/drivers/media/platform/exynos-gsc/gsc-core.c
+++ b/drivers/media/platform/exynos-gsc/gsc-core.c
@@ -445,10 +445,14 @@ int gsc_try_fmt_mplane(struct gsc_ctx *ctx, struct v4l2_format *f)
pix_mp->num_planes = fmt->num_planes;
- if (pix_mp->width > 720 && pix_mp->height > 576) /* HD */
- pix_mp->colorspace = V4L2_COLORSPACE_REC709;
- else /* SD */
- pix_mp->colorspace = V4L2_COLORSPACE_SMPTE170M;
+ if (pix_mp->colorspace != V4L2_COLORSPACE_REC709 &&
+ pix_mp->colorspace != V4L2_COLORSPACE_SMPTE170M &&
+ pix_mp->colorspace != V4L2_COLORSPACE_DEFAULT) {
+ if (pix_mp->width > 720 && pix_mp->height > 576) /* HD */
+ pix_mp->colorspace = V4L2_COLORSPACE_REC709;
+ else /* SD */
+ pix_mp->colorspace = V4L2_COLORSPACE_SMPTE170M;
+ }
for (i = 0; i < pix_mp->num_planes; ++i) {
struct v4l2_plane_pix_format *plane_fmt = &pix_mp->plane_fmt[i];
@@ -492,12 +496,17 @@ int gsc_g_fmt_mplane(struct gsc_ctx *ctx, struct v4l2_format *f)
pix_mp->height = frame->f_height;
pix_mp->field = V4L2_FIELD_NONE;
pix_mp->pixelformat = frame->fmt->pixelformat;
- if (pix_mp->width > 720 && pix_mp->height > 576) /* HD */
- pix_mp->colorspace = V4L2_COLORSPACE_REC709;
- else /* SD */
- pix_mp->colorspace = V4L2_COLORSPACE_SMPTE170M;
pix_mp->num_planes = frame->fmt->num_planes;
+ if (pix_mp->colorspace != V4L2_COLORSPACE_REC709 &&
+ pix_mp->colorspace != V4L2_COLORSPACE_SMPTE170M &&
+ pix_mp->colorspace != V4L2_COLORSPACE_DEFAULT) {
+ if (pix_mp->width > 720 && pix_mp->height > 576) /* HD */
+ pix_mp->colorspace = V4L2_COLORSPACE_REC709;
+ else /* SD */
+ pix_mp->colorspace = V4L2_COLORSPACE_SMPTE170M;
+ }
+
for (i = 0; i < pix_mp->num_planes; ++i) {
pix_mp->plane_fmt[i].bytesperline = (frame->f_width *
frame->fmt->depth[i]) / 8;
--
2.11.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/4] [media] s5p-mfc: Set colorspace in VIDIO_{G,TRY}_FMT
2017-02-09 19:43 [PATCH 0/4] [media] Fixes for colorspace logic in exynos-gsc and s5p-mfc drivers Thibault Saunier
2017-02-09 19:43 ` [PATCH 1/4] [media] exynos-gsc: Use 576p instead 720p as a threshold for colorspaces Thibault Saunier
2017-02-09 19:43 ` [PATCH 2/4] [media] exynos-gsc: Respect userspace colorspace setting Thibault Saunier
@ 2017-02-09 19:43 ` Thibault Saunier
2017-02-09 19:43 ` [PATCH 4/4] [media] s5p-mfc: Always check and set 'v4l2_pix_format:field' field Thibault Saunier
3 siblings, 0 replies; 8+ messages in thread
From: Thibault Saunier @ 2017-02-09 19:43 UTC (permalink / raw)
To: linux-kernel
Cc: Mauro Carvalho Chehab, Andi Shyti, Shuah Khan, Inki Dae,
Nicolas Dufresne, Javier Martinez Canillas,
Mauro Carvalho Chehab, Marek Szyprowski, Kukjin Kim,
linux-samsung-soc, Sylwester Nawrocki, linux-media,
Krzysztof Kozlowski, linux-arm-kernel, Ulf Hansson,
Thibault Saunier
The media documentation says that the V4L2_COLORSPACE_SMPTE170M colorspace
should be used for SDTV and V4L2_COLORSPACE_REC709 for HDTV but the driver
didn't set the colorimetry, also respect usespace setting.
Use 576p display resolution as a threshold to set this.
Signed-off-by: Thibault Saunier <thibault.saunier@osg.samsung.com>
---
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
index 367ef8e8dbf0..960d6c7052bd 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
@@ -354,6 +354,15 @@ static int vidioc_g_fmt(struct file *file, void *priv, struct v4l2_format *f)
pix_mp->plane_fmt[0].sizeimage = ctx->luma_size;
pix_mp->plane_fmt[1].bytesperline = ctx->buf_width;
pix_mp->plane_fmt[1].sizeimage = ctx->chroma_size;
+
+ if (pix_mp->colorspace != V4L2_COLORSPACE_REC709 &&
+ pix_mp->colorspace != V4L2_COLORSPACE_SMPTE170M &&
+ pix_mp->colorspace != V4L2_COLORSPACE_DEFAULT) {
+ if (pix_mp->width > 720 && pix_mp->height > 576) /* HD */
+ pix_mp->colorspace = V4L2_COLORSPACE_REC709;
+ else /* SD */
+ pix_mp->colorspace = V4L2_COLORSPACE_SMPTE170M;
+ }
} else if (f->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
/* This is run on OUTPUT
The buffer contains compressed image
@@ -378,6 +387,7 @@ static int vidioc_g_fmt(struct file *file, void *priv, struct v4l2_format *f)
static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f)
{
struct s5p_mfc_dev *dev = video_drvdata(file);
+ struct v4l2_pix_format_mplane *pix_mp = &f->fmt.pix_mp;
struct s5p_mfc_fmt *fmt;
mfc_debug(2, "Type is %d\n", f->type);
@@ -405,6 +415,15 @@ static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f)
mfc_err("Unsupported format by this MFC version.\n");
return -EINVAL;
}
+
+ if (pix_mp->colorspace != V4L2_COLORSPACE_REC709 &&
+ pix_mp->colorspace != V4L2_COLORSPACE_SMPTE170M &&
+ pix_mp->colorspace != V4L2_COLORSPACE_DEFAULT) {
+ if (pix_mp->width > 720 && pix_mp->height > 576) /* HD */
+ pix_mp->colorspace = V4L2_COLORSPACE_REC709;
+ else /* SD */
+ pix_mp->colorspace = V4L2_COLORSPACE_SMPTE170M;
+ }
}
return 0;
--
2.11.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/4] [media] s5p-mfc: Always check and set 'v4l2_pix_format:field' field
2017-02-09 19:43 [PATCH 0/4] [media] Fixes for colorspace logic in exynos-gsc and s5p-mfc drivers Thibault Saunier
` (2 preceding siblings ...)
2017-02-09 19:43 ` [PATCH 3/4] [media] s5p-mfc: Set colorspace in VIDIO_{G,TRY}_FMT Thibault Saunier
@ 2017-02-09 19:43 ` Thibault Saunier
2017-02-10 6:18 ` kbuild test robot
` (2 more replies)
3 siblings, 3 replies; 8+ messages in thread
From: Thibault Saunier @ 2017-02-09 19:43 UTC (permalink / raw)
To: linux-kernel
Cc: Mauro Carvalho Chehab, Andi Shyti, Shuah Khan, Inki Dae,
Nicolas Dufresne, Javier Martinez Canillas,
Mauro Carvalho Chehab, Marek Szyprowski, Kukjin Kim,
linux-samsung-soc, Sylwester Nawrocki, linux-media,
Krzysztof Kozlowski, linux-arm-kernel, Ulf Hansson,
Thibault Saunier
It is required by the standard that the field order is set by the
driver.
Signed-off-by: Thibault Saunier <thibault.saunier@osg.samsung.com>
---
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
index 960d6c7052bd..dfb21b4aee10 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
@@ -345,7 +345,6 @@ static int vidioc_g_fmt(struct file *file, void *priv, struct v4l2_format *f)
rectangle. */
pix_mp->width = ctx->buf_width;
pix_mp->height = ctx->buf_height;
- pix_mp->field = V4L2_FIELD_NONE;
pix_mp->num_planes = 2;
/* Set pixelformat to the format in which MFC
outputs the decoded frame */
@@ -369,7 +368,6 @@ static int vidioc_g_fmt(struct file *file, void *priv, struct v4l2_format *f)
so width and height have no meaning */
pix_mp->width = 0;
pix_mp->height = 0;
- pix_mp->field = V4L2_FIELD_NONE;
pix_mp->plane_fmt[0].bytesperline = ctx->dec_src_buf_size;
pix_mp->plane_fmt[0].sizeimage = ctx->dec_src_buf_size;
pix_mp->pixelformat = ctx->src_fmt->fourcc;
@@ -379,6 +377,14 @@ static int vidioc_g_fmt(struct file *file, void *priv, struct v4l2_format *f)
mfc_debug(2, "%s-- with error\n", __func__);
return -EINVAL;
}
+
+ if (pix_mp->field == V4L2_FIELD_ANY) {
+ pix_mp->field = V4L2_FIELD_NONE;
+ } else if (pix_mp->field != V4L2_FIELD_NONE) {
+ mfc_err("Not supported field order(%d)\n", pix_mp->field);
+ return -EINVAL;
+ }
+
mfc_debug_leave();
return 0;
}
@@ -389,6 +395,19 @@ static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f)
struct s5p_mfc_dev *dev = video_drvdata(file);
struct v4l2_pix_format_mplane *pix_mp = &f->fmt.pix_mp;
struct s5p_mfc_fmt *fmt;
+ enum v4l2_field field;
+
+ field = f->fmt.pix.field;
+ if (field == V4L2_FIELD_ANY) {
+ field = V4L2_FIELD_NONE;
+ } else if (V4L2_FIELD_NONE != field) {
+ mfc_debug("Not supported field order(%d)\n", pix_mp->field);
+ return -EINVAL;
+ }
+
+ /* V4L2 specification suggests the driver corrects the format struct
+ * if any of the dimensions is unsupported */
+ f->fmt.pix.field = field;
mfc_debug(2, "Type is %d\n", f->type);
if (f->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
--
2.11.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] [media] s5p-mfc: Always check and set 'v4l2_pix_format:field' field
2017-02-09 19:43 ` [PATCH 4/4] [media] s5p-mfc: Always check and set 'v4l2_pix_format:field' field Thibault Saunier
@ 2017-02-10 6:18 ` kbuild test robot
2017-02-10 8:38 ` kbuild test robot
2017-02-10 9:30 ` kbuild test robot
2 siblings, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2017-02-10 6:18 UTC (permalink / raw)
To: Thibault Saunier
Cc: kbuild-all, linux-kernel, Mauro Carvalho Chehab, Andi Shyti,
Shuah Khan, Inki Dae, Nicolas Dufresne, Javier Martinez Canillas,
Mauro Carvalho Chehab, Marek Szyprowski, Kukjin Kim,
linux-samsung-soc, Sylwester Nawrocki, linux-media,
Krzysztof Kozlowski, linux-arm-kernel, Ulf Hansson,
Thibault Saunier
[-- Attachment #1: Type: text/plain, Size: 4225 bytes --]
Hi Thibault,
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v4.10-rc7 next-20170209]
[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/Thibault-Saunier/exynos-gsc-Use-576p-instead-720p-as-a-threshold-for-colorspaces/20170210-113658
base: git://linuxtv.org/media_tree.git master
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=ia64
All error/warnings (new ones prefixed by >>):
In file included from drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:28:0:
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c: In function 'vidioc_try_fmt':
>> drivers/media/platform/s5p-mfc/s5p_mfc_debug.h:25:23: warning: comparison between pointer and integer
if (mfc_debug_level >= level) \
^
>> drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:404:3: note: in expansion of macro 'mfc_debug'
mfc_debug("Not supported field order(%d)\n", pix_mp->field);
^~~~~~~~~
>> drivers/media/platform/s5p-mfc/s5p_mfc_debug.h:25:23: warning: comparison with string literal results in unspecified behavior [-Waddress]
if (mfc_debug_level >= level) \
^
>> drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:404:3: note: in expansion of macro 'mfc_debug'
mfc_debug("Not supported field order(%d)\n", pix_mp->field);
^~~~~~~~~
>> drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:404:48: error: expected ')' before 'pix_mp'
mfc_debug("Not supported field order(%d)\n", pix_mp->field);
^
drivers/media/platform/s5p-mfc/s5p_mfc_debug.h:26:32: note: in definition of macro 'mfc_debug'
printk(KERN_DEBUG "%s:%d: " fmt, \
^~~
In file included from include/linux/printk.h:6:0,
from include/linux/kernel.h:13,
from include/linux/clk.h:16,
from drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:14:
include/linux/kern_levels.h:4:18: warning: format '%s' expects a matching 'char *' argument [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:14:20: note: in expansion of macro 'KERN_SOH'
#define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
^~~~~~~~
drivers/media/platform/s5p-mfc/s5p_mfc_debug.h:26:11: note: in expansion of macro 'KERN_DEBUG'
printk(KERN_DEBUG "%s:%d: " fmt, \
^~~~~~~~~~
>> drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:404:3: note: in expansion of macro 'mfc_debug'
mfc_debug("Not supported field order(%d)\n", pix_mp->field);
^~~~~~~~~
include/linux/kern_levels.h:4:18: warning: format '%d' expects a matching 'int' argument [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:14:20: note: in expansion of macro 'KERN_SOH'
#define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
^~~~~~~~
drivers/media/platform/s5p-mfc/s5p_mfc_debug.h:26:11: note: in expansion of macro 'KERN_DEBUG'
printk(KERN_DEBUG "%s:%d: " fmt, \
^~~~~~~~~~
>> drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:404:3: note: in expansion of macro 'mfc_debug'
mfc_debug("Not supported field order(%d)\n", pix_mp->field);
^~~~~~~~~
vim +404 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
398 enum v4l2_field field;
399
400 field = f->fmt.pix.field;
401 if (field == V4L2_FIELD_ANY) {
402 field = V4L2_FIELD_NONE;
403 } else if (V4L2_FIELD_NONE != field) {
> 404 mfc_debug("Not supported field order(%d)\n", pix_mp->field);
405 return -EINVAL;
406 }
407
---
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: 45920 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] [media] s5p-mfc: Always check and set 'v4l2_pix_format:field' field
2017-02-09 19:43 ` [PATCH 4/4] [media] s5p-mfc: Always check and set 'v4l2_pix_format:field' field Thibault Saunier
2017-02-10 6:18 ` kbuild test robot
@ 2017-02-10 8:38 ` kbuild test robot
2017-02-10 9:30 ` kbuild test robot
2 siblings, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2017-02-10 8:38 UTC (permalink / raw)
To: Thibault Saunier
Cc: kbuild-all, linux-kernel, Mauro Carvalho Chehab, Andi Shyti,
Shuah Khan, Inki Dae, Nicolas Dufresne, Javier Martinez Canillas,
Mauro Carvalho Chehab, Marek Szyprowski, Kukjin Kim,
linux-samsung-soc, Sylwester Nawrocki, linux-media,
Krzysztof Kozlowski, linux-arm-kernel, Ulf Hansson,
Thibault Saunier
[-- Attachment #1: Type: text/plain, Size: 2377 bytes --]
Hi Thibault,
[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on v4.10-rc7 next-20170210]
[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/Thibault-Saunier/exynos-gsc-Use-576p-instead-720p-as-a-threshold-for-colorspaces/20170210-113658
base: git://linuxtv.org/media_tree.git master
config: openrisc-allmodconfig (attached as .config)
compiler: or32-linux-gcc (GCC) 4.5.1-or32-1.0rc1
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=openrisc
All warnings (new ones prefixed by >>):
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c: In function 'vidioc_try_fmt':
>> drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:404:3: warning: comparison between pointer and integer
>> drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:404:3: warning: comparison with string literal results in unspecified behavior
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:404:3: error: expected ')' before 'pix_mp'
>> drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:404:3: warning: too few arguments for format
vim +404 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
388 mfc_debug_leave();
389 return 0;
390 }
391
392 /* Try format */
393 static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f)
394 {
395 struct s5p_mfc_dev *dev = video_drvdata(file);
396 struct v4l2_pix_format_mplane *pix_mp = &f->fmt.pix_mp;
397 struct s5p_mfc_fmt *fmt;
398 enum v4l2_field field;
399
400 field = f->fmt.pix.field;
401 if (field == V4L2_FIELD_ANY) {
402 field = V4L2_FIELD_NONE;
403 } else if (V4L2_FIELD_NONE != field) {
> 404 mfc_debug("Not supported field order(%d)\n", pix_mp->field);
405 return -EINVAL;
406 }
407
408 /* V4L2 specification suggests the driver corrects the format struct
409 * if any of the dimensions is unsupported */
410 f->fmt.pix.field = field;
411
412 mfc_debug(2, "Type is %d\n", f->type);
---
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: 40023 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] [media] s5p-mfc: Always check and set 'v4l2_pix_format:field' field
2017-02-09 19:43 ` [PATCH 4/4] [media] s5p-mfc: Always check and set 'v4l2_pix_format:field' field Thibault Saunier
2017-02-10 6:18 ` kbuild test robot
2017-02-10 8:38 ` kbuild test robot
@ 2017-02-10 9:30 ` kbuild test robot
2 siblings, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2017-02-10 9:30 UTC (permalink / raw)
To: Thibault Saunier
Cc: kbuild-all, linux-kernel, Mauro Carvalho Chehab, Andi Shyti,
Shuah Khan, Inki Dae, Nicolas Dufresne, Javier Martinez Canillas,
Mauro Carvalho Chehab, Marek Szyprowski, Kukjin Kim,
linux-samsung-soc, Sylwester Nawrocki, linux-media,
Krzysztof Kozlowski, linux-arm-kernel, Ulf Hansson,
Thibault Saunier
Hi Thibault,
[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on v4.10-rc7 next-20170209]
[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/Thibault-Saunier/exynos-gsc-Use-576p-instead-720p-as-a-threshold-for-colorspaces/20170210-113658
base: git://linuxtv.org/media_tree.git master
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
include/linux/compiler.h:253:8: sparse: attribute 'no_sanitize_address': unknown attribute
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:404:17: sparse: Expected ) in function call
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:404:17: sparse: got pix_mp
>> drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:404:17: sparse: incompatible types for operation (>=)
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:404:17: left side has type int extern [signed] [addressable] [toplevel] mfc_debug_level
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:404:17: right side has type char static *<noident>
In file included from drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:28:0:
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c: In function 'vidioc_try_fmt':
drivers/media/platform/s5p-mfc/s5p_mfc_debug.h:25:23: warning: comparison between pointer and integer
if (mfc_debug_level >= level) \
^
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:404:3: note: in expansion of macro 'mfc_debug'
mfc_debug("Not supported field order(%d)\n", pix_mp->field);
^~~~~~~~~
drivers/media/platform/s5p-mfc/s5p_mfc_debug.h:25:23: warning: comparison with string literal results in unspecified behavior [-Waddress]
if (mfc_debug_level >= level) \
^
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:404:3: note: in expansion of macro 'mfc_debug'
mfc_debug("Not supported field order(%d)\n", pix_mp->field);
^~~~~~~~~
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:404:48: error: expected ')' before 'pix_mp'
mfc_debug("Not supported field order(%d)\n", pix_mp->field);
^
drivers/media/platform/s5p-mfc/s5p_mfc_debug.h:26:32: note: in definition of macro 'mfc_debug'
printk(KERN_DEBUG "%s:%d: " fmt, \
^~~
In file included from include/linux/printk.h:6:0,
from include/linux/kernel.h:13,
from include/linux/clk.h:16,
from drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:14:
include/linux/kern_levels.h:4:18: warning: format '%s' expects a matching 'char *' argument [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:14:20: note: in expansion of macro 'KERN_SOH'
#define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
^~~~~~~~
drivers/media/platform/s5p-mfc/s5p_mfc_debug.h:26:11: note: in expansion of macro 'KERN_DEBUG'
printk(KERN_DEBUG "%s:%d: " fmt, \
^~~~~~~~~~
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:404:3: note: in expansion of macro 'mfc_debug'
mfc_debug("Not supported field order(%d)\n", pix_mp->field);
^~~~~~~~~
include/linux/kern_levels.h:4:18: warning: format '%d' expects a matching 'int' argument [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:14:20: note: in expansion of macro 'KERN_SOH'
#define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
^~~~~~~~
drivers/media/platform/s5p-mfc/s5p_mfc_debug.h:26:11: note: in expansion of macro 'KERN_DEBUG'
printk(KERN_DEBUG "%s:%d: " fmt, \
^~~~~~~~~~
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:404:3: note: in expansion of macro 'mfc_debug'
mfc_debug("Not supported field order(%d)\n", pix_mp->field);
^~~~~~~~~
vim +404 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
388 mfc_debug_leave();
389 return 0;
390 }
391
392 /* Try format */
393 static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f)
394 {
395 struct s5p_mfc_dev *dev = video_drvdata(file);
396 struct v4l2_pix_format_mplane *pix_mp = &f->fmt.pix_mp;
397 struct s5p_mfc_fmt *fmt;
398 enum v4l2_field field;
399
400 field = f->fmt.pix.field;
401 if (field == V4L2_FIELD_ANY) {
402 field = V4L2_FIELD_NONE;
403 } else if (V4L2_FIELD_NONE != field) {
> 404 mfc_debug("Not supported field order(%d)\n", pix_mp->field);
405 return -EINVAL;
406 }
407
408 /* V4L2 specification suggests the driver corrects the format struct
409 * if any of the dimensions is unsupported */
410 f->fmt.pix.field = field;
411
412 mfc_debug(2, "Type is %d\n", f->type);
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-02-10 9:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-09 19:43 [PATCH 0/4] [media] Fixes for colorspace logic in exynos-gsc and s5p-mfc drivers Thibault Saunier
2017-02-09 19:43 ` [PATCH 1/4] [media] exynos-gsc: Use 576p instead 720p as a threshold for colorspaces Thibault Saunier
2017-02-09 19:43 ` [PATCH 2/4] [media] exynos-gsc: Respect userspace colorspace setting Thibault Saunier
2017-02-09 19:43 ` [PATCH 3/4] [media] s5p-mfc: Set colorspace in VIDIO_{G,TRY}_FMT Thibault Saunier
2017-02-09 19:43 ` [PATCH 4/4] [media] s5p-mfc: Always check and set 'v4l2_pix_format:field' field Thibault Saunier
2017-02-10 6:18 ` kbuild test robot
2017-02-10 8:38 ` kbuild test robot
2017-02-10 9:30 ` kbuild test robot
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).