dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Marek Vasut <marex@denx.de>,
	Joonyoung Shim <jy0922.shim@samsung.com>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Hans de Goede <hdegoede@redhat.com>, Chen-Yu Tsai <wens@csie.org>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Jingoo Han <jingoohan1@gmail.com>
Subject: Re: [PATCH] drm: Don't create the IN_FORMATS blob when the driver does not provide .format_mod_supported()
Date: Mon, 26 Oct 2020 10:00:30 +0100	[thread overview]
Message-ID: <CAKMK7uGNP5us8KFffnPwq7g4b0-B2q-m7deqz_rPHtCrh_qUTw@mail.gmail.com> (raw)
In-Reply-To: <20201023225200.GF6112@intel.com>

On Sat, Oct 24, 2020 at 12:52 AM Ville Syrjälä
<ville.syrjala@linux.intel.com> 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@linux.intel.com> wrote:
> >
> > > From: Ville Syrjälä ville.syrjala@linux.intel.com
> > >
> > > 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 Vetter
Software Engineer, Intel Corporation
dri-devel mailing list

      reply	other threads:[~2020-10-26  9:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-23 20:39 [PATCH] drm: Don't create the IN_FORMATS blob when the driver does not provide .format_mod_supported() Ville Syrjala
2020-10-23 22:03 ` Simon Ser
2020-10-23 22:52   ` Ville Syrjälä
2020-10-26  9:00     ` Daniel Vetter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKMK7uGNP5us8KFffnPwq7g4b0-B2q-m7deqz_rPHtCrh_qUTw@mail.gmail.com \
    --to=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hdegoede@redhat.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jingoohan1@gmail.com \
    --cc=jy0922.shim@samsung.com \
    --cc=kraxel@redhat.com \
    --cc=kyungmin.park@samsung.com \
    --cc=marex@denx.de \
    --cc=sw0312.kim@samsung.com \
    --cc=ville.syrjala@linux.intel.com \
    --cc=wens@csie.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).