diff options
author | Andrey Gusakov <andrey.gusakov@cogentembedded.com> | 2017-11-07 11:56:19 -0500 |
---|---|---|
committer | Andrzej Hajda <a.hajda@samsung.com> | 2017-11-30 01:55:17 -0500 |
commit | cffd2b16c01c3431a7a7dd62e722af33490fc436 (patch) | |
tree | 5306008ece5340f688266101a4a7c644569604ef | |
parent | dbb58bfd9ae6c885b2ca001a9a5ab8b881fb4ba9 (diff) |
drm/bridge: tc358767: do no fail on hi-res displays
Do not fail data rates higher than 2.7 and more than 2 lanes.
Try to fall back to 2.7Gbps and 2 lanes.
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1510073785-16108-2-git-send-email-andrey.gusakov@cogentembedded.com
-rw-r--r-- | drivers/gpu/drm/bridge/tc358767.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 8571cfd877c5..e1996dbfb0a1 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) | |||
603 | ret = drm_dp_link_probe(&tc->aux, &tc->link.base); | 603 | ret = drm_dp_link_probe(&tc->aux, &tc->link.base); |
604 | if (ret < 0) | 604 | if (ret < 0) |
605 | goto err_dpcd_read; | 605 | goto err_dpcd_read; |
606 | if ((tc->link.base.rate != 162000) && (tc->link.base.rate != 270000)) | 606 | if (tc->link.base.rate != 162000 && tc->link.base.rate != 270000) { |
607 | goto err_dpcd_inval; | 607 | dev_dbg(tc->dev, "Falling to 2.7 Gbps rate\n"); |
608 | tc->link.base.rate = 270000; | ||
609 | } | ||
610 | |||
611 | if (tc->link.base.num_lanes > 2) { | ||
612 | dev_dbg(tc->dev, "Falling to 2 lanes\n"); | ||
613 | tc->link.base.num_lanes = 2; | ||
614 | } | ||
608 | 615 | ||
609 | ret = drm_dp_dpcd_readb(&tc->aux, DP_MAX_DOWNSPREAD, tmp); | 616 | ret = drm_dp_dpcd_readb(&tc->aux, DP_MAX_DOWNSPREAD, tmp); |
610 | if (ret < 0) | 617 | if (ret < 0) |
@@ -637,9 +644,6 @@ static int tc_get_display_props(struct tc_data *tc) | |||
637 | err_dpcd_read: | 644 | err_dpcd_read: |
638 | dev_err(tc->dev, "failed to read DPCD: %d\n", ret); | 645 | dev_err(tc->dev, "failed to read DPCD: %d\n", ret); |
639 | return ret; | 646 | return ret; |
640 | err_dpcd_inval: | ||
641 | dev_err(tc->dev, "invalid DPCD\n"); | ||
642 | return -EINVAL; | ||
643 | } | 647 | } |
644 | 648 | ||
645 | static int tc_set_video_mode(struct tc_data *tc, struct drm_display_mode *mode) | 649 | static int tc_set_video_mode(struct tc_data *tc, struct drm_display_mode *mode) |