dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Andrzej Hajda <a.hajda@samsung.com>
To: Andrey Gusakov <andrey.gusakov@cogentembedded.com>,
	dri-devel@lists.freedesktop.org
Cc: cphealy@gmail.com
Subject: Re: [PATCH v2 1/7] drm/bridge: tc358767: do no fail on hi-res displays
Date: Mon, 06 Nov 2017 08:25:21 +0100	[thread overview]
Message-ID: <c33e39f9-d1f4-fc02-c93f-d07cd121684d@samsung.com> (raw)
In-Reply-To: <1509728494-23508-2-git-send-email-andrey.gusakov@cogentembedded.com>

On 03.11.2017 18:01, Andrey Gusakov wrote:
> Do not fail data rates higher than 2.7 and more than 2 lanes.
> Try to fall back to 2.7Gbps and 2 lanes.
> ---
>  drivers/gpu/drm/bridge/tc358767.c |   14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
> index 8571cfd..d52cd41 100644
> --- a/drivers/gpu/drm/bridge/tc358767.c
> +++ b/drivers/gpu/drm/bridge/tc358767.c
> @@ -603,8 +603,15 @@ static int tc_get_display_props(struct tc_data *tc)
>  	ret = drm_dp_link_probe(&tc->aux, &tc->link.base);
>  	if (ret < 0)
>  		goto err_dpcd_read;
> -	if ((tc->link.base.rate != 162000) && (tc->link.base.rate != 270000))
> -		goto err_dpcd_inval;
> +	if ((tc->link.base.rate != 162000) && (tc->link.base.rate != 270000)) {
> +		dev_dbg(tc->dev, "Falling to 2.7 Gbps rate\n");
> +		tc->link.base.rate = 270000;
> +	}
> +
> +	if (tc->link.base.num_lanes > 2) {
> +		dev_dbg(tc->dev, "Falling to 2 lanes\n");
> +		tc->link.base.num_lanes = 2;
> +	}
>  
>  	ret = drm_dp_dpcd_readb(&tc->aux, DP_MAX_DOWNSPREAD, tmp);
>  	if (ret < 0)
> @@ -637,9 +644,6 @@ static int tc_get_display_props(struct tc_data *tc)
>  err_dpcd_read:
>  	dev_err(tc->dev, "failed to read DPCD: %d\n", ret);
>  	return ret;
> -err_dpcd_inval:
> -	dev_err(tc->dev, "invalid DPCD\n");
> -	return -EINVAL;
>  }
>  
>  static int tc_set_video_mode(struct tc_data *tc, struct drm_display_mode *mode)

It looks like tc_get_display_props does more than its name suggests, ie
it gets display caps and matches with source caps, but this is little
bit different issue.

So:

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

 --
Regards
Andrzej

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

  reply	other threads:[~2017-11-06  7:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20171103170146epcas2p320108013d3b9c998fc97a7e705c73e15@epcas2p3.samsung.com>
2017-11-03 17:01 ` [PATCH v2 0/7] drm/bridge: tc358767: fixes and improvements (resend) Andrey Gusakov
2017-11-03 17:01   ` [PATCH v2 1/7] drm/bridge: tc358767: do no fail on hi-res displays Andrey Gusakov
2017-11-06  7:25     ` Andrzej Hajda [this message]
2017-11-03 17:01   ` [PATCH v2 2/7] drm/bridge: tc358767: filter out too high modes Andrey Gusakov
2017-11-06  7:50     ` Andrzej Hajda
2017-11-03 17:01   ` [PATCH v2 3/7] drm/bridge: tc358767: fix DP0_MISC register set Andrey Gusakov
2017-11-03 17:01   ` [PATCH v2 4/7] drm/bridge: tc358767: fix timing calculations Andrey Gusakov
2017-11-03 17:01   ` [PATCH v2 5/7] drm/bridge: tc358767: fix AUXDATAn registers access Andrey Gusakov
2017-11-03 17:01   ` [PATCH v2 6/7] drm/bridge: tc358767: fix 1-lane behavior Andrey Gusakov
2017-11-03 17:01   ` [PATCH v2 7/7] drm/bridge: tc358767: add copyright lines Andrey Gusakov
2017-11-06  7:58   ` [PATCH v2 0/7] drm/bridge: tc358767: fixes and improvements (resend) Andrzej Hajda
2017-11-07  4:41     ` Archit Taneja

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c33e39f9-d1f4-fc02-c93f-d07cd121684d@samsung.com \
    --to=a.hajda@samsung.com \
    --cc=andrey.gusakov@cogentembedded.com \
    --cc=cphealy@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).