Thread (24 messages) 24 messages, 4 authors, 2016-12-05

[PATCH v10 09/13] drm/mediatek: add mipi_tx data rate check

From: CK Hu <hidden>
Date: 2016-11-30 11:05:25
Also in: dri-devel, linux-mediatek, lkml

Hi, YT:


On Fri, 2016-11-25 at 18:34 +0800, YT Shen wrote:
modify data rate limitation (>lGbps/lane) for mipitx
I think MT2701 DRM can work correctly without this patch.
Why do you put this patch in MT2701 series?
Maybe you can send this patch independently.

Regards,
CK
quoted hunk ↗ jump to hunk
Signed-off-by: shaoming chen <redacted>
Signed-off-by: YT Shen <redacted>
---
 drivers/gpu/drm/mediatek/mtk_mipi_tx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_mipi_tx.c b/drivers/gpu/drm/mediatek/mtk_mipi_tx.c
index fd84914..1ef00ac 100644
--- a/drivers/gpu/drm/mediatek/mtk_mipi_tx.c
+++ b/drivers/gpu/drm/mediatek/mtk_mipi_tx.c
@@ -177,7 +177,9 @@ static int mtk_mipi_tx_pll_prepare(struct clk_hw *hw)
 
 	dev_dbg(mipi_tx->dev, "prepare: %u Hz\n", mipi_tx->data_rate);
 
-	if (mipi_tx->data_rate >= 500000000) {
+	if (mipi_tx->data_rate > 1250000000) {
+		return -EINVAL;
+	} else if (mipi_tx->data_rate >= 500000000) {
 		txdiv = 1;
 		txdiv0 = 0;
 		txdiv1 = 0;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help