Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2913504rwd; Fri, 26 May 2023 13:16:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5H07Fgv7UFLaQ+mwzmLImgwfvdjDGx5WvFPkdOCm2fRjUFG/Y3MHWCNZCobARVujxWbEMb X-Received: by 2002:a05:6a00:1485:b0:64f:b147:3f3c with SMTP id v5-20020a056a00148500b0064fb1473f3cmr1560264pfu.6.1685132184195; Fri, 26 May 2023 13:16:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685132184; cv=none; d=google.com; s=arc-20160816; b=m4AhcWeGoQMCWKiKRv8Rb99HAKvP1TGA+ZKjHxJVfwh59UPdw63PvqfWsDJ9NJ4UCn N0UkbVmk5wBk/u74JZ10aQ07dygc0S9laVzVoUl7U4Pu7kn+VzUcPQOaE15PNO6/CfXZ 5MhG2J5alOFizCitbVZcXi2YlQE9Ft/NHwBP2gQSFFio7Jo/cevn82sMIm+eGvfm7qX1 VA9ahQrzRjWlCw9jZKrhLk9Kr8d1S7V7znBX+qfSfV8E7EcoHY5j9tjB9PFWbxsUz24M Qjqt2U3tYfohG3vA+4e67avWt6ejMKGnQZk4j/Sa3kevrFUv8CnJSZYQMcaakDQnp4lf 2epQ== 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=dtYzXAXeeNKykjIC6M7yJXXgCuPRoWwM64ZY3vwKseo=; b=RHYpA06YH0q+u/U55zPsyPiJNKCdUwb6xwBYJK1wX4ZnE1H8+7SbkfntKoH7qkt7V3 3rpxc8FqirlOmLAhgNRKoOhAzJAOKkBKiSxUv5p6ED37bdXtmwk0/LahpCAHjvU8jbvv ObT9UXVd3qPsrKsgrChuZR69OJ0jlABNkyL+RzdeZxUEbf1hElvANE1YFfddkeKyMofG u6/+TENJpjkXkcFsg9u0g46wV1qo/wNNE0ETF4ELx0lmNVr39RuKDk2KEvUUhiCgQBmR v1NQIymGRa2l3wLg7B85+NbA691oAzCHmiZ9kla7Zym6uNsN2+UUbmFSDtJRyTyBNgGe Oczg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=krrqjwzG; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f77-20020a623850000000b0063354a65327si4574273pfa.395.2023.05.26.13.16.11; Fri, 26 May 2023 13:16: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=@chromium.org header.s=google header.b=krrqjwzG; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242813AbjEZTvn (ORCPT + 99 others); Fri, 26 May 2023 15:51:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237637AbjEZTvl (ORCPT ); Fri, 26 May 2023 15:51:41 -0400 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33EAB9E for ; Fri, 26 May 2023 12:51:39 -0700 (PDT) Received: by mail-io1-xd34.google.com with SMTP id ca18e2360f4ac-777094e3d7bso18970939f.1 for ; Fri, 26 May 2023 12:51:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1685130697; x=1687722697; 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=dtYzXAXeeNKykjIC6M7yJXXgCuPRoWwM64ZY3vwKseo=; b=krrqjwzG0OD+yq/+F1IXnoT3w/i5wc3gnTF+joEnO72SMkKoReQHp+SZAyx0MVRFf/ QBLWlyR8PUAVM5TAEZ0oE7MM/3O3lxX/JgNOnwaBU22kKS+skkUD3ZWkEcly9esiMLTI tCcupEPW+JUN+2aME/0mjDR5QqBxWso9OF/jQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685130697; x=1687722697; 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=dtYzXAXeeNKykjIC6M7yJXXgCuPRoWwM64ZY3vwKseo=; b=TSBDpe0nACi36w3Xv1sI8rqsT4COO2sD1i8mqE942BI3c7LE8vdmdhX2iNk4tGYXag n5MW5CM1p1ZXadfxIAqtelx4TjXEzuNhcHci1Gsq9UlEB5ug0NSWtA1SYb16N10ffvSU hEeBoV5U8xrxAqdpt22XIOjrxXIM9l+GAhMoUJotnrdiZ/1XH6OvpXR4GTKJR/k8JBTe +iPLQ5M58azjqyfWVVTAYHDJH0FrZMH/3mkvuGKUtxmosltlT8S8zuAeAPYKoyljTypW jVbYWuahER2lYcikpdEZX2bFV1TPff2MkpJB/9NOd3owl7c4Rxa049FLm13ba02VDs0U dblg== X-Gm-Message-State: AC+VfDxz4JiHu+56N6+TkVpM1RrdnI7i+RbGE6taXJQmDDgX44eN1CCd VBdxB/QRmmjEi8pivJuwqIin3Glg4CwJ/+qPKxU= X-Received: by 2002:a5e:a710:0:b0:776:fc02:184e with SMTP id b16-20020a5ea710000000b00776fc02184emr1789006iod.14.1685130697003; Fri, 26 May 2023 12:51:37 -0700 (PDT) Received: from mail-il1-f179.google.com (mail-il1-f179.google.com. [209.85.166.179]) by smtp.gmail.com with ESMTPSA id ca15-20020a0566381c0f00b0040fad7eb910sm1298638jab.176.2023.05.26.12.51.35 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 May 2023 12:51:36 -0700 (PDT) Received: by mail-il1-f179.google.com with SMTP id e9e14a558f8ab-33b0848c04aso4345ab.1 for ; Fri, 26 May 2023 12:51:35 -0700 (PDT) X-Received: by 2002:a92:ca0a:0:b0:331:2623:c5f4 with SMTP id j10-20020a92ca0a000000b003312623c5f4mr30715ils.1.1685130695437; Fri, 26 May 2023 12:51:35 -0700 (PDT) MIME-Version: 1.0 References: <20230526100801.16310-1-uwu@icenowy.me> <0803e9037a8a2ce96fdad6ec209991dcda2a30ca.camel@icenowy.me> In-Reply-To: <0803e9037a8a2ce96fdad6ec209991dcda2a30ca.camel@icenowy.me> From: Doug Anderson Date: Fri, 26 May 2023 12:51:22 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] arm64: dts: mediatek: mt8173-elm: remove panel model number in DT To: Icenowy Zheng Cc: Pin-yen Lin , AngeloGioacchino Del Regno , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Fri, May 26, 2023 at 8:33=E2=80=AFAM Icenowy Zheng wrot= e: > > =E5=9C=A8 2023-05-26=E6=98=9F=E6=9C=9F=E4=BA=94=E7=9A=84 07:24 -0700=EF= =BC=8CDoug Anderson=E5=86=99=E9=81=93=EF=BC=9A > > Hi, > > > > On Fri, May 26, 2023 at 3:09=E2=80=AFAM Icenowy Zheng = wrote: > > > > > > Currently a specific panel number is used in the Elm DTSI, which is > > > corresponded to a 12" panel. However, according to the official > > > Chrome > > > OS devices document, Elm refers to Acer Chromebook R13, which, as > > > the > > > name specifies, uses a 13.3" panel, which comes with EDID > > > information. > > > > > > As the kernel currently prioritizes the hardcoded timing parameters > > > matched with the panel number compatible, a wrong timing will be > > > applied > > > to the 13.3" panel on Acer Chromebook R13, which leads to blank > > > display. > > > > > > Because the Elm DTSI is shared with Hana board, and Hana > > > corresponds to > > > multiple devices from 11" to 14", a certain panel model number > > > shouldn't > > > be present, and driving the panel according to its EDID information > > > is > > > necessary. > > > > > > Signed-off-by: Icenowy Zheng > > > --- > > > arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > We went through a bunch of back-and-forth here but in the end in the > > ChromeOS tree we have "edp-panel" as the "compatible" here in the > > ChromeOS 5.15 tree and this makes sense. > > I only have Elm, so I am curious that do all Hana's only rely on panel > EDID to use different displays? > > BTW The Chrome OS document say that Elm and Hana are both board based > on Oak baseboard, should the DTSI be renamed mt8173-oak.dtsi, and still > let mt8173-elm.dts include it and then set model information? I wasn't deeply involved in mt8173, so I'll let treapking@ comment. I think he's done some research here recently. > > Reviewed-by: Douglas Anderson > > > > ...in theory one would wish for a "Fixes" tag, but I think in > > previous > > discussions it was decided that it was too complicated. Hardcoding > > the > > other compatible string has always been technically wrong, but I > > guess > > it worked at some point in time. The more correct way (as you're > > doing > > here) needs the DP AUX bus support and the generic eDP panels, both > > of > > which are significantly newer than the elm dts. So I guess leaving no > > "Fixes" tag is OK, or perhaps you could do the somewhat weak: > > Well I remembered when I was developing the support for Pine64 > Pinebook, which is also an ARM64 laptop with an eDP panel (via a DPI- > eDP bridge, ANX6345). At first I didn't use any panel node in the DT, > and the kernel maintainers argued to the bridge that seems to be > connected to nothing (because DP is a discoverable port), and > fortunately 2 Pinebook SKUs (11.6" and 14") is finally reduced to one, > and it's then possible to hardcode a panel model in the Pinebook DT. > According to my memory, the need to specify the panel is to properly > handle eDP panel power up timing, because it's not a very standard > thing. (Well, in my memory, when I was testing that code, on a > (engineering sample) 14" Pinebook, the EDID timing overrided the > hardcoded 11.6" timing and it properly works, the 14" panel is 1366x768 > but the 11.6" panel is 1920x1080.) > > (BTW when I checked the DT of Olimex TERES-I, which uses the same DPI- > eDP bridge, it is still in the status of a dangling bridge, and of > course it works ;-) ) Before the generic eDP panel support, several devices worked according to the "little white lie" theory. They would pick some arbitrary panel to put in the DT because they had to, but then that panel would just be used for the power up / power down timing and everything else would be overridden. This was obviously not a great situation to be in, and so we had many discussions on the mailing list about how to do better. The end result was the generic edp-panel support. With eDP panel support, you still need to add the timings for your specific panel, but it was realized that in _most_ cases we could power up the panel enough to read the "panel ID" and then we could use that to lookup the timings. In the few cases where we needed a little extra help (if HPD is broken or not connected), the DP folks agreed to allow a few properties to specify it. :-) Hopefully today all new code uses the general panel-edp. -Doug