Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3714542rwd; Mon, 29 May 2023 15:47:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7prCN4lu3rah4HuI2scg/3yJRqZZIbaPu1G+XMD7mMy6afrFyD5SI3JqJM2ty/MV6ffe+t X-Received: by 2002:a05:6a20:918b:b0:10c:467a:536f with SMTP id v11-20020a056a20918b00b0010c467a536fmr418143pzd.14.1685400422669; Mon, 29 May 2023 15:47:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685400422; cv=none; d=google.com; s=arc-20160816; b=ieEtkCUFyxXKuwZ4n02hnQntm2meg2KbB6jfqUDsUid9JqzWE+9GmNsXycZjbj43pH evowbcEwu+52vOfx5d2DDq7mjoB5e64Y69XUfYVuR6F8TyFYSAlPXd4QITH7yh5l1Tsn CEo11bFVC5wHCtKENm3sJjOVhZnqVmFX07lN0JhCSDbIsTA3xH2/IeQC1tcHjgJwkI7S HlHu40RHyVJgtQnx3oBjVC0UG7uAnDjFpnRItlwgXVBA+WLRQnwAOjjGTBc8T7BwT/A4 38wEiliHLVv3YfvaR2LwrFHg7R/VeDti2sQqSahy4nXwygn9kBalc6HImSWAg9eu028s WX9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=WHXdiRPnLt5SjBlXFy6J8YK1WunuItYxHLylnIC34pE=; b=peh6WZFR/+qbImzEb951Ygxl/oWEHR76fapehx4/IOrM79E2BwGtiAP/rFQg8bSwOX tcGgLaHHGCHU6WeuI1CNQeXS+huBBadI0R+PXCLKagvAugdEGwZFCyXFvdAlCtz1uJU9 IIqJ+3wI1BJNFC/X3ggK25JOS468lLjtAOAGlZm3uF/SYtyEKx3Mj4v1dgj8QOESRacN N6niyvP/TJZKs3SVncFO8CzSuY4WFoIdxaEURpwdgbxYyKzgKIk9IJwNMkgMCVwmYkAX qsQGlZgW8MuYx2MQRFs6U9JwIhhdmDbgGuU24IWkdfqJNfbWmOSfC1ArO32EpfUIH3t8 jlGA== 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 i184-20020a6387c1000000b00513af1fa0b5si9577169pge.797.2023.05.29.15.46.50; Mon, 29 May 2023 15:47:02 -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 S229962AbjE2WfP (ORCPT + 99 others); Mon, 29 May 2023 18:35:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229485AbjE2WfO (ORCPT ); Mon, 29 May 2023 18:35:14 -0400 Received: from relay02.th.seeweb.it (relay02.th.seeweb.it [IPv6:2001:4b7a:2000:18::163]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66A229F; Mon, 29 May 2023 15:35:13 -0700 (PDT) Received: from SoMainline.org (94-211-6-86.cable.dynamic.v4.ziggo.nl [94.211.6.86]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id C5119202FC; Tue, 30 May 2023 00:35:09 +0200 (CEST) Date: Tue, 30 May 2023 00:35:08 +0200 From: Marijn Suijten To: Dmitry Baryshkov Cc: Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Caleb Connolly , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Gross , Bjorn Andersson , ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Abhinav Kumar , Kuogee Hsieh , Jessica Zhang Subject: Re: [PATCH RFC 06/10] drm/panel/samsung-sofef01: Add panel driver for Sony Xperia 5 / 10 II Message-ID: References: <20230521-drm-panels-sony-v1-0-541c341d6bee@somainline.org> <20230521-drm-panels-sony-v1-6-541c341d6bee@somainline.org> <66d0c903-5b79-68d4-8303-76c4846770d8@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <66d0c903-5b79-68d4-8303-76c4846770d8@linaro.org> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On 2023-05-30 01:20:17, Dmitry Baryshkov wrote: > On 29/05/2023 23:58, Marijn Suijten wrote: > > On 2023-05-23 01:56:46, Dmitry Baryshkov wrote: > >> On Tue, 23 May 2023 at 01:32, Marijn Suijten > >> wrote: > >>> > >>> On 2023-05-22 04:19:45, Dmitry Baryshkov wrote: > >>>> On 22/05/2023 00:23, Marijn Suijten wrote: > >>>>> This SOFEF01-M Display-IC driver supports two modes with different > >>>>> compatibles to differentiate between slightly different physical sizes > >>>>> (panels) found on the Xperia 5 (6.1") and 10 II (6.0"). > >>>>> > >>>>> It is currently also used to hardcode significantly higher fake porches > >>>>> for the Xperia 5, which are unused in transfers due to this being a > >>>>> command-mode panel but do have an effect on the clock rates set by > >>>>> dsi_host.c. Without higher clock rates this panel fails to achieve > >>>>> 60fps and has significant tearing artifacts, while the same calculated > >>>>> clock rate works perfectly fine on the Xperia 10 II. > >>> > >>> > >>> > >>>>> +/* Sony Xperia 5 (kumano bahamut) */ > >>>>> +static const struct drm_display_mode samsung_sofef01_m_bahamut_mode = { > >>>>> + /* > >>>>> + * WARNING: These massive porches are wrong/useless for CMDmode > >>>>> + * (and not defined in downstream DTS) but necessary to bump dsi > >>>>> + * clocks higher, so that we can achieve proper 60fps without tearing. > >>>>> + */ > >>>>> + .clock = (1080 + 156 + 8 + 8) * (2520 + 2393 + 8 + 8) * 60 / 1000, > >>>>> + .hdisplay = 1080, > >>>>> + .hsync_start = 1080 + 156, > >>>>> + .hsync_end = 1080 + 156 + 8, > >>>>> + .htotal = 1080 + 156 + 8 + 8, > >>>>> + .vdisplay = 2520, > >>>>> + .vsync_start = 2520 + 2393, > >>>>> + .vsync_end = 2520 + 2393 + 8, > >>>>> + .vtotal = 2520 + 2393 + 8 + 8, > >>>>> + .width_mm = 61, > >>>>> + .height_mm = 142, > >>>>> +}; > >>>>> + > >>>>> +/* Sony Xperia 10 II (seine pdx201) */ > >>>>> +static const struct drm_display_mode samsung_sofef01_m_pdx201_mode = { > >>>>> + .clock = (1080 + 8 + 8 + 8) * (2520 + 8 + 8 + 8) * 60 / 1000, > >>>>> + .hdisplay = 1080, > >>>>> + .hsync_start = 1080 + 8, > >>>>> + .hsync_end = 1080 + 8 + 8, > >>>>> + .htotal = 1080 + 8 + 8 + 8, > >>>>> + .vdisplay = 2520, > >>>>> + .vsync_start = 2520 + 8, > >>>>> + .vsync_end = 2520 + 8 + 8, > >>>>> + .vtotal = 2520 + 8 + 8 + 8, > >>>>> + .width_mm = 60, > >>>>> + .height_mm = 139, > >>>>> +}; > >>>>> + > >>>>> +static const struct of_device_id samsung_sofef01_m_of_match[] = { > >>>>> + { .compatible = "samsung,sofef01-m-bahamut", .data = &samsung_sofef01_m_bahamut_mode }, > >>>>> + { .compatible = "samsung,sofef01-m-pdx201", .data = &samsung_sofef01_m_pdx201_mode }, > >>>> > >>>> Are there really two panels? Can we use one mode for both usecases? > >>> > >>> See the commit description where I explained exactly this: the panels > >>> have different dimensions (6.1" vs 6.0", hence different DPI) and I also > >>> abuse this to hack in higher clock rates via fake porches. > >>> > >>> I just ended up on a scary website that supposedly contains the panel > >>> names: > >>> > >>> - Xperia 5 (bahamut, 6.1"): AMB609TC01 > >>> - Xperia 10 II (pdx201, 6.0"): AMS597UT01 > >> > >> Great! From the patch description it was not obvious if those are two > >> different panels or a single panel with slight difference in the glass > >> cover. With these names in place (well, with two distinct names in > >> place) it makes sense. > > > > For completeness: keep the current single file but embed these panel > > names as suffix (eg. `samsung,sofef-01-m-am[bs]...`) to the compatible > > (and document these more explicitly elsewhere)? > > Where do the sofef parts of the name come from? Glancing at other > panels, I'd expect something simpler. Maybe: That is the Driver-IC. Sorry, I meant sofef01-m without the first dash, matching the original compatibles. But can also drop the dash in 01-m if desired. > samsung,sofef01m-amb60... - Marijn