drm/mediatek: fixed the calc method of data rate per lane
authorJitao Shi <jitao.shi@mediatek.com>
Wed, 16 Nov 2016 03:20:54 +0000 (11:20 +0800)
committerCK Hu <ck.hu@mediatek.com>
Thu, 24 Nov 2016 06:53:14 +0000 (14:53 +0800)
commitf6c872397028837c80685ee96c4011c62abe9a73
tree47927838d25847c3dee50bb8c420d760c70a7373
parent1ee6f347f81925fa8f3816e69ca1b49021f37850
drm/mediatek: fixed the calc method of data rate per lane

Tune dsi frame rate by pixel clock, dsi add some extra signal (i.e.
Tlpx, Ths-prepare, Ths-zero, Ths-trail,Ths-exit) when enter and exit LP
mode, those signals will cause h-time larger than normal and reduce FPS.
So need to multiply a coefficient to offset the extra signal's effect.
  coefficient = ((htotal*bpp/lane_number)+Tlpx+Ths_prep+Ths_zero+
 Ths_trail+Ths_exit)/(htotal*bpp/lane_number)

Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
drivers/gpu/drm/mediatek/mtk_dsi.c