lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f3358cab41351011ebe7d4a3670682a11df9aed4.camel@bootlin.com>
Date:   Fri, 28 Dec 2018 16:09:28 +0100
From:   Paul Kocialkowski <paul.kocialkowski@...tlin.com>
To:     Daniel Vetter <daniel@...ll.ch>, Eric Anholt <eric@...olt.net>
Cc:     dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        David Airlie <airlied@...ux.ie>,
        Maxime Ripard <maxime.ripard@...tlin.com>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        Eben Upton <eben@...pberrypi.org>
Subject: Re: [PATCH] drm/vc4: Allow fb modifiers early enough to fill
 IN_FORMATS property

On Fri, 2018-12-28 at 13:08 +0100, Daniel Vetter wrote:
> On Thu, Dec 27, 2018 at 03:36:20PM -0800, Eric Anholt wrote:
> > Paul Kocialkowski <paul.kocialkowski@...tlin.com> writes:
> > 
> > > The KMS mode_config elements are currently configured in vc4_kms_load,
> > > that is called after all components are binded (component_bind_all).
> > > However, the CRTC component (for the Pixel Valve) needs to access the
> > > allow_fb_modifiers element at bind time, when initializing its planes
> > > through drm_universal_plane_init.
> > > 
> > > This helpers checks allow_fb_modifiers to decide whether to fill the
> > > IN_FORMATS property. Because allow_fb_modifiers is still set to false
> > > at this point, the property is never filled and userspace cannot
> > > retrieve the combination of supported formats and modifiers.
> > > 
> > > Fix this by setting allow_fb_modifiers right after calling
> > > drm_mode_config_init (which initializes the structure), before binding
> > > the components of the driver.
> > 
> > This makes me wonder if the flag could be removed and replaced with "did
> > non-NULL modifiers get supplied to plane init?"  I think I've tripped
> > over this flag in other KMS hacking, too.
> 
> Sounds like a good idea to me. Just setting it in plane_init should work I
> think ...

Yeah, we probably need to keep the flag around since it's used in
various places, but we could totally have it auto-set as soon as a
plane is registered with a list of modifiers.

I was also thinking of allowing the core to fill-in the IN_FORMATS prop
even without this flag set, which would only list formats (but not
modifiers).

What do you think?

Cheers,

Paul

-- 
Paul Kocialkowski, Bootlin (formerly Free Electrons)
Embedded Linux and kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ