Re: [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional

Simon Ser contact at emersion.fr
Thu Dec 23 05:42:32 PST 2021


On Thursday, December 23rd, 2021 at 12:56, Ville Syrjälä <ville.syrjala at linux.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.



More information about the linux-arm-kernel mailing list