aboutsummaryrefslogtreecommitdiff
path: root/src/soc/mediatek/common/include
diff options
context:
space:
mode:
authorYu-Ping Wu <yupingso@chromium.org>2020-02-11 18:33:57 +0800
committerPatrick Georgi <pgeorgi@google.com>2020-02-17 15:38:08 +0000
commit443fbd70495404a99a17be990518c237f3654227 (patch)
tree23c1ac2b90b0b41b16055ffcfd5ed3621bcf27de /src/soc/mediatek/common/include
parentfa36d0b79fb9fdc9747bb653398c1893eb7221c8 (diff)
soc/mediatek: dsi: Increase pcw precision
When configuring MIPI DSI Tx, the value of pcw was calculated from data rate in MHz, leading to loss of precision. This patch changes to use data rate in Hz for the calculation so that the resulting value should be consistent with the one in kernel (CL:1786327). In addition, change the type of data rate to u32, and calculation of data rate from pixel clock is changed to use DIV_ROUND_UP for consistency with kernel (CL:1761843). Also remove unused variable txdiv. BRANCH=kukui BUG=b:149051882 TEST=emerge-jacuzzi coreboot TEST=No scrolling issue on Juniper AUO and InnoLux panels Change-Id: I23220d446833b956431006027bbc8cb20fc696a5 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/38827 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/mediatek/common/include')
-rw-r--r--src/soc/mediatek/common/include/soc/dsi_common.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/soc/mediatek/common/include/soc/dsi_common.h b/src/soc/mediatek/common/include/soc/dsi_common.h
index 3052689c90..25727b8398 100644
--- a/src/soc/mediatek/common/include/soc/dsi_common.h
+++ b/src/soc/mediatek/common/include/soc/dsi_common.h
@@ -16,6 +16,7 @@
#ifndef SOC_MEDIATEK_DSI_COMMON_H
#define SOC_MEDIATEK_DSI_COMMON_H
+#include <commonlib/helpers.h>
#include <edid.h>
#include <types.h>
#include <soc/addressmap.h>
@@ -358,7 +359,7 @@ struct lcm_init_command {
/* Functions that each SOC should provide. */
void mtk_dsi_reset(void);
-void mtk_dsi_configure_mipi_tx(int data_rate, u32 lanes);
+void mtk_dsi_configure_mipi_tx(u32 data_rate, u32 lanes);
/* Functions as weak no-ops that can be overridden. */
void mtk_dsi_override_phy_timing(struct mtk_phy_timing *timing);