From patchwork Mon Dec 13 23:42:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 523559 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 165A6C433F5 for ; Mon, 13 Dec 2021 23:43:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244266AbhLMXnJ (ORCPT ); Mon, 13 Dec 2021 18:43:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244259AbhLMXnI (ORCPT ); Mon, 13 Dec 2021 18:43:08 -0500 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB5E8C06173F for ; Mon, 13 Dec 2021 15:43:07 -0800 (PST) Received: by mail-wm1-x333.google.com with SMTP id 137so13092988wma.1 for ; Mon, 13 Dec 2021 15:43:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=dldKQiAsH5NhCbn3AHqG5fc9Jd8QHr7SEGOiBRpzv+Y=; b=pZ9KPL7IqYcROTksOwvAgfewPToD7EMRIqXr835W6zFQPD30D1R+eiAxHiH2C0AV+k O/jzD4c2UM+/VS2UgYRfU8PHbOkkougFUpPN5BLFJVKWfN5DB/OvWkTD6TcDrKB4T99g eAoHwuZYH+8+bD2LfqAPAhea9yTULRfWU5YE76zgiXOtPw6Uhns62pwwzin+9wIuoBdV wruZ2UqFMVqbKDPFXk8hjZ6how6iJmoGH6FkA1wr6AGARhaiMwcKBMplIz1snK1Cf58c b8rfxLkIsm5leF1n6N/L7NgJHF8+6COgbkBxWBvktd4WSWjJZqmxfpH6br5lYZU5XYW4 tIOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dldKQiAsH5NhCbn3AHqG5fc9Jd8QHr7SEGOiBRpzv+Y=; b=yi6vryjWyvyUG1gowpU3RpXXTWbcLZoY4bBvHT0dDwfwAgChr+hZLUy5vQQlY06rzP hQwIB+2zf4Pj34rJUPjgh0/IKTDpgldDQ2P7XEbdRCgqlrOh121eBVrcM5K7hCb55yCW 4kP20MBPTaZEjorEairGIr9TOHX+zItiBJvLHuYEuenOcPHA8TXSxYy5SCn3tgJ0SlIG KMqJ5DoCbM0zvD4RdW0Yel9zCdYoh/czgYRwdVVuLVKIcujnWS73+J4TJho3+GE2Tdfr 55EjvDyL2AHwHxzbGLmUCJ84QiZgj3S5IoEczWStTOFWT/SbvjUFQTxmz7PtSOchELiB Or9g== X-Gm-Message-State: AOAM530RKkaEcWIQYjT9XvbzvoW4ZISOfR1j6Rv+oPHfHqyO+WRJwf7x IyJXBMPMuQZDsSmC8TTBDuEjtyG44r0= X-Google-Smtp-Source: ABdhPJy2LnEcI1vRObLzd2Ox+j1fAU3ORgLZZCDFOKQKrUaY/p43xYEdBlgID5GEvB8b3lupNdf8Uw== X-Received: by 2002:a1c:4d13:: with SMTP id o19mr2368799wmh.164.1639438986435; Mon, 13 Dec 2021 15:43:06 -0800 (PST) Received: from localhost.localdomain (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net. [86.13.91.161]) by smtp.gmail.com with ESMTPSA id p19sm435516wmq.4.2021.12.13.15.43.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 15:43:06 -0800 (PST) From: Daniel Scally To: linux-media@vger.kernel.org Subject: [v4l-utils 1/3] v4l-utils: Add MEDIA_LNK_FL_ANCILLARY_LINK macro Date: Mon, 13 Dec 2021 23:42:56 +0000 Message-Id: <20211213234258.41411-2-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211213234258.41411-1-djrscally@gmail.com> References: <20211213234258.41411-1-djrscally@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add a macro to describe the new type of media link in the kernel. Signed-off-by: Daniel Scally --- include/linux/media.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/media.h b/include/linux/media.h index 17432318..e3123d1a 100644 --- a/include/linux/media.h +++ b/include/linux/media.h @@ -222,6 +222,7 @@ struct media_pad_desc { #define MEDIA_LNK_FL_LINK_TYPE (0xf << 28) # define MEDIA_LNK_FL_DATA_LINK (0 << 28) # define MEDIA_LNK_FL_INTERFACE_LINK (1 << 28) +# define MEDIA_LNK_FL_ANCILLARY_LINK (2 << 28) struct media_link_desc { struct media_pad_desc source; From patchwork Mon Dec 13 23:42:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 523558 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88CA1C433EF for ; Mon, 13 Dec 2021 23:43:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244255AbhLMXnK (ORCPT ); Mon, 13 Dec 2021 18:43:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244245AbhLMXnJ (ORCPT ); Mon, 13 Dec 2021 18:43:09 -0500 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08253C061574 for ; Mon, 13 Dec 2021 15:43:09 -0800 (PST) Received: by mail-wm1-x32b.google.com with SMTP id i12so13108182wmq.4 for ; Mon, 13 Dec 2021 15:43:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=/FM5lJgSblkiQRy6I2XnHiIitHe+h/ds8OLMIyjzGYs=; b=CUO9PCmIA/jLOdtawZ24PyEzxGqOJtP15w9SWt0bYyroTBi7tKjvbVHhlTZFhfoYBi oGps18WFeXhaKxpFu0vmrIfVj10i+fmDrfWl3lDj+q1xKueYMWUVa7Jgr2AgaVQ9cIdK AMgeG8AQKnGTgn40vmVG/w2FPeWxTZ0giibPTgo6uWixnu1613qQbLSnUF6RLZkjQK8U CTkFtKGG8TZGdhHoeQ+BylrQizMRQWS4xmTgCeBkVprybfHCf51ojCZRso3M0rrxYHPH GM7TcuIO+mrx6MJUTZsqkRm9dZtVbCOivwOMv9NcpqI/69LrU6yyIKMk/Y4LDFsHOwVc Bbdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/FM5lJgSblkiQRy6I2XnHiIitHe+h/ds8OLMIyjzGYs=; b=EHlfq4I4M5xyygZ1btBudj71HhkxYWBRVLy/fwTYSXc3DGud/wRSNH+0qaZvtMzMHt ah1sdZKdkHSQ3XFItzmy7nU4wIkOgnw/7CZYVSh8jVeSElK6L6aBYMM71zHGvgkZoSI7 XExWWsgAoam2JkCZFABCt01XkLXSGJMmnURMv/iV0rBtE4djIVydu/fCHWQZSC9wjXV2 EqzmD9/PLQhfm/8/U9GqWg1OWdUatm0qWijLWsVlMqrb/NQldTvB5ulh8EYfEt2b3O+t dAVsTJJSxfvbsLbnIjKlOwz0JKY2G3qUsFn1CMiSIxaa1MdgEbUoZSQXKoYXoN5MivK8 rmLA== X-Gm-Message-State: AOAM533yBS82M36RuiVS5v6Z4o2JVBCaE3pbz/Dmf8vCtRM6e6GwgFGT x8sMOLjbIsrORWmfeLxRWyHVbzrIlSE= X-Google-Smtp-Source: ABdhPJyj78yNSKf7/PPSxzm0VjlSdmKoVF5pQm545BKnVWVlzvWK8BTDgekzvfa6ZS+M5ir8PV7MRQ== X-Received: by 2002:a05:600c:3505:: with SMTP id h5mr41207699wmq.22.1639438987623; Mon, 13 Dec 2021 15:43:07 -0800 (PST) Received: from localhost.localdomain (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net. [86.13.91.161]) by smtp.gmail.com with ESMTPSA id p19sm435516wmq.4.2021.12.13.15.43.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 15:43:07 -0800 (PST) From: Daniel Scally To: linux-media@vger.kernel.org Subject: [v4l-utils 3/3] v4l2-compliance: Account for ancillary links Date: Mon, 13 Dec 2021 23:42:58 +0000 Message-Id: <20211213234258.41411-4-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211213234258.41411-1-djrscally@gmail.com> References: <20211213234258.41411-1-djrscally@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Update v4l2-compliance to account for ancillary links, since there are a couple of places in it that explicitly assume only two types of links exist. Signed-off-by: Daniel Scally --- utils/v4l2-compliance/v4l2-test-media.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/v4l2-compliance/v4l2-test-media.cpp b/utils/v4l2-compliance/v4l2-test-media.cpp index 28af0d83..85b1eab5 100644 --- a/utils/v4l2-compliance/v4l2-test-media.cpp +++ b/utils/v4l2-compliance/v4l2-test-media.cpp @@ -261,7 +261,8 @@ int testMediaTopology(struct node *node) for (unsigned i = 0; i < topology.num_links; i++) { media_v2_link &link = v2_links[i]; - bool is_iface = link.flags & MEDIA_LNK_FL_LINK_TYPE; + bool is_iface = (link.flags & MEDIA_LNK_FL_LINK_TYPE) == + MEDIA_LNK_FL_INTERFACE_LINK ? true : false; fail_on_test(check_0(link.reserved, sizeof(link.reserved))); fail_on_test(!link.id); @@ -460,7 +461,8 @@ int testMediaEnum(struct node *node) link_disabled = links.links[i]; // This ioctl only returns data links - fail_on_test(fl & MEDIA_LNK_FL_LINK_TYPE); + fail_on_test((fl & MEDIA_LNK_FL_LINK_TYPE) != + MEDIA_LNK_FL_DATA_LINK); fail_on_test(links.links[i].sink.entity == links.links[i].source.entity); if (is_sink) { fail_on_test(links.links[i].sink.index >= ent.pads);