OSDN Git Service

drm/msm/dsi: Calculate link clock rates with updated dsi->lanes
authorArchit Taneja <architt@codeaurora.org>
Wed, 12 Jul 2017 09:39:55 +0000 (15:09 +0530)
committerRob Clark <robdclark@gmail.com>
Tue, 1 Aug 2017 20:26:01 +0000 (16:26 -0400)
commitd4cea38ebb4de90913085391ce4febde1a4ba9aa
treeb1ccac246dcef4de7063bb1548e5929fa42bd1e8
parentaf1f5f12c21bd9dc08f578d86adc192eec4eb28a
drm/msm/dsi: Calculate link clock rates with updated dsi->lanes

After the commit mentioned below, we start computing the byte and pixel
clocks (dsi_calc_clk_rate) in the DSI bridge's mode_set() op. The
calculation involves the number of DSI lanes being used by the
downstream bridge/panel.

If the downstream bridge/panel tries to change the number of DSI lanes
(as done in the ADV7533 driver) in its mode_set() op, then our DSI
host driver will not have the correct number of lanes when computing
byte/pixel clocks.

Fix this by delaying the clock rate calculation in the DSI bridge
enable path. In particular, compute the clock rates in
msm_dsi_host_get_phy_clk_req().

This fixes the DSI host error interrupts seen when we try to switch
between modes that require different number of lanes (4 to 3 lanes, or
vice versa) on db410c. The error interrupts occur since the byte/pixel
clock rates aren't according to what the DSI video mode timing engine
expects.

Fixes: b62aa70a98c5 ("drm/msm/dsi: Move PHY operations out of host")
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/dsi/dsi_host.c