Re: [PATCHv4 21/24] drm/bridge: tc358767: read display_props in get_modes()

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

 



On 28.05.2019 10:27, Tomi Valkeinen wrote:
> We need to know the link bandwidth to filter out modes we cannot
> support, so we need to have read the display props before doing the
> filtering.
>
> To ensure we have up to date display props, call tc_get_display_props()
> in the beginning of tc_connector_get_modes().
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@xxxxxx>


Reviewed-by: Andrzej Hajda <a.hajda@xxxxxxxxxxx>

 --
Regards
Andrzej

> ---
>  drivers/gpu/drm/bridge/tc358767.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
> index ffcbecf69d40..2b9d6046d76e 100644
> --- a/drivers/gpu/drm/bridge/tc358767.c
> +++ b/drivers/gpu/drm/bridge/tc358767.c
> @@ -1188,6 +1188,13 @@ static int tc_connector_get_modes(struct drm_connector *connector)
>  	struct tc_data *tc = connector_to_tc(connector);
>  	struct edid *edid;
>  	unsigned int count;
> +	int ret;
> +
> +	ret = tc_get_display_props(tc);
> +	if (ret < 0) {
> +		dev_err(tc->dev, "failed to read display props: %d\n", ret);
> +		return 0;
> +	}
>  
>  	if (tc->panel && tc->panel->funcs && tc->panel->funcs->get_modes) {
>  		count = tc->panel->funcs->get_modes(tc->panel);


_______________________________________________
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