From: Sasha Levin <sashal-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Sasha Levin <sashal-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Wesley Chalmers <Wesley.Chalmers-5C7GfCeVMHo@public.gmane.org>,
Anthony Koo <Anthony.Koo-5C7GfCeVMHo@public.gmane.org>,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>,
Bhawanpreet Lakha
<Bhawanpreet.Lakha-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH AUTOSEL 5.2 053/171] drm/amd/display: Update link rate from DPCD 10
Date: Thu, 18 Jul 2019 23:54:44 -0400 [thread overview]
Message-ID: <20190719035643.14300-53-sashal@kernel.org> (raw)
In-Reply-To: <20190719035643.14300-1-sashal-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
From: Wesley Chalmers <Wesley.Chalmers@amd.com>
[ Upstream commit 53c81fc7875bc2dca358485dac3999e14ec91a00 ]
[WHY]
Some panels return a link rate of 0 (unknown) in DPCD 0. In this case,
an appropriate mode cannot be set, and certain panels will show
corruption as they are forced to use a mode they do not support.
[HOW]
Read DPCD 10 in the case where supported link rate from DPCD 0 is
unknown, and pass that value on to the reported link rate.
This re-introduces behaviour present in previous versions that appears
to have been accidentally removed.
Signed-off-by: Wesley Chalmers <Wesley.Chalmers@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
index 1ee544a32ebb..253311864cdd 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@ -1624,8 +1624,7 @@ static bool decide_edp_link_settings(struct dc_link *link, struct dc_link_settin
uint32_t link_bw;
if (link->dpcd_caps.dpcd_rev.raw < DPCD_REV_14 ||
- link->dpcd_caps.edp_supported_link_rates_count == 0 ||
- link->dc->config.optimize_edp_link_rate == false) {
+ link->dpcd_caps.edp_supported_link_rates_count == 0) {
*link_setting = link->verified_link_cap;
return true;
}
@@ -2597,7 +2596,8 @@ void detect_edp_sink_caps(struct dc_link *link)
memset(supported_link_rates, 0, sizeof(supported_link_rates));
if (link->dpcd_caps.dpcd_rev.raw >= DPCD_REV_14 &&
- link->dc->config.optimize_edp_link_rate) {
+ (link->dc->config.optimize_edp_link_rate ||
+ link->reported_link_cap.link_rate == LINK_RATE_UNKNOWN)) {
// Read DPCD 00010h - 0001Fh 16 bytes at one shot
core_link_read_dpcd(link, DP_SUPPORTED_LINK_RATES,
supported_link_rates, sizeof(supported_link_rates));
@@ -2612,6 +2612,9 @@ void detect_edp_sink_caps(struct dc_link *link)
link_rate = linkRateInKHzToLinkRateMultiplier(link_rate_in_khz);
link->dpcd_caps.edp_supported_link_rates[link->dpcd_caps.edp_supported_link_rates_count] = link_rate;
link->dpcd_caps.edp_supported_link_rates_count++;
+
+ if (link->reported_link_cap.link_rate < link_rate)
+ link->reported_link_cap.link_rate = link_rate;
}
}
}
--
2.20.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2019-07-19 3:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190719035643.14300-1-sashal@kernel.org>
2019-07-19 3:54 ` [PATCH AUTOSEL 5.2 018/171] drm/amd/display: Fill prescale_params->scale for RGB565 Sasha Levin
2019-07-19 3:54 ` [PATCH AUTOSEL 5.2 022/171] drm/amd/display: Fill plane attrs only for valid pxl format Sasha Levin
2019-07-19 3:54 ` [PATCH AUTOSEL 5.2 023/171] drm/amdgpu: Reserve shared fence for eviction fence Sasha Levin
2019-07-19 3:54 ` [PATCH AUTOSEL 5.2 036/171] drm/amd/display: CS_TFM_1D only applied post EOTF Sasha Levin
[not found] ` <20190719035643.14300-1-sashal-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2019-07-19 3:54 ` [PATCH AUTOSEL 5.2 019/171] drm/amd/display: fix multi display seamless boot case Sasha Levin
2019-07-19 3:54 ` [PATCH AUTOSEL 5.2 021/171] drm/amd/display: Disable cursor when offscreen in negative direction Sasha Levin
2019-07-19 3:54 ` [PATCH AUTOSEL 5.2 025/171] drm/amdgpu/sriov: Need to initialize the HDP_NONSURFACE_BAStE Sasha Levin
2019-07-19 3:54 ` [PATCH AUTOSEL 5.2 026/171] drm/amd/display: Disable ABM before destroy ABM struct Sasha Levin
2019-07-19 3:54 ` [PATCH AUTOSEL 5.2 027/171] drm/amdkfd: Fix a potential memory leak Sasha Levin
2019-07-19 3:54 ` [PATCH AUTOSEL 5.2 028/171] drm/amdkfd: Fix sdma queue map issue Sasha Levin
2019-07-19 3:54 ` [PATCH AUTOSEL 5.2 035/171] drm/amd/display: Reset planes for color management changes Sasha Levin
2019-07-19 3:54 ` [PATCH AUTOSEL 5.2 037/171] drm/amd/display: Increase Backlight Gain Step Size Sasha Levin
2019-07-19 3:54 ` [PATCH AUTOSEL 5.2 052/171] drm/amd/display: Always allocate initial connector state state Sasha Levin
2019-07-19 3:54 ` Sasha Levin [this message]
2019-07-19 3:54 ` [PATCH AUTOSEL 5.2 055/171] drm/amd/display: set link->dongle_max_pix_clk to 0 on a disconnect Sasha Levin
2019-07-19 3:54 ` [PATCH AUTOSEL 5.2 057/171] drm/amd/display: fix compilation error Sasha Levin
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=20190719035643.14300-53-sashal@kernel.org \
--to=sashal-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=Anthony.Koo-5C7GfCeVMHo@public.gmane.org \
--cc=Bhawanpreet.Lakha-5C7GfCeVMHo@public.gmane.org \
--cc=Wesley.Chalmers-5C7GfCeVMHo@public.gmane.org \
--cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.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