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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKMK7uGhMCwbztGdEmG4gFgpyhw6j-JFow-AaprFxcX710=qXA@mail.gmail.com>
Date: Wed, 10 Jan 2024 14:09:32 +0100
From: Daniel Vetter <daniel@...ll.ch>
To: Andri Yngvason <andri@...vason.is>
Cc: Harry Wentland <harry.wentland@....com>, Leo Li <sunpeng.li@....com>, 
	Rodrigo Siqueira <Rodrigo.Siqueira@....com>, Alex Deucher <alexander.deucher@....com>, 
	Christian König <christian.koenig@....com>, 
	"Pan, Xinhui" <Xinhui.Pan@....com>, David Airlie <airlied@...il.com>, 
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>, 
	Thomas Zimmermann <tzimmermann@...e.de>, Jani Nikula <jani.nikula@...ux.intel.com>, 
	Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>, Rodrigo Vivi <rodrigo.vivi@...el.com>, 
	Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>, amd-gfx@...ts.freedesktop.org, 
	dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org, 
	intel-gfx@...ts.freedesktop.org, Simon Ser <contact@...rsion.fr>, 
	Werner Sembach <wse@...edocomputers.com>
Subject: Re: [PATCH 3/7] drm/amd/display: Add handling for new "active color
 format" property

On Wed, 10 Jan 2024 at 13:53, Andri Yngvason <andri@...vason.is> wrote:
>
> mið., 10. jan. 2024 kl. 11:10 skrifaði Daniel Vetter <daniel@...ll.ch>:
> >
> > On Tue, Jan 09, 2024 at 06:11:00PM +0000, Andri Yngvason wrote:
> > > +     /* Extract information from crtc to communicate it to userspace as connector properties */
> > > +     for_each_new_connector_in_state(state, connector, new_con_state, i) {
> > > +             struct drm_crtc *crtc = new_con_state->crtc;
> > > +             struct dc_stream_state *stream;
> > > +
> > > +             if (crtc) {
> > > +                     new_crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
> > > +                     dm_new_crtc_state = to_dm_crtc_state(new_crtc_state);
> > > +                     stream = dm_new_crtc_state->stream;
> > > +
> > > +                     if (stream) {
> > > +                             drm_connector_set_active_color_format_property(connector,
> > > +                                     convert_dc_pixel_encoding_into_drm_color_format(
> > > +                                             dm_new_crtc_state->stream->timing.pixel_encoding));
> > > +                     }
> > > +             } else {
> > > +                     drm_connector_set_active_color_format_property(connector, 0);
> >
> > Just realized an even bigger reason why your current design doesn't work:
> > You don't have locking here.
> >
> > And you cannot grab the required lock, which is
> > drm_dev->mode_config.mutex, because that would result in deadlocks. So
> > this really needs to use the atomic state based design I've described.
> >
>
> Maybe we should just drop "actual color format" and instead fail the
> modeset if the "preferred color format" property cannot be satisfied?
> It seems like the simplest thing to do here, though it is perhaps less
> convenient for userspace. In that case, the "preferred color format"
> property should just be called "color format".

Yeah that's more in line with how other atomic properties work. This
way userspace can figure out what works with a TEST_ONLY commit too.
And for this to work you probably want to have an "automatic" setting
too.
-Sima
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ