linux-rockchip.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Helen Koike <helen.koike@collabora.com>,
	Dafna Hirschfeld <dafna.hirschfeld@collabora.com>,
	linux-media@vger.kernel.org
Cc: mchehab@kernel.org, dafna3@gmail.com, tfiga@chromium.org,
	linux-rockchip@lists.infradead.org,
	laurent.pinchart@ideasonboard.com, sakari.ailus@linux.intel.com,
	kernel@collabora.com, ezequiel@collabora.com
Subject: Re: [PATCH] v4l2-compliance: skip dimentions tests for media bus format MEDIA_BUS_FMT_METADATA_FIXED
Date: Tue, 20 Oct 2020 09:23:32 +0200	[thread overview]
Message-ID: <3b6ce2b2-5ce7-5184-25ae-0583026c214e@xs4all.nl> (raw)
In-Reply-To: <ee3c92ea-8f1f-477e-4f16-d8a6b8c5918f@collabora.com>

On 14/10/2020 22:41, Helen Koike wrote:
> 
> 
> On 9/22/20 2:19 PM, Dafna Hirschfeld wrote:
>> The media bus format code MEDIA_BUS_FMT_METADATA_FIXED
>> is used for metadata formats that are not configurable
>> from userspace and therefore may have any value for
>> width and height. So skip width and height tests for
>> this format.
>>
>> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
> 
> lgtm
> 
> Reviewed-by: Helen Koike <helen.koike@collabora.com>
> 
> Thanks
> Helen
> 
>> ---
>> note, this patch should be applied after updating the header
>> include/linux/media-bus-format.h to include that new format.
>> ---
>>  utils/v4l2-compliance/v4l2-test-subdevs.cpp | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/utils/v4l2-compliance/v4l2-test-subdevs.cpp b/utils/v4l2-compliance/v4l2-test-subdevs.cpp
>> index ec3ef169..f60853e3 100644
>> --- a/utils/v4l2-compliance/v4l2-test-subdevs.cpp
>> +++ b/utils/v4l2-compliance/v4l2-test-subdevs.cpp
>> @@ -300,8 +300,10 @@ int testSubDevFrameInterval(struct node *node, unsigned pad)
>>  static int checkMBusFrameFmt(struct node *node, struct v4l2_mbus_framefmt &fmt)
>>  {
>>  	fail_on_test(check_0(fmt.reserved, sizeof(fmt.reserved)));
>> -	fail_on_test(fmt.width == 0 || fmt.width > 65536);
>> -	fail_on_test(fmt.height == 0 || fmt.height > 65536);
>> +	if (fmt.code != MEDIA_BUS_FMT_METADATA_FIXED) {
>> +		fail_on_test(fmt.width == 0 || fmt.width > 65536);
>> +		fail_on_test(fmt.height == 0 || fmt.height > 65536);
>> +	}

I would always fail if width or height != 0 for this format.

Regards,

	Hans

>>  	fail_on_test(fmt.code == 0 || fmt.code == ~0U);
>>  	fail_on_test(fmt.field == ~0U);
>>  	if (!node->is_passthrough_subdev) {
>>


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

      reply	other threads:[~2020-10-20  7:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-22 17:19 [PATCH] v4l2-compliance: skip dimentions tests for media bus format MEDIA_BUS_FMT_METADATA_FIXED Dafna Hirschfeld
2020-10-14 20:41 ` Helen Koike
2020-10-20  7:23   ` Hans Verkuil [this message]

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=3b6ce2b2-5ce7-5184-25ae-0583026c214e@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=dafna.hirschfeld@collabora.com \
    --cc=dafna3@gmail.com \
    --cc=ezequiel@collabora.com \
    --cc=helen.koike@collabora.com \
    --cc=kernel@collabora.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tfiga@chromium.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 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).