Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2563263rdg; Mon, 14 Aug 2023 06:38:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGUiW4QVkJRijU6M3rW35cjqimJuMSajyRFyekHfWS/Q28sC2WZlE4l/KQZmls1Jna3W8GT X-Received: by 2002:a05:6808:1295:b0:3a7:6385:28ac with SMTP id a21-20020a056808129500b003a7638528acmr11417049oiw.4.1692020304501; Mon, 14 Aug 2023 06:38:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692020304; cv=none; d=google.com; s=arc-20160816; b=mR1D3fmY6LKMnPmWGFYIQAWyQgOkMFuKJf7k/GoNtDV9bIebyGXhp77rDSCQSezFtt xBzJZ7TlbihGa60qXuk30DZPgX6h+2pt56yUPpyqwKEIJQP2/QGq3ITV5gv6fCB1H8NQ tutHkY4xbHoXD1rcj6uDqjNDtxALZoJuKvGSAQK3Tot36nNBuALRRfMM/QkBxNT3TSaE M7QVJhymkVHD4bxVmIPt07r+HEOyPxy6ID8ST2y4Z7+pbEGfZ1tjRLNpNs0gICdfIGZd RdCzTjqXxBvp1A9pICE+61wz4Hqf4EuhDCQt2/GoR1QIIrxFrUm0cp4e4F7WTvhejy0w I9cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:autocrypt:content-language:references:cc:to:subject :reply-to:from:user-agent:mime-version:date:message-id :dkim-signature; bh=TlIvr0fkgWj9OH257CwsuYbd1YZEKyLG860533ceSYA=; fh=Y7Zc97Z64Hqc1fmh3RXr+g4i0gv17BWqEKhCITO0/t8=; b=eo8CYGErZLDBfWyrBzfypBLiwGBmgId8L5Fdp1vOF3mYTJDIox4Z0YOEx+AQ4o7qRh 0suTCBAeq/Se5sU4kNJC7vkQTaWVMP5VI3MOm1ubFuLqJYZh0H4563JHjTjDhGtXvcAp VEf4leOJS9v4yqVA/LPCQqaAfIAKTbaxcE+vKDym8lCptY2Uz7vwFKsWZis3JbvADA0R WT3wtw3cAwbV5wxI9MqBVclLdy1ZLJVuK0BQjoBicSx1jixJnGHvD0VVsCfAtM7HOybt GVE9kvkEy20RzqgjUZjVZqqEQUMvpkLIraHjT8tUI2UUo4KCSjmobb3oSZHwqOXjapDT gk8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KWpnHkUG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l29-20020a63701d000000b005644828d510si8050797pgc.670.2023.08.14.06.38.12; Mon, 14 Aug 2023 06:38:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KWpnHkUG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229715AbjHNMhe (ORCPT + 99 others); Mon, 14 Aug 2023 08:37:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229763AbjHNMhK (ORCPT ); Mon, 14 Aug 2023 08:37:10 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7C87E52 for ; Mon, 14 Aug 2023 05:37:08 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3fbd33a57b6so42863525e9.2 for ; Mon, 14 Aug 2023 05:37:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692016627; x=1692621427; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=TlIvr0fkgWj9OH257CwsuYbd1YZEKyLG860533ceSYA=; b=KWpnHkUGIjX/ReVnPDLgqaJ3BXFhG8B9m+jVtQzG5WOj+0jzaUW6VvUmafIBrS98J5 hWlZVHb//Rgu3vR/vIR62pSEOXY4ndfKUVWlAYEuYdA7BrMElTuoKgmgOrHBwTBTv1Un 0VV4DEFssVE/kDCHHz6wShmLCmKZK4679Equx7/vI4B6k6FCaSiO1NX+jhFGDmjyb5Lh Q2kAbUdeaQG217j6P2UaVND54x6A0KgnFin8vBv5s8w3xEhl5TdWvd5WlQXs7cGyS0/e i2CWa25bq60RNac59LxHBmxtAjBpaVINP2z0gdIHgh3N/xD2dGzSDfEmZYr4K/6W2eCT /Y/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692016627; x=1692621427; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=TlIvr0fkgWj9OH257CwsuYbd1YZEKyLG860533ceSYA=; b=kBbs6cg+SDnA3tQjA4W1vIAXB+Hbbh7z5U9ipLh9k0NwSr5gGcGK3f+9yxQ5W2l0xz DUM4eQzDtIbMW0W0jErpnQF+14X6ihhErAJtenxUevXpeYQzhYDptvmalr6WNFcim8To HmjIc431+p08VdnuWY5nrnh83PUiypMUoRfx5BOAr310M1feEZUk7pP8yjgKc0ExTmR6 /v0I8F56g+rfYn2uMa0TQHbzJUQzoc2ZOOGZVSj+qxxv0NMzNIS1DJs5ic+ya8QFRkC3 G2faohpzdntXsyUR2cderrPY3OdePNgxKuN6yn9rGaMiR6r+xL04P6X0FNLZC+W6pxeu 0FXA== X-Gm-Message-State: AOJu0YzlTnZH+zf8ZwCAVBXTpFE9xVZTCQZ6LP4UocYvZHK6344SlS/Z 7/ItPnR5748MsW+UCGsFp2Xl7g== X-Received: by 2002:a7b:c7ca:0:b0:3fe:1b67:db7e with SMTP id z10-20020a7bc7ca000000b003fe1b67db7emr7925038wmk.18.1692016627285; Mon, 14 Aug 2023 05:37:07 -0700 (PDT) Received: from ?IPV6:2a01:e0a:982:cbb0:a3d8:b217:d82c:9bc0? ([2a01:e0a:982:cbb0:a3d8:b217:d82c:9bc0]) by smtp.gmail.com with ESMTPSA id y9-20020a7bcd89000000b003fba6a0c881sm17088850wmj.43.2023.08.14.05.37.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Aug 2023 05:37:06 -0700 (PDT) Message-ID: <7047fbf4-fe47-4f4b-8129-8ad25eddf350@linaro.org> Date: Mon, 14 Aug 2023 14:37:05 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Neil Armstrong Reply-To: neil.armstrong@linaro.org Subject: Re: [PATCH] drm/panel: simple: Fix AUO G121EAN01 panel timings according to the docs To: Luca Ceresoli , dri-devel@lists.freedesktop.org Cc: Sam Ravnborg , David Airlie , Daniel Vetter , Sebastian Reichel , linux-kernel@vger.kernel.org, Thomas Petazzoni , Paul Kocialkowski References: <20230804151239.835216-1-luca.ceresoli@bootlin.com> Content-Language: en-US Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi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L4oHcsGtUX oUk33HEAEQEAAcLAXwQYAQIACQUCTVkGzwIbDAAKCRAWmrexpM/4rrXiB/sGbkQ6itMrAIfn M7IbRuiSZS1unlySUVYu3SD6YBYnNi3G5EpbwfBNuT3H8//rVvtOFK4OD8cRYkxXRQmTvqa3 3eDIHu/zr1HMKErm+2SD6PO9umRef8V82o2oaCLvf4WeIssFjwB0b6a12opuRP7yo3E3gTCS KmbUuLv1CtxKQF+fUV1cVaTPMyT25Od+RC1K+iOR0F54oUJvJeq7fUzbn/KdlhA8XPGzwGRy 4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro Developer Services In-Reply-To: <20230804151239.835216-1-luca.ceresoli@bootlin.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/08/2023 17:12, Luca Ceresoli wrote: > Commit 03e909acd95a ("drm/panel: simple: Add support for AUO G121EAN01.4 > panel") added support for this panel model, but the timings it implements > are very different from what the datasheet describes. I checked both the > G121EAN01.0 datasheet from [0] and the G121EAN01.4 one from [1] and they > all have the same timings: for example the LVDS clock typical value is 74.4 > MHz, not 66.7 MHz as implemented. > > Replace the timings with the ones from the documentation. These timings > have been tested and the clock frequencies verified with an oscilloscope to > ensure they are correct. > > Also use struct display_timing instead of struct drm_display_mode in order > to also specify the minimum and maximum values. > > [0] https://embedded.avnet.com/product/g121ean01-0/ > [1] https://embedded.avnet.com/product/g121ean01-4/ > > Fixes: 03e909acd95a ("drm/panel: simple: Add support for AUO G121EAN01.4 panel") > Signed-off-by: Luca Ceresoli > --- > drivers/gpu/drm/panel/panel-simple.c | 24 ++++++++++++------------ > 1 file changed, 12 insertions(+), 12 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c > index 701013b3ad13..56854f78441e 100644 > --- a/drivers/gpu/drm/panel/panel-simple.c > +++ b/drivers/gpu/drm/panel/panel-simple.c > @@ -999,21 +999,21 @@ static const struct panel_desc auo_g104sn02 = { > .connector_type = DRM_MODE_CONNECTOR_LVDS, > }; > > -static const struct drm_display_mode auo_g121ean01_mode = { > - .clock = 66700, > - .hdisplay = 1280, > - .hsync_start = 1280 + 58, > - .hsync_end = 1280 + 58 + 8, > - .htotal = 1280 + 58 + 8 + 70, > - .vdisplay = 800, > - .vsync_start = 800 + 6, > - .vsync_end = 800 + 6 + 4, > - .vtotal = 800 + 6 + 4 + 10, > +static const struct display_timing auo_g121ean01_timing = { > + .pixelclock = { 60000000, 74400000, 90000000 }, > + .hactive = { 1280, 1280, 1280 }, > + .hfront_porch = { 20, 50, 100 }, > + .hback_porch = { 20, 50, 100 }, > + .hsync_len = { 30, 100, 200 }, > + .vactive = { 800, 800, 800 }, > + .vfront_porch = { 2, 10, 25 }, > + .vback_porch = { 2, 10, 25 }, > + .vsync_len = { 4, 18, 50 }, > }; > > static const struct panel_desc auo_g121ean01 = { > - .modes = &auo_g121ean01_mode, > - .num_modes = 1, > + .timings = &auo_g121ean01_timing, > + .num_timings = 1, > .bpc = 8, > .size = { > .width = 261, Reviewed-by: Neil Armstrong