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: 151068 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5553911ljp; Wed, 14 Nov 2018 03:17:21 -0800 (PST) X-Google-Smtp-Source: AJdET5eFjzJiAgzpjKwebJseokSVo4bbHqPyspEIsZxsqaFP0vAfhtitHBXNO5d+FpC8jj5d2vVB X-Received: by 2002:a17:902:28e7:: with SMTP id f94-v6mr1477049plb.297.1542194241609; Wed, 14 Nov 2018 03:17:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542194241; cv=none; d=google.com; s=arc-20160816; b=lMt7pMG/DtHA51ROskZM9wfffeUV0cbFif7jW2jzQT5475O8lQjqELKm2Mj4BVfWC+ 3l9euWNFBALHN1ZJbzuwdUHmNBGnz7H//3TC4hKkPYCfY4LOsXjFnhYCFGhg2WyeUdIB QpKIGZanS4guHFjOSCZCkJTMpOCxLHhZ4UVVlDrsdYYIUZpumOCUWlb+IEdL8lohJdzT GrgfoQbtt5RL1PeXfwXEOo3CoXcUQZ9+Z8u4fId7gCSW3O7moIeRNxD9nGc3hjrCrSX9 kFTLrmsxCQboygg8xEt0GCBGUuroz0mxajb97eZSroJkFvj2xrvSKB40GuIujxKxrIv8 znLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:delivered-to; bh=1AeWNNYn7Y/yVIb2EAvmuV9QoorsqahbwpFiMS5pF7k=; b=MEfXlETUQ7TtRPCvF2arppkwq3Os90JSxkn0IgPLIsQRizDJ48mLJUQu72QpmTS8W8 Uxg3rlm+lQV0EsbvBnj28J6+f1wevTVx903qFY6/N0kCZNbtxao1gBiQKVeGWUzMbYqm tX8NI/Y8HhcISfvwCvQEuOWMZKzz83is2b0rRwK4Vw5U8K7dzjOBUZCXOy1G/kNoHtC3 me5PyzeqvNWL0xovWesOAHRUyub2XX9U44ohkoWj/OY27kW3NNfpK+sj4D8JeM51zt8x XBHxdOxUmC08REPLTzkL3bL/UuRBydCZ/kYNUkyINmTYEtpHUM/7u6rMr56kaVtzyohL Z2RQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id e21si22366583pgg.571.2018.11.14.03.17.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Nov 2018 03:17:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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-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" 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); }