When setting up the CM, CN and CO decimal values for DPHY PLL, these
values should only be rounded up when a "best_match" is requested. Some
DSI receivers requires the DSI clock to be exactly matched with the
pixel clock.
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com
if (numerator < 16 || numerator > 255)
return -EINVAL;
- numerator = DIV_ROUND_UP(numerator, denominator) * denominator;
+ if (best_match)
+ numerator = DIV_ROUND_UP(numerator, denominator) * denominator;
priv->divider.cn = 1;
if (denominator > 8) {