From nobody Thu Sep 11 15:04:35 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 949B5C001DB for ; Fri, 4 Aug 2023 15:13:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230425AbjHDPNM (ORCPT ); Fri, 4 Aug 2023 11:13:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229726AbjHDPMs (ORCPT ); Fri, 4 Aug 2023 11:12:48 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7622649C1 for ; Fri, 4 Aug 2023 08:12:47 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPA id 7E16BFF802; Fri, 4 Aug 2023 15:12:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1691161964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=sVsvPzcZLc04k8Mm6Fe387YJusgHKs7kp3zgszuHqAA=; b=NbD5KjwDufaLxvHe0Ciehi2+EPqgpLicnDnl+PEqYwkZ6XBVbaVp9ZLRTdigY558uPrrvx acS4fzr5z/gxjW0qIJz0fvPvkzGwnAfelgL8MMGkchwUut+Xm9N0VDoIB/u20fRg42Jtq8 KgwzwP839x6UWNrDxn0hmRqEXvylgVUPkqmTHYtLsQn8iekoF5DSMqpXHKRGCXD3+hYJGx GxUMPrIkZdFR3fFsk8QDxqS7vvNRzuOBxskNpaIF50kZQ+4tTZNTKcaJfupAlMvjoJR+M/ ZkDTcSA8+F3fZtk2rvUfHY27sKG5Iu5frwKfgZFxbItqMAR9PY22ruck3+BfXg== From: Luca Ceresoli To: dri-devel@lists.freedesktop.org Cc: Luca Ceresoli , Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Sebastian Reichel , linux-kernel@vger.kernel.org, Thomas Petazzoni , Paul Kocialkowski Subject: [PATCH] drm/panel: simple: Fix AUO G121EAN01 panel timings according to the docs Date: Fri, 4 Aug 2023 17:12:39 +0200 Message-Id: <20230804151239.835216-1-luca.ceresoli@bootlin.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: luca.ceresoli@bootlin.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 pa= nel") Signed-off-by: Luca Ceresoli Reviewed-by: Neil Armstrong --- 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/p= anel-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 =3D { .connector_type =3D DRM_MODE_CONNECTOR_LVDS, }; =20 -static const struct drm_display_mode auo_g121ean01_mode =3D { - .clock =3D 66700, - .hdisplay =3D 1280, - .hsync_start =3D 1280 + 58, - .hsync_end =3D 1280 + 58 + 8, - .htotal =3D 1280 + 58 + 8 + 70, - .vdisplay =3D 800, - .vsync_start =3D 800 + 6, - .vsync_end =3D 800 + 6 + 4, - .vtotal =3D 800 + 6 + 4 + 10, +static const struct display_timing auo_g121ean01_timing =3D { + .pixelclock =3D { 60000000, 74400000, 90000000 }, + .hactive =3D { 1280, 1280, 1280 }, + .hfront_porch =3D { 20, 50, 100 }, + .hback_porch =3D { 20, 50, 100 }, + .hsync_len =3D { 30, 100, 200 }, + .vactive =3D { 800, 800, 800 }, + .vfront_porch =3D { 2, 10, 25 }, + .vback_porch =3D { 2, 10, 25 }, + .vsync_len =3D { 4, 18, 50 }, }; =20 static const struct panel_desc auo_g121ean01 =3D { - .modes =3D &auo_g121ean01_mode, - .num_modes =3D 1, + .timings =3D &auo_g121ean01_timing, + .num_timings =3D 1, .bpc =3D 8, .size =3D { .width =3D 261, --=20 2.34.1