mbox series

[0/2] Add format MEDIA_BUS_FMT_METADATA_FIXED and use it in rkisp1

Message ID 20200922165813.19378-1-dafna.hirschfeld@collabora.com
Headers show
Series Add format MEDIA_BUS_FMT_METADATA_FIXED and use it in rkisp1 | expand

Message

Dafna Hirschfeld Sept. 22, 2020, 4:58 p.m. UTC
There are 2 pads between the entities
rkisp1_isp to rkisp1_params and rkisp1_stats that transmit
metadata. This metadata is fixed and not configurable from
userspace. Since the metadata has no dimensions, it makes
sense to set the width and height of these pads to 0.
The problem is that it makes the v4l-compliance tests fail.
Currently, in order to silent the tests, the width
and height are set to RKISP1_DEFAULT_*

This patchset sets the dimensions to 0 and solves the
compliance error by introducing a new media bus code
MEDIA_BUS_FMT_METADATA_FIXED

The new code 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.

Then the v4l2-compliance tests can skip the
dimensions test for this media bus code.

See irc discussion for that issue:
https://linuxtv.org/irc/irclogger_log/v4l?date=2020-05-13,Wed
https://linuxtv.org/irc/irclogger_log/v4l?date=2020-05-14,Thu



Dafna Hirschfeld (2):
  meida: uapi: add MEDIA_BUS_FMT_METADATA_FIXED media bus format.
  media: staging: rkisp1: isp: set metadata pads to
    MEDIA_BUS_FMT_METADATA_FIXED

 drivers/staging/media/rkisp1/TODO         | 1 -
 drivers/staging/media/rkisp1/rkisp1-isp.c | 8 ++++----
 include/uapi/linux/media-bus-format.h     | 8 ++++++++
 3 files changed, 12 insertions(+), 5 deletions(-)

Comments

Helen Koike Oct. 14, 2020, 8:40 p.m. UTC | #1
On 9/22/20 1:58 PM, 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.

> 

> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>


Acked-by: Helen Koike <helen.koike@collabora.com>


Thanks
Helen

> ---

>  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..847b45fb546b 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.

> + * This format may have 0 height and width.

> + */

> +#define MEDIA_BUS_FMT_METADATA_FIXED		0x7001

> +

>  #endif /* __LINUX_MEDIA_BUS_FORMAT_H */

>
Hans Verkuil Oct. 20, 2020, 7:22 a.m. UTC | #2
On 14/10/2020 22:40, Helen Koike wrote:
> 

> 

> On 9/22/20 1:58 PM, 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.

>>

>> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>

> 

> Acked-by: Helen Koike <helen.koike@collabora.com>

> 

> Thanks

> Helen

> 

>> ---

>>  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..847b45fb546b 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.

>> + * This format may have 0 height and width.


I would make this stronger:

"Width and height will be set to 0 for this format."

Regards,

	Hans

>> + */

>> +#define MEDIA_BUS_FMT_METADATA_FIXED		0x7001

>> +

>>  #endif /* __LINUX_MEDIA_BUS_FORMAT_H */

>>