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: <61c3860a-6e35-b90a-2c4f-6caca96c5db9@baylibre.com>
Date:   Mon, 24 Aug 2020 11:50:33 +0200
From:   Neil Armstrong <narmstrong@...libre.com>
To:     Algea Cao <algea.cao@...k-chips.com>, a.hajda@...sung.com,
        kuankuan.y@...il.com, hjc@...k-chips.com, tzimmermann@...e.de,
        dri-devel@...ts.freedesktop.org, sam@...nborg.org,
        airlied@...ux.ie, heiko@...ech.de, jernej.skrabec@...l.net,
        Laurent.pinchart@...asonboard.com,
        laurent.pinchart+renesas@...asonboard.com, jonas@...boo.se,
        mripard@...nel.org, darekm@...gle.com,
        linux-rockchip@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org, cychiang@...omium.org,
        linux-kernel@...r.kernel.org, jbrunet@...libre.com,
        maarten.lankhorst@...ux.intel.com, daniel@...ll.ch
Subject: Re: [PATCH 6/6] drm: bridge: dw-hdmi: Get output bus format when
 dw-hdmi is the only bridge

Hi,

On 12/08/2020 10:36, Algea Cao wrote:
> If plat_data->get_output_bus_format() is exist, we can
> use it to get hdmi output bus format when dw-hdmi is the
> only bridge. The hdmi output bus format can be set by vendor
> properties.
> 
> Signed-off-by: Algea Cao <algea.cao@...k-chips.com>
> ---
> 
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 1eb4736b9b59..878e9e506963 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -2644,6 +2644,8 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,
>  					unsigned int *num_output_fmts)
>  {
>  	struct drm_connector *conn = conn_state->connector;
> +	struct dw_hdmi *hdmi = bridge->driver_private;
> +	void *data = hdmi->plat_data->phy_data;
>  	struct drm_display_info *info = &conn->display_info;
>  	struct drm_display_mode *mode = &crtc_state->mode;
>  	u8 max_bpc = conn_state->max_requested_bpc;
> @@ -2662,7 +2664,11 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,
>  	/* If dw-hdmi is the only bridge, avoid negociating with ourselves */
>  	if (list_is_singular(&bridge->encoder->bridge_chain)) {
>  		*num_output_fmts = 1;
> -		output_fmts[0] = MEDIA_BUS_FMT_FIXED;
> +		if (hdmi->plat_data->get_output_bus_format)
> +			output_fmts[0] =
> +				hdmi->plat_data->get_output_bus_format(data);


The whole bus format negociation was introduced to actually avoid using such get_output_bus_format()
callback, please implement proper bus format negociation.

Neil

> +		else
> +			output_fmts[0] = MEDIA_BUS_FMT_FIXED;
>  
>  		return output_fmts;
>  	}
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ