mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
drm/bridge: dw-mipi-dsi: make lane byte clock cycles more accurate
Change-Id: Ic510ef14161fdd1aa5441220520df50bb371ade4 Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
This commit is contained in:
@@ -710,16 +710,16 @@ static u32 dw_mipi_dsi_get_hcomponent_lbcc(struct dw_mipi_dsi *dsi,
|
||||
const struct drm_display_mode *mode,
|
||||
u32 hcomponent)
|
||||
{
|
||||
u32 frac, lbcc;
|
||||
u32 lbcc;
|
||||
|
||||
lbcc = hcomponent * dsi->lane_mbps * MSEC_PER_SEC / 8;
|
||||
|
||||
frac = lbcc % mode->clock;
|
||||
lbcc = lbcc / mode->clock;
|
||||
if (frac)
|
||||
lbcc++;
|
||||
if (mode->clock == 0) {
|
||||
DRM_ERROR("dsi mode clock is 0!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return lbcc;
|
||||
return DIV_ROUND_CLOSEST_ULL(lbcc, mode->clock);
|
||||
}
|
||||
|
||||
static void dw_mipi_dsi_line_timer_config(struct dw_mipi_dsi *dsi,
|
||||
|
||||
Reference in New Issue
Block a user