Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2554545rdb; Mon, 5 Feb 2024 09:59:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzs52eWfsz/02lUc11DCBGlxTIq3+2dar2M6qrl9+bpP0bNTDrVU7uqd9dISzG0Ed2Gze3 X-Received: by 2002:ad4:5881:0:b0:68c:a2c9:9a7 with SMTP id dz1-20020ad45881000000b0068ca2c909a7mr6347855qvb.13.1707155964751; Mon, 05 Feb 2024 09:59:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707155964; cv=pass; d=google.com; s=arc-20160816; b=YdO7cqH4g3HzjYrYWtj3sV8I+1S8mmbrVSW+/D/iCDe6Wg46N1nARIffiEvPv8S3/t eyDix4KgfU+HqPHg5w+mszig10JfYQOwabtDrk/St+qIvSdhKT5TjaKdbAvjAT4qFOZP ipzWNyCiLeuIS9XCVqSPruZUTXQySYUxhIsfcwWP6kbTqhnYITPKa+P7lpuZZOzMt5bk DXL7VVKVbqgKw7uBCwdTblncUdV8t4PUC4rXIitxEYe9keZ61qopV0wBJQxyIMKzgnso NKyR0aj9uYBwCrPXPt2a5USPAy1014i1eTSO2tpQT82Bhmhyef5vnigphH0oUWgXgyU6 TN4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=/C76pIYyE7acYLURd95YZ9JvqXFzoendTPcs1BJgd4E=; fh=SEd0pFfU/Q6qtFDdnHIfLLSNb2LbgIhLjF7mT+ehMDY=; b=tj8VEOSkd5b8+pfdTX5bpDnSKoGMsBrgA6MuiLdBHGeZh6n+8M9kQU2aHdbBSKZOd5 IPd6CAjDkp8VvLBIFUXb+6eTN+ab0RYeu85aBigfhQzO1WsgHrm12NlbrS9ErwDXb/iQ GATGttRD3Eg1AMitecU4eX5EtgGMa2FDqOHb773D4dRZ3hRYm1vp/zwIYF6LBNmlr8P9 xb9dhJXQ6CZMtcxeaQcU6AAYPTvcyVmYDAZVtxuGmky8o8g4A2Icok+xgpZ7Cr2mymp0 ap5GAdgZn+Wnl7uO7fPyK7dToUh+SHYqLnxT/oPr1k/l8FPRnVUnJORKINIgGlIO08F0 DYyg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WlysB1YJ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-53171-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53171-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=1; AJvYcCXywViuYjbvYZTB5c1U2c/TIksidT5j2wg1/ilPUYxTqmvume3GsBXYw8pGLogK4E4rLAZe161HagXKFcLumEbu3v+vGuunV2tnUR55aw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id df10-20020a056214080a00b0068c803790f9si402438qvb.264.2024.02.05.09.59.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 09:59:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-53171-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WlysB1YJ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-53171-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53171-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 740C01C22C5F for ; Mon, 5 Feb 2024 17:59:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C6424779E; Mon, 5 Feb 2024 17:59:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WlysB1YJ" Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9616547F59; Mon, 5 Feb 2024 17:59:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707155957; cv=none; b=sXur2vmJ7TNEXIChHErh77RSU0KRMTviX2APg8w1ijAb+J6V1NSF6b2JahwyPn3u59TDcPDvlpHrpDhs9nf45kiS20yprkGN86b9P1BfV9YVXEQM3lReFU/76fX0zdUB0RN3RU3Mw3FwF3rAfcAVTlOoDeFY9u8oZy4o7OhiXGA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707155957; c=relaxed/simple; bh=iENWrZku65hAa8Tz2gQfbHCsXLTOVZAomEQlg6Oanw4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CI/+ByrJB9FpPqRhDqx64BTaKT/TeQ0hlEkuRE10s4bQ9KGRVu8I5sE/7VNwOEnCq+YCwmMgeazJd5M6qE4HaXEEgbQE4v+E3yn1AqlAH//YBU03qbwRwE+chejtonP+cIivDk4HxLci1XplKeRhAQobtMKuGf5MTbN5VFBwXfY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WlysB1YJ; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-40fb94d42e4so37731075e9.2; Mon, 05 Feb 2024 09:59:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707155954; x=1707760754; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/C76pIYyE7acYLURd95YZ9JvqXFzoendTPcs1BJgd4E=; b=WlysB1YJ6g3tQgpifq8XHEEzk2AR/w3c2pDbbfk6+C/5aezUpazqq0GChlITvEC58l VWFDAJ1tU7fN8Wz4sWgh06hiO0I9jWjku4krxTdkutgbJRKofbkaz55NotlBejQx17P+ buOUGwg+mNhA5apNEDOlRPHF1M5wjGAmWdYUyVZ0GzhVOiqXTPS3lufuntb/XvwrsuPi 514+60jX6PPqPcLA8+Mxi0ihm09BdIuAZXd9cpVeCEJ3/VGVU3ftOjKdTiYeE3hPA3j0 aTPoBBT+L9SLWYysNS8GD3S3VAlcIYLOLdN5wE6adq8dVsOPmG2nN0lMsKgGodZilUWj NUhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707155954; x=1707760754; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/C76pIYyE7acYLURd95YZ9JvqXFzoendTPcs1BJgd4E=; b=ClpFqxKQnJV3N7ClvoN6t/01q4aWQhWUO+jhkVifANGy5+U0oKFoa8dL0gMyDHNLaw AIUW0VctWW2PXjVOYb4xNs/IuYdoLlsWVX/F3Uxn/6HcUiOybDBzVDS4XdWoYIF2k4AD ZlLwxfI3vDSfRd7MvDTeo9ZX+6UZVtMOj2vsrJcViQUUxGABy8tdtOrDKSD/zd5XyDy/ +nc7cz6X3ra7xvcO821W009sONZ34aSdP5whaZy6arQTdfjQd7/t7o/rd73vx5h0jAB4 zr21KkD7KHp6KcigIynFFxc31bcmsvE0ehUTkJXP331A9fYFOd+XWnlEkRTsyzvNmzLh LP3A== X-Gm-Message-State: AOJu0YymZdkmpV0jGx8ywr6CL5XTqH4IcclJ2MzfJ0LiBmeO7SLPgGSe 6138GBwOlx11zCe3aNOj3W9xzz5RaWA6W0HdEt04V3nNBat1nrAh X-Received: by 2002:a05:600c:1f84:b0:40f:b69e:aa20 with SMTP id je4-20020a05600c1f8400b0040fb69eaa20mr367170wmb.11.1707155953740; Mon, 05 Feb 2024 09:59:13 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXLGxFNA/76SPYxu2gToiQ41JQj1r64t0+xMs6T6ok0+J1kX7Lo3HRGsUqaghaMGWDQKL6PXq6NGNLqkkIL6fSH+q/R9n/7nX8t2HjGfS3xy3tDno+jNBpq3yhdlwMv0JwIiWGHs7pPMDmY3tppwuh007wlxUZZNFKoz77/2ORkHBIoHDnI/ufPPjYSKeEjDHiim+gWsQfvUDhYaX4z4mypzFDUcevPha6r2x7iWsfup6Oiqst2nvuH9rdJU+46xkyCnn4/ivUw8S9IVKnsMGJMg7qLChe9iXwNVF4SCU8JxeoTjvXi+r+Z7MWS7ud6I6MU3beXQxs2GYwHrSALeZRdfuLoAOymERlSPSMKGdcDcx94TlN6SAedrWcdATopdC7sw+tGASkr4zKKwBMRUJe1wqriolatAq9Krhbe2ZvlAVP8+Zy9nmXh5532Nn2rGu603uvVkCKmx1uBEh3bNT/W3C96U2wkhKAwy+zzb0/Hryn9kMrnc5Zde3M5KIM1PCxu3jMYbICJMCjqOU3GXYf/+aNklvlAAL7wlqEid1ZvQbER77q+Sl3cnYa2OWdgpqgT93pkXJ5ey7ataDjI4ghXTLkxxVsmaktCslsYlt9Ju6YQORWFaRAX9Z/+h/vH5qsTw8NvtUZlaj6372xbn8YDKQpN3d3WD4PqIgRvAa0bGxQ6j1r+SY0ebh56EgW/cmCqa02ZWncBwHOt/d33kTfrgMWYlRohrPyqeEHjhi/B1UjcLy/CNW+Bqv7keb9iJQ0cLjehkuUPyw== Received: from jernej-laptop.localnet (82-149-13-182.dynamic.telemach.net. [82.149.13.182]) by smtp.gmail.com with ESMTPSA id v8-20020a05600c444800b0040fddd8de88sm2013072wmn.15.2024.02.05.09.59.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 09:59:13 -0800 (PST) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Michael Turquette , Stephen Boyd , Chen-Yu Tsai , Samuel Holland , Guido =?ISO-8859-1?Q?G=FCnther?= , Purism Kernel Team , Ondrej Jirman , Neil Armstrong , Jessica Zhang , Sam Ravnborg , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Frank Oltmanns Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Frank Oltmanns Subject: Re: [PATCH v2 5/6] drm/panel: st7703: Drive XBD599 panel at higher clock rate Date: Mon, 05 Feb 2024 18:59:11 +0100 Message-ID: <13445659.uLZWGnKmhe@jernej-laptop> In-Reply-To: <20240205-pinephone-pll-fixes-v2-5-96a46a2d8c9b@oltmanns.dev> References: <20240205-pinephone-pll-fixes-v2-0-96a46a2d8c9b@oltmanns.dev> <20240205-pinephone-pll-fixes-v2-5-96a46a2d8c9b@oltmanns.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Dne ponedeljek, 05. februar 2024 ob 16:22:28 CET je Frank Oltmanns napisal(a): > This panel is used in the pinephone that runs on a Allwinner A64 SOC. > The SOC requires pll-mipi to run at more than 500 MHz. > > This is the relevant clock tree: > pll-mipi > tcon0 > tcon-data-clock > > tcon-data-clock has to run at 1/4 the DSI per-lane bit rate. The XBD599 > has 24 bpp and 4 lanes. Therefore, the resulting requested > tcon-data-clock rate is: > crtc_clock * 1000 * (24 / 4) / 4 > > tcon-data-clock runs at tcon0 / 4 (fixed divisor), so it requests a > parent rate of > 4 * (crtc_clock * 1000 * (24 / 4) / 4) > > Since tcon0 is a ccu_mux, the rate of tcon0 equals the rate of pll-mipi. > > pll-mipi's constraint to run at 500MHz or higher forces us to have a > crtc_clock >= 83333 kHz if we want a 60 Hz vertical refresh rate. > > Change [hv]sync_(start|end) so that we reach a clock rate of 83502 kHz > so that it is high enough to align with pll-pipi limits. Typo: pll-pipi -> pll-mipi Best regards, Jernej > > Signed-off-by: Frank Oltmanns > --- > drivers/gpu/drm/panel/panel-sitronix-st7703.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c > index b55bafd1a8be..6886fd7f765e 100644 > --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c > +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c > @@ -320,14 +320,14 @@ static int xbd599_init_sequence(struct st7703 *ctx) > > static const struct drm_display_mode xbd599_mode = { > .hdisplay = 720, > - .hsync_start = 720 + 40, > - .hsync_end = 720 + 40 + 40, > - .htotal = 720 + 40 + 40 + 40, > + .hsync_start = 720 + 65, > + .hsync_end = 720 + 65 + 65, > + .htotal = 720 + 65 + 65 + 65, > .vdisplay = 1440, > - .vsync_start = 1440 + 18, > - .vsync_end = 1440 + 18 + 10, > - .vtotal = 1440 + 18 + 10 + 17, > - .clock = 69000, > + .vsync_start = 1440 + 30, > + .vsync_end = 1440 + 30 + 22, > + .vtotal = 1440 + 30 + 22 + 29, > + .clock = (720 + 65 + 65 + 65) * (1440 + 30 + 22 + 29) * 60 / 1000, > .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, > .width_mm = 68, > .height_mm = 136, > >