Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2E01C433DF for ; Wed, 14 Oct 2020 20:41:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 992DE2224E for ; Wed, 14 Oct 2020 20:41:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387670AbgJNUlM (ORCPT ); Wed, 14 Oct 2020 16:41:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387591AbgJNUlL (ORCPT ); Wed, 14 Oct 2020 16:41:11 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B46F7C061755 for ; Wed, 14 Oct 2020 13:41:11 -0700 (PDT) Received: from [IPv6:2804:14c:483:7f66::1004] (unknown [IPv6:2804:14c:483:7f66::1004]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: koike) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id B168C1F45611; Wed, 14 Oct 2020 21:41:06 +0100 (BST) Subject: Re: [PATCH] v4l2-compliance: skip dimentions tests for media bus format MEDIA_BUS_FMT_METADATA_FIXED To: Dafna Hirschfeld , linux-media@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com, ezequiel@collabora.com, hverkuil@xs4all.nl, kernel@collabora.com, dafna3@gmail.com, sakari.ailus@linux.intel.com, linux-rockchip@lists.infradead.org, mchehab@kernel.org, tfiga@chromium.org References: <20200922171933.3830-1-dafna.hirschfeld@collabora.com> From: Helen Koike Message-ID: Date: Wed, 14 Oct 2020 17:41:02 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.2 MIME-Version: 1.0 In-Reply-To: <20200922171933.3830-1-dafna.hirschfeld@collabora.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 lgtm Reviewed-by: Helen Koike 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); > + } > fail_on_test(fmt.code == 0 || fmt.code == ~0U); > fail_on_test(fmt.field == ~0U); > if (!node->is_passthrough_subdev) { >