Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Sandor Yu and committed by
Heiko Stuebner
de85ec27 53ffa1ee

+2 -2
+2 -2
drivers/gpu/drm/rockchip/cdn-dp-reg.c
··· 543 543 if (ret) 544 544 goto err_get_training_status; 545 545 546 - dp->link.rate = status[0]; 546 + dp->link.rate = drm_dp_bw_code_to_link_rate(status[0]); 547 547 dp->link.num_lanes = status[1]; 548 548 549 549 err_get_training_status: ··· 647 647 bit_per_pix = (video->color_fmt == YCBCR_4_2_2) ? 648 648 (video->color_depth * 2) : (video->color_depth * 3); 649 649 650 - link_rate = drm_dp_bw_code_to_link_rate(dp->link.rate) / 1000; 650 + link_rate = dp->link.rate / 1000; 651 651 652 652 ret = cdn_dp_reg_write(dp, BND_HSYNC2VSYNC, VIF_BYPASS_INTERLACE); 653 653 if (ret)