Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp920227imw; Fri, 8 Jul 2022 14:25:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uy4aa+w8PKcn88bz/kDzA3YLiL1Q/6OmKC7nzYC7gWIlGcYvvBmNZGr8i/wasMOjVFdJrb X-Received: by 2002:a17:90b:2407:b0:1ec:dd93:511a with SMTP id nr7-20020a17090b240700b001ecdd93511amr2074088pjb.212.1657315501273; Fri, 08 Jul 2022 14:25:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657315501; cv=none; d=google.com; s=arc-20160816; b=ELnB9Uhnw7lX6/kWvBmrra417lAPo2FV/CPYeQ6xuTh4szx/VVg8QN8UWHgPsz03Nd apzr32I+KFOmJpMKpRfwCxxkoKhqXeGoYB/NaKYiQFsGuNvE4v/k0LTYTVWcHKTdcXKg /IYt456742Hh5y0eiiKl8vZpQTFvnWvkBHwQDnMZgW8vZkly6rPKD+NVdQQlzw6KOmAz 6Z0jpmSbscSea4FjMEuNS15XJDJ4/75iXBgMQBnF/ec+pw+ZR4J16ezuyfTSrZNHS5V+ TnuwiQtbXPbQ16/Izf9HHZmfD8eV/WppQHiGeWJ7tKO8iFIeKZl7Q/X9OgKBEgPMCkO0 0DEA== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=34yKG142AcpoIQ9NVFmN44FKYxC5Q7vKWbuNhv88SXs=; b=x6tUK4yn1+OdV+fee7v/gF/qKMZvyoGtSKUY68JhwQJTG6gnRQwz7hJuDbPSxlxukj m4m59mQuUSdhYH7KjyMfz+lhK2W56r9cc0Y2pktHLtKe4ZD1njIbRBSPwOFYFBpVpe9i NaAGxJ1zqxDPM/w9fXFlZOaBS2zq9tPWy7WDGOEXcIXmljbWWT/Dwj1UUgSQ8fwNZ1gk YDhJXlvreLw1f2b512cHxtuouFhG/yOjJNAfRkk/e41NdQb+N/K4bWvcPOjaDXY55aaS x9kFC6WqUWB3SlYskLjexmx7gxObCYk9tVjjXQxTyOiyI7GqMyh/fIewtRWIU+V8TmOS 6jpw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 16-20020a630a10000000b0041293fa551esi15298073pgk.580.2022.07.08.14.24.49; Fri, 08 Jul 2022 14:25:01 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239111AbiGHUoE (ORCPT + 99 others); Fri, 8 Jul 2022 16:44:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238369AbiGHUoD (ORCPT ); Fri, 8 Jul 2022 16:44:03 -0400 Received: from relay02.th.seeweb.it (relay02.th.seeweb.it [5.144.164.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 445CB9CE3F; Fri, 8 Jul 2022 13:44:01 -0700 (PDT) Received: from [192.168.1.101] (abxi46.neoplus.adsl.tpnet.pl [83.9.2.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 373731F6C6; Fri, 8 Jul 2022 22:43:57 +0200 (CEST) Message-ID: Date: Fri, 8 Jul 2022 22:43:56 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 0/5] Add support for Xiaomi Poco F1 EBBG variant Content-Language: en-US To: Joel Selvaraj , Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org References: From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 8.07.2022 13:12, Joel Selvaraj wrote: > There are two variants of Xiaomi Poco F1. > - Tianma variant with NOVATEK NT36672A panel + touchscreen manufactured > by Tianma > - EBBG variant with Focaltech FT8719 panel + touchscreen manufactured > by EBBG > > The current sdm845-xiaomi-beryllium.dts represents tianma panel variant. > > To add support for the EBBG variant, let's split this into 3 files, > - sdm845-xiaomi-beryllium-common.dtsi which contains all the common nodes > - sdm845-xiaomi-beryllium-tianma.dts for the tianma variant > - sdm845-xiaomi-beryllium-ebbg.dts for the ebbg variant > > Note: > ----- > Both the panels are already upstreamed and the split is based on them. > There were patches earlier for both the touchscreens, but they are not > accepted upstream yet. Once they are accepted, we will add them to > respective variants. Hi, I believe this is not the correct approach. This may work short-term, but you will have to prepare 2 separate images for the device and mistaking them may cause irreversible hw damage at worst, or lots of user complaining at best. Instead, I think it's about time we should look into implementing dynamic panel detection. Qualcomm devices do this by parsing the command line [1], as LK/XBL gives you a nice-ish string to work with that you can simply match against a label. Other vendors may use custom mechanisms, such as a resistor / GPIO to determine which panel (or generally hw config), but implementing this mechanism would make upstreaming of lots of other devices easier.. This issue concerns many phones (and well, devices in general), as they are seldom made with only one configuration due to supply chain strategies. Konrad [1] https://github.com/LineageOS/android_kernel_xiaomi_sdm845/blob/lineage-19.1/drivers/gpu/drm/msm/dsi-staging/dsi_display.c