aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandor Yu <Sandor.yu@nxp.com>2019-06-05 16:04:24 +0800
committerHeiko Stuebner <heiko@sntech.de>2019-06-14 13:53:07 +0200
commitde85ec271a864c05e99ad5ffbed9e95d1b65c757 (patch)
tree999a251de35d0b8bcdeb485136efccfe806e49a9
parentdrm/rockchip: dw_hdmi: add basic rk3228 support (diff)
downloadlinux-dev-de85ec271a864c05e99ad5ffbed9e95d1b65c757.tar.xz
linux-dev-de85ec271a864c05e99ad5ffbed9e95d1b65c757.zip
drm/rockchip: cdn-dp: correct rate in the struct drm_dp_link assignment
The value stored in the rate field of struct drm_dp_link should be the actual link-rate and not the bw_code. Right now the driver stores the code and converts it to the rate. So fixup the driver to store the rate itself. Signed-off-by: Sandor Yu <Sandor.yu@nxp.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20190605080424.28731-1-sandor.yu@nxp.com
-rw-r--r--drivers/gpu/drm/rockchip/cdn-dp-reg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/rockchip/cdn-dp-reg.c b/drivers/gpu/drm/rockchip/cdn-dp-reg.c
index 6c8b14fb1d2f..0a2aebecc151 100644
--- a/drivers/gpu/drm/rockchip/cdn-dp-reg.c
+++ b/drivers/gpu/drm/rockchip/cdn-dp-reg.c
@@ -543,7 +543,7 @@ static int cdn_dp_get_training_status(struct cdn_dp_device *dp)
if (ret)
goto err_get_training_status;
- dp->link.rate = status[0];
+ dp->link.rate = drm_dp_bw_code_to_link_rate(status[0]);
dp->link.num_lanes = status[1];
err_get_training_status:
@@ -647,7 +647,7 @@ int cdn_dp_config_video(struct cdn_dp_device *dp)
bit_per_pix = (video->color_fmt == YCBCR_4_2_2) ?
(video->color_depth * 2) : (video->color_depth * 3);
- link_rate = drm_dp_bw_code_to_link_rate(dp->link.rate) / 1000;
+ link_rate = dp->link.rate / 1000;
ret = cdn_dp_reg_write(dp, BND_HSYNC2VSYNC, VIF_BYPASS_INTERLACE);
if (ret)