* [PATCH v2 1/2] media: uapi: add MEDIA_BUS_FMT_METADATA_FIXED media bus format.
@ 2020-10-20 15:45 Dafna Hirschfeld
2020-10-20 15:45 ` [PATCH v2 2/2] media: staging: rkisp1: isp: set metadata pads to MEDIA_BUS_FMT_METADATA_FIXED Dafna Hirschfeld
2020-10-30 8:58 ` [PATCH v2 1/2] media: uapi: add MEDIA_BUS_FMT_METADATA_FIXED media bus format Hans Verkuil
0 siblings, 2 replies; 5+ messages in thread
From: Dafna Hirschfeld @ 2020-10-20 15:45 UTC (permalink / raw)
To: linux-media
Cc: mchehab, dafna.hirschfeld, dafna3, tfiga, hverkuil,
linux-rockchip, helen.koike, laurent.pinchart, sakari.ailus,
kernel, ezequiel
MEDIA_BUS_FMT_METADATA_FIXED should be used when
the same driver handles both sides of the link and
the bus format is a fixed metadata format that is
not configurable from userspace.
The width and height will be set to 0 for this format.
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Acked-by: Helen Koike <helen.koike@collabora.com>
---
changes since v1:
1. replace "This format may have 0 height and width."
with "Width and height will be set to 0 for this format."
and add it also to the commit log
2. s/meida:/media:/ in the patch subject line
include/uapi/linux/media-bus-format.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
index 84fa53ffb13f..2ce3d891d344 100644
--- a/include/uapi/linux/media-bus-format.h
+++ b/include/uapi/linux/media-bus-format.h
@@ -156,4 +156,12 @@
/* HSV - next is 0x6002 */
#define MEDIA_BUS_FMT_AHSV8888_1X32 0x6001
+/*
+ * This format should be used when the same driver handles
+ * both sides of the link and the bus format is a fixed
+ * metadata format that is not configurable from userspace.
+ * Width and height will be set to 0 for this format.
+ */
+#define MEDIA_BUS_FMT_METADATA_FIXED 0x7001
+
#endif /* __LINUX_MEDIA_BUS_FORMAT_H */
--
2.17.1
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] media: staging: rkisp1: isp: set metadata pads to MEDIA_BUS_FMT_METADATA_FIXED
2020-10-20 15:45 [PATCH v2 1/2] media: uapi: add MEDIA_BUS_FMT_METADATA_FIXED media bus format Dafna Hirschfeld
@ 2020-10-20 15:45 ` Dafna Hirschfeld
2020-10-30 8:58 ` [PATCH v2 1/2] media: uapi: add MEDIA_BUS_FMT_METADATA_FIXED media bus format Hans Verkuil
1 sibling, 0 replies; 5+ messages in thread
From: Dafna Hirschfeld @ 2020-10-20 15:45 UTC (permalink / raw)
To: linux-media
Cc: mchehab, dafna.hirschfeld, dafna3, tfiga, hverkuil,
linux-rockchip, helen.koike, laurent.pinchart, sakari.ailus,
kernel, ezequiel
Set the code of the metadata pads of the isp entity to
MEDIA_BUS_FMT_METADATA_FIXED and set the width and
height of their formats to 0. This solves the TODO
item:
"Fix pad format size for statistics and parameters entities."
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Acked-by: Helen Koike <helen.koike@collabora.com>
---
no changes since v1
drivers/staging/media/rkisp1/TODO | 1 -
drivers/staging/media/rkisp1/rkisp1-isp.c | 8 ++++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/media/rkisp1/TODO b/drivers/staging/media/rkisp1/TODO
index e7c8398fc2ce..c30c83681452 100644
--- a/drivers/staging/media/rkisp1/TODO
+++ b/drivers/staging/media/rkisp1/TODO
@@ -1,4 +1,3 @@
-* Fix pad format size for statistics and parameters entities.
* Fix checkpatch errors.
* Add uapi docs. Remember to add documentation of how quantization is handled.
* streaming paths (mainpath and selfpath) check if the other path is streaming
diff --git a/drivers/staging/media/rkisp1/rkisp1-isp.c b/drivers/staging/media/rkisp1/rkisp1-isp.c
index fb23461d865c..889982d8ca41 100644
--- a/drivers/staging/media/rkisp1/rkisp1-isp.c
+++ b/drivers/staging/media/rkisp1/rkisp1-isp.c
@@ -574,7 +574,7 @@ static int rkisp1_isp_enum_mbus_code(struct v4l2_subdev *sd,
} else {
if (code->index > 0)
return -EINVAL;
- code->code = MEDIA_BUS_FMT_FIXED;
+ code->code = MEDIA_BUS_FMT_METADATA_FIXED;
return 0;
}
@@ -633,10 +633,10 @@ static int rkisp1_isp_init_config(struct v4l2_subdev *sd,
RKISP1_ISP_PAD_SINK_PARAMS);
src_fmt = v4l2_subdev_get_try_format(sd, cfg,
RKISP1_ISP_PAD_SOURCE_STATS);
- sink_fmt->width = RKISP1_DEFAULT_WIDTH;
- sink_fmt->height = RKISP1_DEFAULT_HEIGHT;
+ sink_fmt->width = 0;
+ sink_fmt->height = 0;
sink_fmt->field = V4L2_FIELD_NONE;
- sink_fmt->code = MEDIA_BUS_FMT_FIXED;
+ sink_fmt->code = MEDIA_BUS_FMT_METADATA_FIXED;
*src_fmt = *sink_fmt;
return 0;
--
2.17.1
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] media: uapi: add MEDIA_BUS_FMT_METADATA_FIXED media bus format.
2020-10-20 15:45 [PATCH v2 1/2] media: uapi: add MEDIA_BUS_FMT_METADATA_FIXED media bus format Dafna Hirschfeld
2020-10-20 15:45 ` [PATCH v2 2/2] media: staging: rkisp1: isp: set metadata pads to MEDIA_BUS_FMT_METADATA_FIXED Dafna Hirschfeld
@ 2020-10-30 8:58 ` Hans Verkuil
2020-10-30 11:34 ` Dafna Hirschfeld
1 sibling, 1 reply; 5+ messages in thread
From: Hans Verkuil @ 2020-10-30 8:58 UTC (permalink / raw)
To: Dafna Hirschfeld, linux-media
Cc: mchehab, dafna3, tfiga, linux-rockchip, helen.koike,
laurent.pinchart, sakari.ailus, kernel, ezequiel
On 20/10/2020 17:45, Dafna Hirschfeld wrote:
> MEDIA_BUS_FMT_METADATA_FIXED should be used when
> the same driver handles both sides of the link and
> the bus format is a fixed metadata format that is
> not configurable from userspace.
> The width and height will be set to 0 for this format.
>
> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
> Acked-by: Helen Koike <helen.koike@collabora.com>
> ---
> changes since v1:
> 1. replace "This format may have 0 height and width."
> with "Width and height will be set to 0 for this format."
> and add it also to the commit log
> 2. s/meida:/media:/ in the patch subject line
>
> include/uapi/linux/media-bus-format.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
> index 84fa53ffb13f..2ce3d891d344 100644
> --- a/include/uapi/linux/media-bus-format.h
> +++ b/include/uapi/linux/media-bus-format.h
> @@ -156,4 +156,12 @@
> /* HSV - next is 0x6002 */
> #define MEDIA_BUS_FMT_AHSV8888_1X32 0x6001
>
> +/*
> + * This format should be used when the same driver handles
> + * both sides of the link and the bus format is a fixed
> + * metadata format that is not configurable from userspace.
> + * Width and height will be set to 0 for this format.
> + */
> +#define MEDIA_BUS_FMT_METADATA_FIXED 0x7001
> +
> #endif /* __LINUX_MEDIA_BUS_FORMAT_H */
>
Documentation/userspace-api/media/v4l/subdev-formats.rst also needs to
be updated.
Regards,
Hans
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] media: uapi: add MEDIA_BUS_FMT_METADATA_FIXED media bus format.
2020-10-30 8:58 ` [PATCH v2 1/2] media: uapi: add MEDIA_BUS_FMT_METADATA_FIXED media bus format Hans Verkuil
@ 2020-10-30 11:34 ` Dafna Hirschfeld
2020-10-30 11:58 ` Hans Verkuil
0 siblings, 1 reply; 5+ messages in thread
From: Dafna Hirschfeld @ 2020-10-30 11:34 UTC (permalink / raw)
To: Hans Verkuil, linux-media
Cc: mchehab, dafna3, tfiga, linux-rockchip, helen.koike,
laurent.pinchart, sakari.ailus, kernel, ezequiel
Am 30.10.20 um 09:58 schrieb Hans Verkuil:
> On 20/10/2020 17:45, Dafna Hirschfeld wrote:
>> MEDIA_BUS_FMT_METADATA_FIXED should be used when
>> the same driver handles both sides of the link and
>> the bus format is a fixed metadata format that is
>> not configurable from userspace.
>> The width and height will be set to 0 for this format.
>>
>> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
>> Acked-by: Helen Koike <helen.koike@collabora.com>
>> ---
>> changes since v1:
>> 1. replace "This format may have 0 height and width."
>> with "Width and height will be set to 0 for this format."
>> and add it also to the commit log
>> 2. s/meida:/media:/ in the patch subject line
>>
>> include/uapi/linux/media-bus-format.h | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
>> index 84fa53ffb13f..2ce3d891d344 100644
>> --- a/include/uapi/linux/media-bus-format.h
>> +++ b/include/uapi/linux/media-bus-format.h
>> @@ -156,4 +156,12 @@
>> /* HSV - next is 0x6002 */
>> #define MEDIA_BUS_FMT_AHSV8888_1X32 0x6001
>>
>> +/*
>> + * This format should be used when the same driver handles
>> + * both sides of the link and the bus format is a fixed
>> + * metadata format that is not configurable from userspace.
>> + * Width and height will be set to 0 for this format.
>> + */
>> +#define MEDIA_BUS_FMT_METADATA_FIXED 0x7001
>> +
>> #endif /* __LINUX_MEDIA_BUS_FORMAT_H */
>>
>
> Documentation/userspace-api/media/v4l/subdev-formats.rst also needs to
> be updated.
hi,
I wonder what should be the documentation, since this mbus code
is for very specific use case. You think that the 0x7* mbus codes
should be 'metadata mbus codes'?
Thanks,
Dafna
>
> Regards,
>
> Hans
>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] media: uapi: add MEDIA_BUS_FMT_METADATA_FIXED media bus format.
2020-10-30 11:34 ` Dafna Hirschfeld
@ 2020-10-30 11:58 ` Hans Verkuil
0 siblings, 0 replies; 5+ messages in thread
From: Hans Verkuil @ 2020-10-30 11:58 UTC (permalink / raw)
To: Dafna Hirschfeld, linux-media
Cc: mchehab, dafna3, tfiga, linux-rockchip, helen.koike,
laurent.pinchart, sakari.ailus, kernel, ezequiel
On 30/10/2020 12:34, Dafna Hirschfeld wrote:
>
>
> Am 30.10.20 um 09:58 schrieb Hans Verkuil:
>> On 20/10/2020 17:45, Dafna Hirschfeld wrote:
>>> MEDIA_BUS_FMT_METADATA_FIXED should be used when
>>> the same driver handles both sides of the link and
>>> the bus format is a fixed metadata format that is
>>> not configurable from userspace.
>>> The width and height will be set to 0 for this format.
>>>
>>> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
>>> Acked-by: Helen Koike <helen.koike@collabora.com>
>>> ---
>>> changes since v1:
>>> 1. replace "This format may have 0 height and width."
>>> with "Width and height will be set to 0 for this format."
>>> and add it also to the commit log
>>> 2. s/meida:/media:/ in the patch subject line
>>>
>>> include/uapi/linux/media-bus-format.h | 8 ++++++++
>>> 1 file changed, 8 insertions(+)
>>>
>>> diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
>>> index 84fa53ffb13f..2ce3d891d344 100644
>>> --- a/include/uapi/linux/media-bus-format.h
>>> +++ b/include/uapi/linux/media-bus-format.h
>>> @@ -156,4 +156,12 @@
>>> /* HSV - next is 0x6002 */
>>> #define MEDIA_BUS_FMT_AHSV8888_1X32 0x6001
>>>
>>> +/*
>>> + * This format should be used when the same driver handles
>>> + * both sides of the link and the bus format is a fixed
>>> + * metadata format that is not configurable from userspace.
>>> + * Width and height will be set to 0 for this format.
>>> + */
>>> +#define MEDIA_BUS_FMT_METADATA_FIXED 0x7001
>>> +
>>> #endif /* __LINUX_MEDIA_BUS_FORMAT_H */
>>>
>>
>> Documentation/userspace-api/media/v4l/subdev-formats.rst also needs to
>> be updated.
>
> hi,
> I wonder what should be the documentation, since this mbus code
Basically the same as you wrote in the comment above.
> is for very specific use case. You think that the 0x7* mbus codes
> should be 'metadata mbus codes'?
Yes.
Regards,
Hans
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-10-30 11:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-20 15:45 [PATCH v2 1/2] media: uapi: add MEDIA_BUS_FMT_METADATA_FIXED media bus format Dafna Hirschfeld
2020-10-20 15:45 ` [PATCH v2 2/2] media: staging: rkisp1: isp: set metadata pads to MEDIA_BUS_FMT_METADATA_FIXED Dafna Hirschfeld
2020-10-30 8:58 ` [PATCH v2 1/2] media: uapi: add MEDIA_BUS_FMT_METADATA_FIXED media bus format Hans Verkuil
2020-10-30 11:34 ` Dafna Hirschfeld
2020-10-30 11:58 ` Hans Verkuil
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).