Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp514319rdb; Thu, 2 Nov 2023 09:54:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGtSiDk2N4mEGQq7REYpFKtMuMGG3IRw1RwgXU5pvvfBmDcKznxF+3qO/4zyKkAKdTz2vep X-Received: by 2002:a17:903:22c3:b0:1cc:478c:2f32 with SMTP id y3-20020a17090322c300b001cc478c2f32mr13223094plg.0.1698944079935; Thu, 02 Nov 2023 09:54:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698944079; cv=none; d=google.com; s=arc-20160816; b=Kux7998lUM7LsJBsDH64FzuxBpMg8MIZKuE3CDeqTwQZSfQFPJbUT4zVoKgzJWUBJJ sbcgY3vFFgYPyBm8Vj5vPNt1qKrdg3w0aBODRT8+ZVTQBjSbnUoAbSA5m16eaiv6kg8F Z75Dnox7xbwRbloihoo0wdyrHIv/RzVv7HR6Y+f3xrq2fHPJecZgM89p6JzOQ48FAxSj 6XxDc6KhZCjpHdQWDXBxjlRhiw1Cq4krSceAOU7AtcE3n4A/hq+FYYJmbPPMGg3yDWJM 3H5CKX/xx48Br1hYUToEKPGhr330M+v+4Jtcdy1dxgxkAMQG3je3aZi6FNuqm9q7cq0H Zv7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=H1LGxmWcx02Jh03WOgomaovWxeWfiplOkjhYrTDh8XI=; fh=qZrehyY6pGoaVCnv+maK9kSU1l8t0TXDpKkLqbKti0g=; b=Ewhu0UsgFBsoo3gvCSoI5ojznbZtMLMvAjFyC9mHIcnxJzaJIw6h3hAnProSRURCW1 nW11/8sWd97yID6tAbpAMHQIlxG61pSOD6AqftUH4p9jHCIUInTtj+IiA3Rc8ED7enWj 0FOOfa+4ksJ2xchXT6/y/lhhDTPdOmmrZpYHvx+PLzHxKKw2S5u/Gjn0ltZTkPmjwzyC sC/2fT5GY5XQgWCoYeohOsVMJlDcQ/8uOhKpcvEAS609vLAJtB75+HG4PLDmkevTzOyI WpOe9vqNHIP9iPRqIbrSo2mbY3J8AMJ/F26a9H7zQ9Rp3JgfVoA/tLqYlDAFQF1zSlhF 4XDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="HCQRKqq/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id ij21-20020a170902ab5500b001ca27dfde3dsi130875plb.541.2023.11.02.09.54.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 09:54:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="HCQRKqq/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 89DAE80FF29B; Thu, 2 Nov 2023 09:54:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377020AbjKBQyZ (ORCPT + 99 others); Thu, 2 Nov 2023 12:54:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjKBQyY (ORCPT ); Thu, 2 Nov 2023 12:54:24 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59E9F187 for ; Thu, 2 Nov 2023 09:54:18 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-53de0d1dc46so2049641a12.3 for ; Thu, 02 Nov 2023 09:54:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1698944055; x=1699548855; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=H1LGxmWcx02Jh03WOgomaovWxeWfiplOkjhYrTDh8XI=; b=HCQRKqq/CX1XRCVSaGEKd7EbgNSCs4u5Db89WVAxaA2x2AvrZneQsDHN1iUb/gG7WK 6bvW37BjOP+6D+6yBzM7CpGQ4BxR2LHVDef7rgyukHN30rr3BtgRJxbit0A8WkOFNjJB JidJ9XbfkMiFjJfbT3B0iYv42fgkCe9lmJfc4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698944055; x=1699548855; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H1LGxmWcx02Jh03WOgomaovWxeWfiplOkjhYrTDh8XI=; b=dDaIQoQuAS9xcOJmCj4SOiT3nNER/SISeq7TrQsEUA8wGQItySPe5KP2W1csbfaCjS EpNhdkM8GuyaKUQ9JmQbpC6DoLieXbjTcCfgpgx/4ZwwSDnLyT5I4UFFTACgdMhjrf2L +oUbI/GFyCloh3ES9PX+K7qVqCZB1fRz0alNNzNnXxZNkEbJnYHoS94A+WSeWId2KLxW 0hyp/2p9YiWFBUBnRCsAlFIjXsonIMb6WE3x1dnphpO2c2FeOpXQzStQ+OSuL+AYAK5j Mughb6ZHVjmECt0fwilTUV6zGh8dSDxtwoUjKeKQcmMMKp7Czfc79r7l3iTco3E2I9m4 I5/g== X-Gm-Message-State: AOJu0YzZEy/0/GhiQMwEWqSBec4Rpot3Efpf/vOp1APD82m39VbWh/NJ 3e53ts/w5gLF4ej7JtKQXv8xslDS4pw+XUsGCE0JQA== X-Received: by 2002:a17:907:3685:b0:9c7:4e5d:12c5 with SMTP id bi5-20020a170907368500b009c74e5d12c5mr5916970ejc.61.1698944054918; Thu, 02 Nov 2023 09:54:14 -0700 (PDT) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com. [209.85.128.43]) by smtp.gmail.com with ESMTPSA id dv8-20020a170906b80800b009b285351817sm1341308ejb.116.2023.11.02.09.54.14 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Nov 2023 09:54:14 -0700 (PDT) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-408c6ec1fd1so1325e9.1 for ; Thu, 02 Nov 2023 09:54:14 -0700 (PDT) X-Received: by 2002:a05:600c:1d14:b0:3f7:3e85:36a with SMTP id l20-20020a05600c1d1400b003f73e85036amr68368wms.7.1698944053735; Thu, 02 Nov 2023 09:54:13 -0700 (PDT) MIME-Version: 1.0 References: <20231101212604.1636517-1-hsinyi@chromium.org> <20231101212604.1636517-2-hsinyi@chromium.org> In-Reply-To: <20231101212604.1636517-2-hsinyi@chromium.org> From: Doug Anderson Date: Thu, 2 Nov 2023 09:53:56 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/3] drm/panel-edp: Add several generic edp panels To: Hsin-Yi Wang Cc: Neil Armstrong , Jessica Zhang , Sam Ravnborg , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 02 Nov 2023 09:54:36 -0700 (PDT) Hi, On Wed, Nov 1, 2023 at 2:26=E2=80=AFPM Hsin-Yi Wang w= rote: > > Add a few generic edp panels used by mt8186 chromebooks. > Besides, modify the following panel: > - AUO 0x235c B116XTN02 renamed to B116XTN02.3. > - AUO 0x405c B116XAK01 adjust the timing to delay_200_500_e50. According > to the datasheet: T3=3D200, T12=3D500, T7_max =3D 50. Can you modify this in the `auo_b116xak01` structure? That should make timing work more correctly for anyone directly specifying this panel. The reason I had it point to the other structure was so we didn't treat anyone specifying this panel directly differently than anyone autodetecting it... > Signed-off-by: Hsin-Yi Wang > --- > drivers/gpu/drm/panel/panel-edp.c | 62 ++++++++++++++++++++++++++++++- > 1 file changed, 60 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/pa= nel-edp.c > index 9dce4c702414..06ce3a73d740 100644 > --- a/drivers/gpu/drm/panel/panel-edp.c > +++ b/drivers/gpu/drm/panel/panel-edp.c > @@ -1830,6 +1830,12 @@ static const struct panel_delay delay_200_500_e50 = =3D { > .enable =3D 50, > }; > > +static const struct panel_delay delay_200_500_e80 =3D { > + .hpd_absent =3D 200, > + .unprepare =3D 500, > + .enable =3D 80, > +}; > + > static const struct panel_delay delay_200_500_e80_d50 =3D { > .hpd_absent =3D 200, > .unprepare =3D 500, > @@ -1849,6 +1855,25 @@ static const struct panel_delay delay_200_500_e200= =3D { > .enable =3D 200, > }; > > +static const struct panel_delay delay_200_500_e200_d10 =3D { > + .hpd_absent =3D 200, > + .unprepare =3D 500, > + .enable =3D 200, > + .disable =3D 10, > +}; > + > +static const struct panel_delay delay_200_150_e50 =3D { > + .hpd_absent =3D 200, > + .unprepare =3D 150, I worry a little bit about seeing "unprepare" of 150. It doesn't mean it's wrong, but it's been so consistent for me to see .500 here that it's good to double-confirm. It looks like you use this one on "KD116N2930A15". From the datasheet I see that T12 has a min of 150 ms and a max of 500 ms. Is that the same thing you see? Specifying a "max" for T12 makes no sense. That's saying that it violates timing specs to ever turn the panel off for more than half a second which is nonsense. Given that: * The spec is obviously nonsense for this number. * The 500 ms number is present in the spec and somewhat standard for eDP pa= nels. * Having a larger number is safer. * 500 ms usually won't have a real world impact since it just prevents turning on the panel again right after turning it off (and we use autosuspend to avoid this in most cases). Maybe it's better to just use 500 here? > + .enable =3D 50, > +}; > + > +static const struct panel_delay delay_200_150_e200 =3D { > + .hpd_absent =3D 200, > + .unprepare =3D 150, > + .enable =3D 200, Let's look at this unprepare of 150 too. I guess it's used for two panels. NT116WHM-N21: Wow, there sure are a lot of panels that call themselves "NT116WHM-N21" but have different IDs. :-P If you're sure that this is 150 this is fine, but if there's any doubt (like above) then 500 is safer. R140NWFM R1: I think I found this spec and yeah, it's super clear. 150 ms. NOTE: I didn't try to double-check any of the other timings, mostly I just looked at the unprepare since it stood out. ;-) > +}; > + > #define EDP_PANEL_ENTRY(vend_chr_0, vend_chr_1, vend_chr_2, product_id, = _delay, _name) \ > { \ > .name =3D _name, \ > @@ -1869,38 +1894,71 @@ static const struct edp_panel_entry edp_panels[] = =3D { > EDP_PANEL_ENTRY('A', 'U', 'O', 0x145c, &delay_200_500_e50, "B116X= AB01.4"), > EDP_PANEL_ENTRY('A', 'U', 'O', 0x1e9b, &delay_200_500_e50, "B133U= AN02.1"), > EDP_PANEL_ENTRY('A', 'U', 'O', 0x1ea5, &delay_200_500_e50, "B116X= AK01.6"), > - EDP_PANEL_ENTRY('A', 'U', 'O', 0x235c, &delay_200_500_e50, "B116X= TN02"), > - EDP_PANEL_ENTRY('A', 'U', 'O', 0x405c, &auo_b116xak01.delay, "B11= 6XAK01"), > + EDP_PANEL_ENTRY('A', 'U', 'O', 0x208d, &delay_200_500_e50, "B140H= TN02.1"), > + EDP_PANEL_ENTRY('A', 'U', 'O', 0x235c, &delay_200_500_e50, "B116X= TN02.3"), > + EDP_PANEL_ENTRY('A', 'U', 'O', 0x239b, &delay_200_500_e50, "B116X= AN06.1"), > + EDP_PANEL_ENTRY('A', 'U', 'O', 0x255c, &delay_200_500_e50, "B116X= TN02.5"), > + EDP_PANEL_ENTRY('A', 'U', 'O', 0x403d, &delay_200_500_e50, "B140H= AN04.0"), > + EDP_PANEL_ENTRY('A', 'U', 'O', 0x405c, &delay_200_500_e50, "B116X= AK01.0"), > EDP_PANEL_ENTRY('A', 'U', 'O', 0x582d, &delay_200_500_e50, "B133U= AN01.0"), > EDP_PANEL_ENTRY('A', 'U', 'O', 0x615c, &delay_200_500_e50, "B116X= AN06.1"), > + EDP_PANEL_ENTRY('A', 'U', 'O', 0x635c, &delay_200_500_e50, "B116X= AN06.3"), > + EDP_PANEL_ENTRY('A', 'U', 'O', 0x639c, &delay_200_500_e50, "B140H= AK02.7"), > EDP_PANEL_ENTRY('A', 'U', 'O', 0x8594, &delay_200_500_e50, "B133U= AN01.0"), > + EDP_PANEL_ENTRY('A', 'U', 'O', 0xf390, &delay_200_500_e50, "B140X= TN07.7"), > > + EDP_PANEL_ENTRY('B', 'O', 'E', 0x0715, &delay_200_150_e200, "NT11= 6WHM-N21"), > + EDP_PANEL_ENTRY('B', 'O', 'E', 0x0731, &delay_200_500_e80, "NT116= WHM-N42"), > + EDP_PANEL_ENTRY('B', 'O', 'E', 0x0741, &delay_200_500_e200, "NT11= 6WHM-N44"), > EDP_PANEL_ENTRY('B', 'O', 'E', 0x0786, &delay_200_500_p2e80, "NV1= 16WHM-T01"), > EDP_PANEL_ENTRY('B', 'O', 'E', 0x07d1, &boe_nv133fhm_n61.delay, "= NV133FHM-N61"), > + EDP_PANEL_ENTRY('B', 'O', 'E', 0x07f6, &delay_200_500_e200, "NT14= 0FHM-N44"), > EDP_PANEL_ENTRY('B', 'O', 'E', 0x082d, &boe_nv133fhm_n61.delay, "= NV133FHM-N62"), > + EDP_PANEL_ENTRY('B', 'O', 'E', 0x08b2, &delay_200_500_e200, "NT14= 0WHM-N49"), > EDP_PANEL_ENTRY('B', 'O', 'E', 0x09c3, &delay_200_500_e50, "NT116= WHM-N21,836X2"), > EDP_PANEL_ENTRY('B', 'O', 'E', 0x094b, &delay_200_500_e50, "NT116= WHM-N21"), > EDP_PANEL_ENTRY('B', 'O', 'E', 0x095f, &delay_200_500_e50, "NE135= FBM-N41 v8.1"), > EDP_PANEL_ENTRY('B', 'O', 'E', 0x0979, &delay_200_500_e50, "NV116= WHM-N49 V8.0"), > + EDP_PANEL_ENTRY('B', 'O', 'E', 0x094b, &delay_200_500_e50, "NT116= WHM-N21"), 0x904b is already specified above and this is in the wrong sort order. > + EDP_PANEL_ENTRY('B', 'O', 'E', 0x0951, &delay_200_500_e80, "NV116= WHM-N47"), Please sort 0x0951 before 0x0979. > EDP_PANEL_ENTRY('B', 'O', 'E', 0x098d, &boe_nv110wtm_n61.delay, "= NV110WTM-N61"), > + EDP_PANEL_ENTRY('B', 'O', 'E', 0x09ae, &delay_200_500_e200, "NT14= 0FHM-N45"), > EDP_PANEL_ENTRY('B', 'O', 'E', 0x09dd, &delay_200_500_e50, "NT116= WHM-N21"), > EDP_PANEL_ENTRY('B', 'O', 'E', 0x0a5d, &delay_200_500_e50, "NV116= WHM-N45"), > EDP_PANEL_ENTRY('B', 'O', 'E', 0x0ac5, &delay_200_500_e50, "NV116= WHM-N4C"), > + EDP_PANEL_ENTRY('B', 'O', 'E', 0x0b43, &delay_200_500_e200, "NV14= 0FHM-T09"), > + EDP_PANEL_ENTRY('B', 'O', 'E', 0x0b56, &delay_200_500_e80, "NT140= FHM-N47"), > + EDP_PANEL_ENTRY('B', 'O', 'E', 0x0c20, &delay_200_500_e80, "NT140= FHM-N47"), > > + EDP_PANEL_ENTRY('C', 'M', 'N', 0x1132, &delay_200_500_e80_d50, "N= 116BGE-EA2"), > + EDP_PANEL_ENTRY('C', 'M', 'N', 0x1138, &innolux_n116bca_ea1.delay= , "N116BCA-EA1-RC4"), > EDP_PANEL_ENTRY('C', 'M', 'N', 0x1139, &delay_200_500_e80_d50, "N= 116BGE-EA2"), > EDP_PANEL_ENTRY('C', 'M', 'N', 0x114c, &innolux_n116bca_ea1.delay= , "N116BCA-EA1"), > + EDP_PANEL_ENTRY('C', 'M', 'N', 0x1145, &delay_200_500_e80_d50, "N= 116BCN-EB1"), Please sort 0x1145 above 0x114c > EDP_PANEL_ENTRY('C', 'M', 'N', 0x1152, &delay_200_500_e80_d50, "N= 116BCN-EA1"), > EDP_PANEL_ENTRY('C', 'M', 'N', 0x1153, &delay_200_500_e80_d50, "N= 116BGE-EA2"), > EDP_PANEL_ENTRY('C', 'M', 'N', 0x1154, &delay_200_500_e80_d50, "N= 116BCA-EA2"), > + EDP_PANEL_ENTRY('C', 'M', 'N', 0x1157, &delay_200_500_e80_d50, "N= 116BGE-EA2"), > + EDP_PANEL_ENTRY('C', 'M', 'N', 0x115b, &delay_200_500_e80_d50, "N= 116BCN-EB1"), > EDP_PANEL_ENTRY('C', 'M', 'N', 0x1247, &delay_200_500_e80_d50, "N= 120ACA-EA1"), > + EDP_PANEL_ENTRY('C', 'M', 'N', 0x142b, &delay_200_500_e80_d50, "N= 140HCA-EAC"), > + EDP_PANEL_ENTRY('C', 'M', 'N', 0x144f, &delay_200_500_e80_d50, "N= 140HGA-EA1"), > + EDP_PANEL_ENTRY('C', 'M', 'N', 0x1468, &delay_200_500_e80, "N140H= GA-EA1"), > + EDP_PANEL_ENTRY('C', 'M', 'N', 0x14e5, &delay_200_500_e80_d50, "N= 140HGA-EA1"), > EDP_PANEL_ENTRY('C', 'M', 'N', 0x14d4, &delay_200_500_e80_d50, "N= 140HCA-EAC"), > + EDP_PANEL_ENTRY('C', 'M', 'N', 0x14d6, &delay_200_500_e80_d50, "N= 140BGA-EA4"), > + > + EDP_PANEL_ENTRY('H', 'K', 'C', 0x2d5c, &delay_200_500_e200, "MB11= 6AN01-2"), > > + EDP_PANEL_ENTRY('I', 'V', 'O', 0x048e, &delay_200_500_e200_d10, "= M116NWR6 R5"), > EDP_PANEL_ENTRY('I', 'V', 'O', 0x057d, &delay_200_500_e200, "R140= NWF5 RH"), > EDP_PANEL_ENTRY('I', 'V', 'O', 0x854a, &delay_200_500_p2e100, "M1= 33NW4J"), > EDP_PANEL_ENTRY('I', 'V', 'O', 0x854b, &delay_200_500_p2e100, "R1= 33NW4K-R0"), > + EDP_PANEL_ENTRY('I', 'V', 'O', 0x8c4d, &delay_200_150_e200, "R140= NWFM R1"), > > EDP_PANEL_ENTRY('K', 'D', 'B', 0x0624, &kingdisplay_kd116n21_30nv= _a010.delay, "116N21-30NV-A010"), > EDP_PANEL_ENTRY('K', 'D', 'B', 0x1120, &delay_200_500_e80_d50, "1= 16N29-30NK-C007"), > + EDP_PANEL_ENTRY('K', 'D', 'C', 0x0809, &delay_200_150_e50, "KD116= N2930A15"), Please sort 0x0809 above 0x1120.