From patchwork Wed Nov 14 11:17:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 10682365 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B087614E2 for ; Wed, 14 Nov 2018 11:17:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9BA982AE77 for ; Wed, 14 Nov 2018 11:17:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D1DB2B3FE; Wed, 14 Nov 2018 11:17:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F37712AE77 for ; Wed, 14 Nov 2018 11:17:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2B0076E27B; Wed, 14 Nov 2018 11:17:20 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4F2BC6E27B for ; Wed, 14 Nov 2018 11:17:18 +0000 (UTC) Received: by mail-lf1-x144.google.com with SMTP id i26so11228691lfc.0 for ; Wed, 14 Nov 2018 03:17:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qoWH9UWholrHyVcwi/5q1mOLucAk45ADQus+USXe2O4=; b=JtRbByAgfftgPyNv54OCaYppLA+wpo5dHeGk+Ila/IyS6zQ24w32QRobVgebIQnPTk NpLfSAvZ4g7JT/Ke5gwVukwU584gZseU5mGmYcx/HVN2/vwPaF+PweS/LyxipDWImkkf n9DCoeolNhHeV6q+7/77QrtjXF1sYi+hdqhmOvfV7k+1M6u+v538nEn6qrOgQGZiB1XJ GAjLwbnywsebeIawrrN3LfPOs3IKakwnm3ZIu5263EauKD+sfz5LLCuorVe73TT3aG76 xYEW9DMHGKi8yCcJA7Yk5UwPxnFF4zPp74OGsZlfwdfgicUllKjoZ/MN9PUUfYrFQlaV 2LDQ== X-Gm-Message-State: AGRZ1gIwgfAO1TZmVZV/ufqEzJn6HdEO+4cjnkvD2yWf/Zykkx5SEm3y 0PeNvJ4AI09Ce+bWUA3+4HY5iw2NO6eWfA== X-Google-Smtp-Source: AJdET5eX3Av7MVcKA3bNixYj3PE24UbXi2SNFGjLRa76WfgQwSJmXr6iEazy4pU4bVQ2GDM4BOEsEw== X-Received: by 2002:a19:4402:: with SMTP id r2mr754732lfa.111.1542194236607; Wed, 14 Nov 2018 03:17:16 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id 11sm3809751lfq.89.2018.11.14.03.17.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Nov 2018 03:17:15 -0800 (PST) From: Linus Walleij To: Thierry Reding , dri-devel@lists.freedesktop.org Subject: [PATCH] drm/panel: Set max rate for Ilitek ILI9881C Date: Wed, 14 Nov 2018 12:17:11 +0100 Message-Id: <20181114111711.27367-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.2 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Ripard , Daniel Vetter MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP After adding the hs_rate and lp_rate fields to the DSI device we need to populate these accordingly so display drivers can respect them. This figure for HS rate comes from the ILI9881C manual, the calculation is explained in the comment. Cc: Daniel Vetter Cc: Andrzej Hajda Cc: Maxime Ripard Signed-off-by: Linus Walleij Acked-by: Maxime Ripard --- drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c index 3ad4a46c4e94..f58250f84f8c 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c @@ -465,6 +465,13 @@ static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi) dsi->mode_flags = MIPI_DSI_MODE_VIDEO_SYNC_PULSE; dsi->format = MIPI_DSI_FMT_RGB888; dsi->lanes = 4; + /* + * The datasheet (table 39) specifies "limited clock channel speed" + * for 4 lanes as 550 Mbps for RGB888. As this is 4 bits at the time, + * the maximum HS frequency is 550/4 = 137.5 MHz. + */ + dsi->hs_rate = 137500000; + /* FIXME: LP max rate does not seem to be specified */ return mipi_dsi_attach(dsi); }