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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 A0AD1C433EF for ; Thu, 23 Dec 2021 13:42:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D1CD610E39A; Thu, 23 Dec 2021 13:42:42 +0000 (UTC) Received: from mail-41103.protonmail.ch (mail-41103.protonmail.ch [185.70.41.103]) by gabe.freedesktop.org (Postfix) with ESMTPS id A413910E39A for ; Thu, 23 Dec 2021 13:42:40 +0000 (UTC) Received: from mail-0301.mail-europe.com (mail-0301.mail-europe.com [188.165.51.139]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by mail-41103.protonmail.ch (Postfix) with ESMTPS id 4JKWbM0CTsz4x9N8 for ; Thu, 23 Dec 2021 13:42:39 +0000 (UTC) Authentication-Results: mail-41103.protonmail.ch; dkim=pass (2048-bit key) header.d=emersion.fr header.i=@emersion.fr header.b="P1Q1DQgl" Date: Thu, 23 Dec 2021 13:42:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail; t=1640266953; bh=KcpuETzMNMdxDT2q0V4AwCRe4eDh3KXENxpCUjqyk4Q=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc; b=P1Q1DQglL3/H+NbZPwD5FQ5BU9Uxk6pxEJUlWRgkAN0OLEHRoQXT9P6vmQVgI4Shq qswBkVMsLvmRRHD/3SjdYOuBD/GGsV6atIzIAPtvsIcihzg+XQOhNKJ4S5zw4d90GD yw00fU5YY0aXBm/7z9QW1y6keFUYtpbhm6KU5cycwBKvr1TY5EinTkhSnF0bxps/kb vJWQQ7wnICVOxl/imolN69xOrpDSgPFAomrww24G1XS9mkDEk/KWt9aiTZ7c6IFz9B aSiRxt4r6e7O5KrjN0k2a+YJ9Dp9EVAP0/Mu3FzFpyLIEkg43paDmTiPHdA5LXgzCF ZLdjYyzNmAUHg== To: =?utf-8?Q?Ville_Syrj=C3=A4l=C3=A4?= From: Simon Ser Message-ID: In-Reply-To: References: <20211222090552.25972-1-jose.exposito89@gmail.com> <20211222090552.25972-2-jose.exposito89@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Intel-gfx] =?utf-8?q?=5BPATCH_v2_1/6=5D_drm/plane=3A_Make_forma?= =?utf-8?q?t=5Fmod=5Fsupported_truly=C2=A0optional?= X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Simon Ser Cc: marex@denx.de, mcoquelin.stm32@gmail.com, kernel@pengutronix.de, s.hauer@pengutronix.de, tzimmermann@suse.de, airlied@linux.ie, intel-gfx@lists.freedesktop.org, alexandre.torgue@foss.st.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, yannick.fertre@foss.st.com, linux-imx@nxp.com, benjamin.gaignard@linaro.org, dmitry.baryshkov@linaro.org, =?utf-8?Q?Jos=C3=A9_Exp=C3=B3sito?= , shawnguo@kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, philippe.cornu@foss.st.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Thursday, December 23rd, 2021 at 12:56, Ville Syrj=C3=A4l=C3=A4 wrote: > > -=09/* If we can't determine support, just bail */ > > -=09if (!plane->funcs->format_mod_supported) > > -=09=09goto done; > > - > > =09mod =3D modifiers_ptr(blob_data); > > =09for (i =3D 0; i < plane->modifier_count; i++) { > > =09=09for (j =3D 0; j < plane->format_count; j++) { > > -=09=09=09if (plane->funcs->format_mod_supported(plane, > > +=09=09=09if (!plane->funcs->format_mod_supported || > > +=09=09=09 plane->funcs->format_mod_supported(plane, > > =09=09=09=09=09=09=09 plane->format_types[j], > > =09=09=09=09=09=09=09 plane->modifiers[i])) { > > So instead of skipping the whole loop you just skip doing anything > inside the loop? Can't see how that achieves anything at all. No, the check is skipped when the function isn't populated by the driver.