Commit 126847e2 authored by Ben Skeggs's avatar Ben Skeggs Committed by Greg Kroah-Hartman

drm/nouveau/disp/dp: respect sink limits when selecting failsafe link configuration

[ Upstream commit 13d03e9d ]

Where possible, we want the failsafe link configuration (one which won't
hang the OR during modeset because of not enough bandwidth for the mode)
to also be supported by the sink.

This prevents "link rate unsupported by sink" messages when link training
fails.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 99f61a90
...@@ -365,8 +365,15 @@ nvkm_dp_train(struct nvkm_dp *dp, u32 dataKBps) ...@@ -365,8 +365,15 @@ nvkm_dp_train(struct nvkm_dp *dp, u32 dataKBps)
* and it's better to have a failed modeset than that. * and it's better to have a failed modeset than that.
*/ */
for (cfg = nvkm_dp_rates; cfg->rate; cfg++) { for (cfg = nvkm_dp_rates; cfg->rate; cfg++) {
if (cfg->nr <= outp_nr && cfg->nr <= outp_bw) if (cfg->nr <= outp_nr && cfg->nr <= outp_bw) {
failsafe = cfg; /* Try to respect sink limits too when selecting
* lowest link configuration.
*/
if (!failsafe ||
(cfg->nr <= sink_nr && cfg->bw <= sink_bw))
failsafe = cfg;
}
if (failsafe && cfg[1].rate < dataKBps) if (failsafe && cfg[1].rate < dataKBps)
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment