From patchwork Tue May 30 07:38:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13259393 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 981B8C7EE23 for ; Tue, 30 May 2023 07:55:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zJv2vWbAt5FEaQ2f24OVzqdrjVvJFRKdMpN+5Xj5Ja0=; b=sKuh6yadB9J4GV TguHFC78JkMqWEiPJr6OKce6NAt6zSJgVQ6p5BR5IoirRYV2mCtx+CR9h9geCqp2vcxsdVT9v91qX lUi11mxOxb6L0O8170CbY0x1d2VfTvNg5wB0uZEKcG0RdI1v3bai8+Pl4j/PZI+g6RxhlxEcKa6EI HaTk+6Qsu55oEr19cwQjsGWV+CxuIQdJRdahz11IZe1GwfthlCodsu53sk+tmwun0r+Vo63hEj5aS xBqkvMxf8ZaOEhBelxPC1zEh0vZsF73+/MnZYdI1aqzkGCr3Gt4rFWOLcRlUEuui45k6N752Bd6/H qrWPiaCO6QnJIajOTTWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q3uC1-00Cp6j-0f; Tue, 30 May 2023 07:54:57 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q3uBk-00CoxH-33 for linux-arm-kernel@bombadil.infradead.org; Tue, 30 May 2023 07:54:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Cc:To:In-Reply-To:References:Message-Id :Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender :Reply-To:Content-ID:Content-Description; bh=YYg3fc69ScJ7fp+A0MjAsWU7xUehEqfWXj7B6hyn3hM=; b=v0YuwVTChA93uCJqVw5ztTHRWg J0jHKUV+gpFqWmkzxJfFGoQuIXSkQO0nkhdsMc4lE7yQDYNfLo5e4js3lo4/9CkN/kM5R/NrkPpU1 DVilNCGKGU5MtDe4nTwTH2F9yKsxdQlqQldMLgEtXi0/QogxhT9X9iI35/xx4qnoKsGMC122EQ8Qg XyLyjdTtrMYB/hqzln42v/XQeOOO6OjretXPvTmYyT37PWoYAdfXEI8YE8xqC/etKv0020bNFVoq9 88DB1J4G74FPJaWRtfmNx5u2w4/OumH06VRAm1tKljSBMvPtpomMc580KVOgVXSophj/ScvYkE9v6 oaq/Bz7g==; Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by casper.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1q3tw6-0064Ux-2Q for linux-arm-kernel@lists.infradead.org; Tue, 30 May 2023 07:38:34 +0000 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-30addbb1b14so2175073f8f.2 for ; Tue, 30 May 2023 00:38:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685432309; x=1688024309; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=YYg3fc69ScJ7fp+A0MjAsWU7xUehEqfWXj7B6hyn3hM=; b=JQ04iDdLMSAvRnw33ada0AcNyYSL1kQOGfFyhn38LnU4wNpARK7erpm/jOrY7x1tLF 059fkGG17a/oJfyafxgI01ct+6kb2OlEEkol2pmtSb6Z+/NcyZcOyNLhLKUOE7zfrK3U N92qonlieUJZjdqOZgsvOaZywmmOS9PjRcQbMGhJWnsH5rV6U2ffzJJZqWjNzFdFuYZr q+bb3z1lUADWFL3myXY5/fcSXTzNp6ubNdqAQiyLBaQcECl1y0XCFiRMuiyw9Ry6Mzpe cPu9fmNoa/wPIE2sj4ZyJWxHfh3GwKO0z8H3dP81ZaumKnEy75iIWyefh2QvFGSFEURu mqrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685432309; x=1688024309; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YYg3fc69ScJ7fp+A0MjAsWU7xUehEqfWXj7B6hyn3hM=; b=U2ocSh/lP71zfDyCZdruquz4NUnzmo476YWTS3JmAg4mG/FJLEEMiBrIdm/SRENIoZ Xrd4F6cAjyJoBFVH9N9IxmtBDuYSyxKjMRj292zFjxpAvaENz6yJrtrR41Vb1JpobFN9 HM1qDlqGHYU7Jnu5D15Ib08/RYCiQCFEmsv7zS1oyz+Z2VHW3ZKuZfHA48ZPrbuLQKOO xgFqDHX2l84QIWJhO1xBMa/AaZpHlIwMR+IDmTGcL1JRFM75od7LvW9y1SMerXQyZkde B45598UnzplxdV44jPU7/lnKijo5WEbqi59n7wvx3xd7W559ZMdjCVDC3FUlSeePE7Ga oTGQ== X-Gm-Message-State: AC+VfDyUwq+UrKaJOeWEndhAO93HTYSqCwojJoheUWwEyfPKfQviND0J K7CUN+mbXWvBsUYZqOM2AakSjA== X-Google-Smtp-Source: ACHHUZ6R3/5jCvzC/EfbuZ2wl9ps+H31Dyo4EwKtZB12YzdkTlX839WIivh9XGpn75rT6sT0OWR+Zg== X-Received: by 2002:a5d:5544:0:b0:30a:e86d:17a3 with SMTP id g4-20020a5d5544000000b0030ae86d17a3mr831595wrw.46.1685432308830; Tue, 30 May 2023 00:38:28 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id m4-20020a5d4a04000000b003079c402762sm2312013wrq.19.2023.05.30.00.38.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 May 2023 00:38:28 -0700 (PDT) From: Neil Armstrong Date: Tue, 30 May 2023 09:38:14 +0200 Subject: [PATCH v5 13/17] drm/panel: khadas-ts050: update timings to achieve 60Hz refresh rate MIME-Version: 1.0 Message-Id: <20230512-amlogic-v6-4-upstream-dsi-ccf-vim3-v5-13-56eb7a4d5b8e@linaro.org> References: <20230512-amlogic-v6-4-upstream-dsi-ccf-vim3-v5-0-56eb7a4d5b8e@linaro.org> In-Reply-To: <20230512-amlogic-v6-4-upstream-dsi-ccf-vim3-v5-0-56eb7a4d5b8e@linaro.org> To: Jerome Brunet , Michael Turquette , Stephen Boyd , Kevin Hilman , Martin Blumenstingl , Rob Herring , Krzysztof Kozlowski , Conor Dooley , David Airlie , Daniel Vetter , Philipp Zabel , Kishon Vijay Abraham I , Sam Ravnborg Cc: "Lukas F. Hartmann" , Nicolas Belin , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-phy@lists.infradead.org, Neil Armstrong X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1491; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=mst4lZ0rnXCLGGf7dowtnVBMlyjZYveMg1KB2R/Nmno=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBkdafiK1ejjQEfL6v/BkAEbC5WdiwOP7ROMvZsKoYw Bm0o05iJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZHWn4gAKCRB33NvayMhJ0TDqEA CLl6EorbfHvfwJvkIKiFIEFczCFvIK7+cAt6kXd+MZQMXkMsqn5qPI3QRmk1ZBh7lN3LDRxeDrMoVh aFNCHjmTsOZDWCdughiNifGjmHO72l6LnfjHZC34b6H+87IZJboWXpjoYqFoLYf0YjiPJh/Zbcfg1P UAS97hEdsPuCrQ7fR/PBtK2gtocZFFBhrASg4BvAo5janiHp/zBFZdiGtahO1mn9/NmbYwysvI0hkX /v+ZB9ya+Tp1HwvDvPv3nQbrr6dwbny/i+c2I5MORDsyEKxiNMx5IT8YlHDclQND99GPPeUUWRAmur afkVVauiVFDjNvftRtHg+5c8pSRPApTa8jJ+sRidFqfHuxfkEZ/L76QHULozYOseDrx776EgU2s1V7 hJrlpIxerxu8LLI0coEGyEdqkYxwiSlJJ9qgUCJrVu2ifLbFyk7+v9nTw3Y95dzeJvtbeSZG/b2lqx Cwx7FOIZ5xE9N5jmECgXAjFBJvU9TdVQU7NgSt9/y6MWVUBY2sP1JP+PfG2u/9SLBEBFelwpZsletR tefrmAF/JJdCOus8SXEBBcaUexGMqhxqQqyJV0jonRCk/IMnxaPyBGdy6aJ145a2NF1AwzGLeyuda9 N5w7eDepG4GrvedwFQN0epbFI86B/7lVlpf09pz2Q2vM1OdV30aAYfxpK4AA== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230530_083830_115396_3AD854AD X-CRM114-Status: GOOD ( 12.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This updates the panel timings to achieve a clean 60Hz refresh rate. Signed-off-by: Neil Armstrong Reviewed-by: Nicolas Belin Tested-by: Nicolas Belin # on Khadas VIM3 + TS050 Panel --- drivers/gpu/drm/panel/panel-khadas-ts050.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-khadas-ts050.c b/drivers/gpu/drm/panel/panel-khadas-ts050.c index 1ab1ebe30882..b942a0162274 100644 --- a/drivers/gpu/drm/panel/panel-khadas-ts050.c +++ b/drivers/gpu/drm/panel/panel-khadas-ts050.c @@ -568,7 +568,7 @@ static const struct khadas_ts050_panel_cmd init_code[] = { {0xfb, 0x01}, /* Select CMD1 */ {0xff, 0x00}, - {0xd3, 0x05}, /* RGBMIPICTRL: VSYNC back porch = 5 */ + {0xd3, 0x22}, /* RGBMIPICTRL: VSYNC back porch = 34 */ {0xd4, 0x04}, /* RGBMIPICTRL: VSYNC front porch = 4 */ }; @@ -717,15 +717,15 @@ static int khadas_ts050_panel_disable(struct drm_panel *panel) } static const struct drm_display_mode default_mode = { - .clock = 120000, - .hdisplay = 1088, - .hsync_start = 1088 + 104, - .hsync_end = 1088 + 104 + 4, - .htotal = 1088 + 104 + 4 + 127, + .clock = 160000, + .hdisplay = 1080, + .hsync_start = 1080 + 117, + .hsync_end = 1080 + 117 + 5, + .htotal = 1080 + 117 + 5 + 160, .vdisplay = 1920, .vsync_start = 1920 + 4, - .vsync_end = 1920 + 4 + 2, - .vtotal = 1920 + 4 + 2 + 3, + .vsync_end = 1920 + 4 + 3, + .vtotal = 1920 + 4 + 3 + 31, .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, };