Re: [PATCH 6/6] drm: bridge: dw-hdmi: Get output bus format when dw-hdmi is the only bridge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
> ---
> 
>  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;
>  	}
> 

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux