[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <PIq2EEI7giz2rOuv2cfySbdxwht8AaCye140X5C7NejjXT6kD67E3E28uvg4Ebhob12EJUBtAxGPFNOgZwSWLYEfMtdhRNt3mR8bBGBJmU4=@emersion.fr>
Date: Thu, 23 Dec 2021 13:42:32 +0000
From: Simon Ser <contact@...rsion.fr>
To: Ville Syrjälä <ville.syrjala@...ux.intel.com>
Cc: José Expósito <jose.exposito89@...il.com>,
airlied@...ux.ie, alexandre.torgue@...s.st.com,
benjamin.gaignard@...aro.org,
linux-stm32@...md-mailman.stormreply.com, marex@...x.de,
linux-imx@....com, intel-gfx@...ts.freedesktop.org,
tzimmermann@...e.de, s.hauer@...gutronix.de,
rodrigo.vivi@...el.com, kernel@...gutronix.de,
linux-arm-kernel@...ts.infradead.org,
dri-devel@...ts.freedesktop.org, yannick.fertre@...s.st.com,
linux-kernel@...r.kernel.org, philippe.cornu@...s.st.com,
mcoquelin.stm32@...il.com, dmitry.baryshkov@...aro.org,
shawnguo@...nel.org
Subject: Re: [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
On Thursday, December 23rd, 2021 at 12:56, Ville Syrjälä <ville.syrjala@...ux.intel.com> wrote:
> > - /* If we can't determine support, just bail */
> > - if (!plane->funcs->format_mod_supported)
> > - goto done;
> > -
> > mod = modifiers_ptr(blob_data);
> > for (i = 0; i < plane->modifier_count; i++) {
> > for (j = 0; j < plane->format_count; j++) {
> > - if (plane->funcs->format_mod_supported(plane,
> > + if (!plane->funcs->format_mod_supported ||
> > + plane->funcs->format_mod_supported(plane,
> > plane->format_types[j],
> > 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.
Powered by blists - more mailing lists