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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <MW4PR12MB71657AF1E6B7AC96647133D6E6312@MW4PR12MB7165.namprd12.prod.outlook.com>
Date: Fri, 22 Mar 2024 19:15:19 +0000
From: "Klymenko, Anatoliy" <Anatoliy.Klymenko@....com>
To: Maxime Ripard <mripard@...nel.org>
CC: Laurent Pinchart <laurent.pinchart@...asonboard.com>, Maarten Lankhorst
	<maarten.lankhorst@...ux.intel.com>, Thomas Zimmermann <tzimmermann@...e.de>,
	David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>, "Simek,
 Michal" <michal.simek@....com>, Andrzej Hajda <andrzej.hajda@...el.com>, Neil
 Armstrong <neil.armstrong@...aro.org>, Robert Foss <rfoss@...nel.org>, Jonas
 Karlman <jonas@...boo.se>, Jernej Skrabec <jernej.skrabec@...il.com>, Rob
 Herring <robh+dt@...nel.org>, Krzysztof Kozlowski
	<krzysztof.kozlowski+dt@...aro.org>, Conor Dooley <conor+dt@...nel.org>,
	Mauro Carvalho Chehab <mchehab@...nel.org>, Tomi Valkeinen
	<tomi.valkeinen@...asonboard.com>, "dri-devel@...ts.freedesktop.org"
	<dri-devel@...ts.freedesktop.org>, "linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "devicetree@...r.kernel.org"
	<devicetree@...r.kernel.org>, "linux-media@...r.kernel.org"
	<linux-media@...r.kernel.org>
Subject: RE: [PATCH v3 7/9] drm/atomic-helper: Add select_output_bus_format
 callback

Hi Maxime,

Thank you for the review.

> -----Original Message-----
> From: Maxime Ripard <mripard@...nel.org>
> Sent: Friday, March 22, 2024 2:45 AM
> To: Klymenko, Anatoliy <Anatoliy.Klymenko@....com>
> Cc: Laurent Pinchart <laurent.pinchart@...asonboard.com>; Maarten Lankhorst
> <maarten.lankhorst@...ux.intel.com>; Thomas Zimmermann
> <tzimmermann@...e.de>; David Airlie <airlied@...il.com>; Daniel Vetter
> <daniel@...ll.ch>; Simek, Michal <michal.simek@....com>; Andrzej Hajda
> <andrzej.hajda@...el.com>; Neil Armstrong <neil.armstrong@...aro.org>; Robert
> Foss <rfoss@...nel.org>; Jonas Karlman <jonas@...boo.se>; Jernej Skrabec
> <jernej.skrabec@...il.com>; Rob Herring <robh+dt@...nel.org>; Krzysztof
> Kozlowski <krzysztof.kozlowski+dt@...aro.org>; Conor Dooley
> <conor+dt@...nel.org>; Mauro Carvalho Chehab <mchehab@...nel.org>; Tomi
> Valkeinen <tomi.valkeinen@...asonboard.com>; dri-devel@...ts.freedesktop.org;
> linux-arm-kernel@...ts.infradead.org; linux-kernel@...r.kernel.org;
> devicetree@...r.kernel.org; linux-media@...r.kernel.org
> Subject: Re: [PATCH v3 7/9] drm/atomic-helper: Add select_output_bus_format
> callback
> 
> On Thu, Mar 21, 2024 at 01:43:45PM -0700, Anatoliy Klymenko wrote:
> > diff --git a/drivers/gpu/drm/drm_crtc_helper.c
> > b/drivers/gpu/drm/drm_crtc_helper.c
> > index 2dafc39a27cb..f2e12a3c4e5f 100644
> > --- a/drivers/gpu/drm/drm_crtc_helper.c
> > +++ b/drivers/gpu/drm/drm_crtc_helper.c
> > @@ -1055,3 +1055,39 @@ int drm_helper_force_disable_all(struct
> drm_device *dev)
> >  	return ret;
> >  }
> >  EXPORT_SYMBOL(drm_helper_force_disable_all);
> > +
> > +/**
> > + * drm_helper_crtc_select_output_bus_format - Select output media bus
> > +format
> > + * @crtc: The CRTC to query
> > + * @crtc_state: The new CRTC state
> > + * @supported_fmts: List of media bus format options to pick from
> > + * @num_supported_fmts: Number of media bus formats in
> > +@...ported_fmts list
> > + *
> > + * Encoder drivers may call this helper to give the connected CRTC a
> > +chance to
> > + * select compatible or preffered media bus format to use over the
> > +CRTC encoder
> > + * link. Encoders should provide list of supported input
> > +MEDIA_BUS_FMT_* for
> > + * CRTC to pick from. CRTC driver is expected to select preferred
> > +media bus
> > + * format from the list and, once enabled, generate the signal accordingly.
> > + *
> > + * Returns:
> > + * Selected preferred media bus format or 0 if CRTC does not support
> > +any from
> > + * @supported_fmts list.
> > + */
> > +u32 drm_helper_crtc_select_output_bus_format(struct drm_crtc *crtc,
> > +					     struct drm_crtc_state *crtc_state,
> > +					     const u32 *supported_fmts,
> > +					     unsigned int num_supported_fmts) {
> > +	if (!crtc || !supported_fmts || !num_supported_fmts)
> > +		return 0;
> > +
> > +	if (!crtc->helper_private ||
> > +	    !crtc->helper_private->select_output_bus_format)
> > +		return supported_fmts[0];
> > +
> > +	return crtc->helper_private->select_output_bus_format(crtc,
> > +							crtc_state,
> > +							supported_fmts,
> > +							num_supported_fmts);
> > +}
> 
> Again, the output of that selection must be found in the CRTC state, otherwise
> CRTCs have no way to know which have been selected.
> 

Yes, now I got it - thank you. I'll fix this in the next version.

> Maxime

Thank you,
Anatoliy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ