On Sat, Oct 24, 2020 at 12:52 AM Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> wrote: > > On Fri, Oct 23, 2020 at 10:03:50PM +0000, Simon Ser wrote: > > On Friday, October 23, 2020 10:39 PM, Ville Syrjala <ville.syrjala@xxxxxxxxxxxxxxx> wrote: > > > > > From: Ville Syrjälä ville.syrjala@xxxxxxxxxxxxxxx > > > > > > The code responsible for creating the IN_FORMATS > > > blob is broken when the driver doesn't provide a > > > .format_mod_supported() hook. It just copies in > > > the format list, but leaves all the modifier information > > > zeroed. That would indicate (in a very silly way) that > > > there are in fact no supported format+modifier combinations. > > > That is utter nonsense. > > > > Should we WARN_ON when the driver enables allow_fb_modifiers but > > doesn't populate format_mod_supported? > > .format_mod_supported() was supposed to be optional IIRC. > > But now that I look at it, it looks like only these > drivers are lacking .format_mod_supported(): exynos, mxsfb, > tiny/cirrus, tiny/gm12u320. > > There is some other oddity going on with sun4i which sometimes > uses modifiers sometimes it doesn't. No idea what is going on there. > But it does have .format_mod_supported() at least. > > So I guess if we can get exynos, mxsfb, and tiny/* to implement > the hook then we could make it mandatory. I'd just delete it all, since it's obviously not tested for these drivers. And then add a patch which warns if allow_fb_modifiers, modifiers list passed y/n and .format_mod_support don't all agree. Since a bunch of your don't even set allow_fb_modifiers but pass a format list. So it's a complete mess :-/ Next step would then be to add some todo items, at least the simple/tiny drivers should all be able to do this fairly easily, and probably with linear only as the default. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel