From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2FA5AC04A95 for ; Tue, 25 Oct 2022 15:24:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nfgPeCFb59vj5FlivZK4lLmSOsYM3JBWxfXH2hoyygQ=; b=decnUR6mOnZKv8Hfb2UJIKR5w3 hWRu35OqsZU1bRxiXI6V7Elga8OvFegf2N0CXR73/hsYJjZQQFcIYqaB1paHMTPSkBppgXPgIIWUW akwh3KWBdp2WlcR0fvAvQhp7XddKfs5Fpxckdq/wzMQ93U6YKl4+UxGweD+WnJ+DgSudwkHRBYlPz Daa5+cePKPLouFaeUPFqBTgdGg+fQ0qaDbpk7a6r55r3zaSpn66apHctxqunWOQkHb080p+ziPJWT zildnQgaJqc/FcGwCSBDZLCKyTlnz4xF83ahy8X1LMicDfLInOH01hNf6oalewNUyDvUzNGp7HURr 4HsodJwg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1onLlp-0064Fb-GT; Tue, 25 Oct 2022 15:23:13 +0000 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1onLlm-0064Cy-3F for linux-arm-kernel@lists.infradead.org; Tue, 25 Oct 2022 15:23:12 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 4ECFF240003; Tue, 25 Oct 2022 15:23:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1666711384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qDzusZ9A8zw1jVXS4iAKbgJV8r3mCHdkLf1MyFvx4gk=; b=WyQWk65ertDntaKhrGj2iEo9HpiA+d4viIf1ns4+LTjL95FFJj5RygO21qTem71T734nMU XuFdPvOe3SmnjD1hJ+Z/cEwn0j4R4PsZlGPJ8Fldbt43ScGRbt0KWzH2gPCBXrdb7pMqCt tmpzhW6N+nEO+LS8MnOFxA5edif7JHq89c1iXH4YiwaCcDLCNgJsNYWgM782c1EHXKwSN/ vu/Q6w3dgJv/6gDN43FtD61zcadhTxBb8NZ0ZAqiQo5xICYa89ushQMdyJzT3U3yg16Dtb cP1yW44UuAwQD2fUa761qEcPQnDGHLAXciStnBRnV+Rv6AG2+zVCFLqtdyyYug== Date: Tue, 25 Oct 2022 17:22:59 +0200 From: Paul Kocialkowski To: Jernej =?utf-8?Q?=C5=A0krabec?= Cc: Dan Carpenter , mripard@kernel.org, mchehab@kernel.org, gregkh@linuxfoundation.org, wens@csie.org, samuel@sholland.org, hverkuil-cisco@xs4all.nl, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 04/11] media: cedrus: Add helper for checking capabilities Message-ID: References: <20221024201515.34129-1-jernej.skrabec@gmail.com> <20221024201515.34129-5-jernej.skrabec@gmail.com> <13124586.uLZWGnKmhe@jernej-laptop> MIME-Version: 1.0 In-Reply-To: <13124586.uLZWGnKmhe@jernej-laptop> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221025_082310_307770_C3CD8362 X-CRM114-Status: GOOD ( 23.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============2020595292802825416==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============2020595292802825416== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="W34rlajBUncxrU/f" Content-Disposition: inline --W34rlajBUncxrU/f Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Jernej, On Tue 25 Oct 22, 17:17, Jernej =C5=A0krabec wrote: > Dne torek, 25. oktober 2022 ob 08:30:28 CEST je Dan Carpenter napisal(a): > > On Mon, Oct 24, 2022 at 10:15:08PM +0200, Jernej Skrabec wrote: > > > There is several different Cedrus cores with varying capabilities, so > > > some operations like listing formats depends on checks if feature is > > > supported or not. > > >=20 > > > Currently check for capabilities is only in format enumeration helper, > > > but it will be used also elsewhere later. Let's convert this check to > > > helper and while at it, also simplify it. There is no need to check if > > > capability mask is zero, condition will still work properly. > >=20 > > Sure. That's true. Out of curiousity, can cedrus_formats[i].capabilit= ies > > be zero? Because it feels like that's what should be checked. >=20 > Yes, it can be. It's the case for V4L2_PIX_FMT_NV12_32L32. All variants= =20 > supports it, so there is no special capability needed in order to be list= ed.=20 > What would you check in such case? Condition still works for this case. I think the problem is that (bits & 0) =3D=3D 0 is always true. So if the input caps are 0, we need to make sure to return false. Cheers, Paul --=20 Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com --W34rlajBUncxrU/f Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAmNX/1MACgkQ3cLmz3+f v9Hflwf/W2MqmRYak1O1TUFjnU5lVd99pw1YkGwToYlc9u+6GUXrUy0MBg0vXhOB o0P+HJNDhO1cRPqpTWcL3B3dJ13j0RhTHOGQNFVtkedHoWsRKM3OGCYHlGgMwGQm FBYMx7GgV6HkB3uox/fY60RAqYG42RWkm6h+lVwdb/771kNvEBDYX1U/rrQaLSCY uh/6uKNqO6EtUaLYI/ox+7C35G2DZepkHz+9miOY7KDdgXBloFKA+9t8OdjYx899 KROzq5yjNk04Jbe3xFX9B2saxt8Y6OlxcElLKyZFBJ1NhjaGss14BToEH9etGQ/8 6gSrdpjlnmrKeVQvEFKhIhKxx56bpw== =0zvP -----END PGP SIGNATURE----- --W34rlajBUncxrU/f-- --===============2020595292802825416== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============2020595292802825416==--