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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux