linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ykk@rock-chips.com (Yakir Yang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v11 03/19] drm: bridge: analogix/dp: remove duplicate configuration of link rate and link count
Date: Wed, 23 Dec 2015 08:49:34 +0800	[thread overview]
Message-ID: <5679EF9E.30703@rock-chips.com> (raw)
In-Reply-To: <000701d13cb1$a3d5f0c0$eb81d240$@com>

Hi Jingoo,

Thanks for your respond.

On 12/22/2015 08:09 PM, Jingoo Han wrote:
> On Wednesday, December 16, 2015 12:28 PM, Yakir Yang wrote:
>> link_rate and lane_count already configured in analogix_dp_set_link_train(),
>> so we don't need to config those repeatly after training finished, just
>> remove them out.
>>
>> Beside Display Port 1.2 already support 5.4Gbps link rate, the maximum sets
>> would change from {1.62Gbps, 2.7Gbps} to {1.62Gbps, 2.7Gbps, 5.4Gbps}.
>>
>> Signed-off-by: Yakir Yang <ykk@rock-chips.com>
>> Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
>> ---
>> Changes in v11: None
>> Changes in v10: None
>> Changes in v9: None
>> Changes in v8: None
>> Changes in v7: None
>> Changes in v6: None
>> Changes in v5: None
>> Changes in v4:
>> - Update commit message more readable. (Jingoo)
>> - Adjust the order from 05 to 04
>>
>> Changes in v3:
>> - The link_rate and lane_count shouldn't config to the DT property value
>>    directly, but we can take those as hardware limite. For example, RK3288
>>    only support 4 physical lanes of 2.7/1.62 Gbps/lane, so DT property would
>>    like "link-rate = 0x0a" "lane-count = 4". (Thierry)
>>
>> Changes in v2: None
>>
>>   drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 8 ++++----
>>   drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 5 +++--
>>   2 files changed, 7 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
>> b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
>> index 4a05c2b..6f899cd 100644
>> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
>> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
>> @@ -624,6 +624,8 @@ static void analogix_dp_get_max_rx_bandwidth(struct analogix_dp_device *dp,
>>   	/*
>>   	 * For DP rev.1.1, Maximum link rate of Main Link lanes
>>   	 * 0x06 = 1.62 Gbps, 0x0a = 2.7 Gbps
>> +	 * For DP rev.1.2, Maximum link rate of Main Link lanes
>> +	 * 0x06 = 1.62 Gbps, 0x0a = 2.7 Gbps, 0x14 = 5.4Gbps
>>   	 */
>>   	analogix_dp_read_byte_from_dpcd(dp, DP_MAX_LINK_RATE, &data);
>>   	*bandwidth = data;
>> @@ -657,7 +659,8 @@ static void analogix_dp_init_training(struct analogix_dp_device *dp,
>>   	analogix_dp_get_max_rx_lane_count(dp, &dp->link_train.lane_count);
>>
>>   	if ((dp->link_train.link_rate != LINK_RATE_1_62GBPS) &&
>> -	    (dp->link_train.link_rate != LINK_RATE_2_70GBPS)) {
>> +	    (dp->link_train.link_rate != LINK_RATE_2_70GBPS) &&
>> +	    (dp->link_train.link_rate != LINK_RATE_5_40GBPS)) {
>>   		dev_err(dp->dev, "Rx Max Link Rate is abnormal :%x !\n",
>>   			dp->link_train.link_rate);
>>   		dp->link_train.link_rate = LINK_RATE_1_62GBPS;
>> @@ -898,9 +901,6 @@ static void analogix_dp_commit(struct analogix_dp_device *dp)
>>   	analogix_dp_enable_rx_to_enhanced_mode(dp, 1);
>>   	analogix_dp_enable_enhanced_mode(dp, 1);
>>
>> -	analogix_dp_set_lane_count(dp, dp->video_info->lane_count);
>> -	analogix_dp_set_link_bandwidth(dp, dp->video_info->link_rate);
>> -
>>   	analogix_dp_init_video(dp);
>>   	ret = analogix_dp_config_video(dp);
>>   	if (ret)
>> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
>> b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
>> index 8e84208..57aa4b0d 100644
>> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
>> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
>> @@ -21,8 +21,9 @@
>>   #define MAX_EQ_LOOP			5
>>
>>   enum link_rate_type {
>> -	LINK_RATE_1_62GBPS = 0x06,
>> -	LINK_RATE_2_70GBPS = 0x0a
>> +	LINK_RATE_1_62GBPS = DP_LINK_BW_1_62,
>> +	LINK_RATE_2_70GBPS = DP_LINK_BW_2_7,
>> +	LINK_RATE_5_40GBPS = DP_LINK_BW_5_4,
> Then, how about removing 'enum link_rate_type'?
> If DP_LINK_BW_* are used, LINK_RATE_* are not necessary.

Sure, good catch.

Thanks,
- Yakir

> Best regards,
> Jingoo Han
>
>
>>   };
>>
>>   enum link_lane_count_type {
>> --
>> 1.9.1
>
>
>
>

  reply	other threads:[~2015-12-23  0:49 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-16  3:20 [PATCH v11 0/19] Add Analogix Core Display Port Driver Yakir Yang
2015-12-16  3:26 ` [PATCH v11 02/19] drm: bridge: analogix/dp: fix some obvious code style Yakir Yang
2015-12-22 12:05   ` Jingoo Han
2015-12-23  0:50     ` Yakir Yang
2015-12-16  3:28 ` [PATCH v11 03/19] drm: bridge: analogix/dp: remove duplicate configuration of link rate and link count Yakir Yang
2015-12-22 12:09   ` Jingoo Han
2015-12-23  0:49     ` Yakir Yang [this message]
2015-12-16  3:30 ` [PATCH v11 04/19] drm: bridge: analogix/dp: dynamic parse sync_pol & interlace & dynamic_range Yakir Yang
2015-12-16  3:32 ` [PATCH v11 05/19] dt-bindings: add document for analogix display port driver Yakir Yang
2015-12-16  3:34 ` [PATCH v11 06/19] ARM: dts: exynos/dp: remove some properties that deprecated by analogix_dp driver Yakir Yang
2015-12-22 12:13   ` Jingoo Han
2015-12-23  0:47     ` Yakir Yang
2015-12-16  3:36 ` [PATCH v11 07/19] drm: rockchip: dp: add rockchip platform dp driver Yakir Yang
2015-12-16  3:38 ` [PATCH v11 08/19] dt-bindings: add document for rockchip variant of analogix_dp Yakir Yang
2015-12-16  3:40 ` [PATCH v11 09/19] phy: Add driver for rockchip Display Port PHY Yakir Yang
2015-12-22 12:20   ` Jingoo Han
2015-12-23  0:46     ` Yakir Yang
2015-12-16  3:43 ` [PATCH v11 10/19] dt-bindings: add document for rockchip dp phy Yakir Yang
2015-12-16  3:45 ` [PATCH v11 11/19] drm: rockchip: vop: add bpc and color mode setting Yakir Yang
2015-12-16  3:47 ` [PATCH v11 12/19] drm: bridge: analogix/dp: add some rk3288 special registers setting Yakir Yang
2015-12-16  3:49 ` [PATCH v11 13/19] drm: bridge: analogix/dp: add max link rate and lane count limit for RK3288 Yakir Yang
2015-12-16  3:51 ` [PATCH v11 14/19] drm: bridge: analogix/dp: try force hpd after plug in lookup failed Yakir Yang
2015-12-16  3:53 ` [PATCH v11 15/19] drm: bridge: analogix/dp: move hpd detect to connector detect function Yakir Yang
2015-12-16  3:55 ` [PATCH v11 16/19] drm: bridge: analogix/dp: add edid modes parse in get_modes method Yakir Yang
2015-12-16  3:57 ` [PATCH v11 17/19] drm: bridge: analogix/dp: expand the look time for waiting AUX CH reply Yakir Yang
2015-12-22 12:26   ` Jingoo Han
2015-12-23  4:24     ` Yakir Yang
2015-12-23  6:00       ` Yakir Yang
2015-12-23 15:15         ` Jingoo Han
2015-12-16  3:59 ` [PATCH v11 18/19] drm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resume time Yakir Yang
2015-12-16  4:01 ` [PATCH v11 19/19] drm: bridge: analogix/dp: Fix the possible dead lock in bridge disable time Yakir Yang
2015-12-17 23:51 ` [PATCH v11 0/19] Add Analogix Core Display Port Driver Heiko Stübner
2015-12-18  0:38   ` Yakir Yang

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=5679EF9E.30703@rock-chips.com \
    --to=ykk@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.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).