Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2323002rwd; Sun, 21 May 2023 18:37:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5uG4Rm6Oo9LBJOMJqv4aHo2x7LcJYbbtQUCVHtppd12OpSiT+kI0GAX2PkZYR/evQaoj/m X-Received: by 2002:a05:6a00:228e:b0:64d:6a78:157e with SMTP id f14-20020a056a00228e00b0064d6a78157emr2591604pfe.28.1684719429288; Sun, 21 May 2023 18:37:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684719429; cv=none; d=google.com; s=arc-20160816; b=Y/43w5punUqfXj33vDFBEHQInHQe7byJWDplAOCk2LaHs7IfDySF3k6JyLvQvciRh/ c/Y4TRGG5RYtqEkatlHnFKZ+LIMxCk8NEpwUMpqXjqzh56afHG/gdDNhFvNMqGVyXnRf wC001P7H3S8mWM8otxZ3ImT5M/upSzmeLL+SZig4qSdAiOtNabIU4RCgkPV/QB8xZRTz SlwOrhTNZY8eXi+OK26PtnTIagWvLhR5/0K/zBUpLnJ8WMdCxTrdYxEqVSvjVDwOFGmJ bjqQEGYFfu7xkpI2kDHhlsYFGWnXCULVxk7naliBvrxWIAtZ+By9CtAOYdQmDyP+6W3v yy0Q== 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:dkim-signature; bh=VQoC+SQvPKQcE2Jq1icKOeDMkY2wGwLUBK2zmb7MpPc=; b=cxwrnKiLS98x4VQMrN1GgGANFnmGkEqbYrCTWJfEjKm7o+5eYqQ3w5o0Vnu0aW6LEQ 1n/1NpAD2x2wsE6CM6LcCGMn+GCiHoOpS6mZ1dn/dWzdt/QABFbpyzUD3d5HcSgtaRJV ho713qZHkGY8x4JC7X6Fd2bRjhQofCxuhATSeIU/PKBHBUx5MaBZuVi9zXHchgVX2Wgq OfZMZZNDAME3eU8IeNKd/XSLJjYeLuCarVUgVmgEuu4yGFchxi3KacKmaNvby6EaTH2f IBNCg4HuVV955dYemM26AOf6/AdEdx72ySFI0a9i+kuX5bIfW6yoCp67a8HQU19diY9X 1HiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z5Kq2u0p; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 24-20020a631258000000b0052c6e736ad1si3918644pgs.61.2023.05.21.18.36.56; Sun, 21 May 2023 18:37:09 -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=@linaro.org header.s=google header.b=Z5Kq2u0p; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231176AbjEVBTz (ORCPT + 99 others); Sun, 21 May 2023 21:19:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229550AbjEVBTy (ORCPT ); Sun, 21 May 2023 21:19:54 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB4BBC4 for ; Sun, 21 May 2023 18:19:48 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4f3b9e54338so1553989e87.0 for ; Sun, 21 May 2023 18:19:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684718387; x=1687310387; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=VQoC+SQvPKQcE2Jq1icKOeDMkY2wGwLUBK2zmb7MpPc=; b=Z5Kq2u0p0ju13oSnhQzioJ8S09uvVpvj+/++K3AAeNFz79Kdtelw1OFagnfM/gCtrx mrMEdDnu1riZ5Oja8P2xh0/EMdv4wmG93I2r6b+jJVVbQIsOs8uZ/Wq+cp0ztjXrGA6V q8T6rG2ZDV4yOT3TrI12K8kzDKtDW1amV4bf9/C162OlO4xXmukgS5X6vDGvRGYmW8TF KK8COO8yy5NnorJY38w1V5aDNFJcmgb92KxWJuOmtP0MXlkbbrIlQU72XHCZcIErvM2r ptzKXI7ED7o9VP1SFBlzV4cdQIOeaTgmXYIc+p3ArrKVcy6ku1LuvuJpU6fsMacYxv0Z Im6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684718387; x=1687310387; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VQoC+SQvPKQcE2Jq1icKOeDMkY2wGwLUBK2zmb7MpPc=; b=QK2jKndrVfCFoM8CUqm5es5uK8sszM5HYuV3zzp9bRZc8zYHdpnP/iCHgFxglvdlv3 BZ4N7KajNkeU2zcy5Lm9LTfKIsxjaGyn27C0XARCNAf/uhIJ/2WhwUqmt8Op53LK1Cqn HSeGqlY3H8McdXo2lM1OQVI+1XT+UAHheY1URUi+RvHJGuVi+EU2xNInK9ITOKdJ43Ju qYjndjlupKz2lUj5AGzobFFrSU4JNBkAwGLjM2boBQUlXIUhmAgjC8Ty1/EYev1scer3 VHQXiS2hFVD4oS9xiDEz7dWBSgZO8rWr4DketLipGV/vydPfAjMlQUQpL5py9eWj+n4F W95w== X-Gm-Message-State: AC+VfDzo1ZfVttm+YbKC5QaFPpfdUzqGLye+59XKl1wvmeDfs4eDYOwS 3LhIRStRAMRwkrhLOL4QbbjFJw== X-Received: by 2002:ac2:4c09:0:b0:4f2:74d3:8996 with SMTP id t9-20020ac24c09000000b004f274d38996mr3059673lfq.8.1684718387133; Sun, 21 May 2023 18:19:47 -0700 (PDT) Received: from ?IPV6:2001:14ba:a0db:1f00::8a5? (dzdqv0yyyyyyyyyyybcwt-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::8a5]) by smtp.gmail.com with ESMTPSA id u17-20020ac25191000000b004f13eca769esm782940lfi.82.2023.05.21.18.19.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 May 2023 18:19:46 -0700 (PDT) Message-ID: Date: Mon, 22 May 2023 04:19:45 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH RFC 06/10] drm/panel/samsung-sofef01: Add panel driver for Sony Xperia 5 / 10 II Content-Language: en-GB To: Marijn Suijten , Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Caleb Connolly , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Gross , Bjorn Andersson Cc: ~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 References: <20230521-drm-panels-sony-v1-0-541c341d6bee@somainline.org> <20230521-drm-panels-sony-v1-6-541c341d6bee@somainline.org> From: Dmitry Baryshkov In-Reply-To: <20230521-drm-panels-sony-v1-6-541c341d6bee@somainline.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 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. > > Signed-off-by: Marijn Suijten > --- > drivers/gpu/drm/panel/Kconfig | 12 + > drivers/gpu/drm/panel/Makefile | 1 + > drivers/gpu/drm/panel/panel-samsung-sofef01.c | 360 ++++++++++++++++++++++++++ > 3 files changed, 373 insertions(+) > > diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig > index 18bd116e78a71..3f11e9906f2cb 100644 > --- a/drivers/gpu/drm/panel/Kconfig > +++ b/drivers/gpu/drm/panel/Kconfig > @@ -618,6 +618,18 @@ config DRM_PANEL_SAMSUNG_SOFEF00 > > The panels are 2280x1080@60Hz and 2340x1080@60Hz respectively > > +config DRM_PANEL_SAMSUNG_SOFEF01 > + tristate "Samsung sofef01 Sony Xperia 5 / 10 II DSI cmd mode panels" > + depends on GPIOLIB > + depends on OF > + depends on DRM_MIPI_DSI > + depends on BACKLIGHT_CLASS_DEVICE > + help > + Say Y or M here if you want to enable support for the Samsung AMOLED > + command mode panels found in the Sony Xperia 5 / 10 II smartphones. > + > + This panel features a fixed mode of 1080x2520@60. > + > config DRM_PANEL_SEIKO_43WVF1G > tristate "Seiko 43WVF1G panel" > depends on OF > diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile > index 85133f73558f3..a4039d0fc9cfb 100644 > --- a/drivers/gpu/drm/panel/Makefile > +++ b/drivers/gpu/drm/panel/Makefile > @@ -62,6 +62,7 @@ obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0_DSI) += panel-samsung-s6e63m0-dsi.o > obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01) += panel-samsung-s6e88a0-ams452ef01.o > obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0) += panel-samsung-s6e8aa0.o > obj-$(CONFIG_DRM_PANEL_SAMSUNG_SOFEF00) += panel-samsung-sofef00.o > +obj-$(CONFIG_DRM_PANEL_SAMSUNG_SOFEF01) += panel-samsung-sofef01.o > obj-$(CONFIG_DRM_PANEL_SEIKO_43WVF1G) += panel-seiko-43wvf1g.o > obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) += panel-sharp-lq101r1sx01.o > obj-$(CONFIG_DRM_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o > diff --git a/drivers/gpu/drm/panel/panel-samsung-sofef01.c b/drivers/gpu/drm/panel/panel-samsung-sofef01.c > new file mode 100644 > index 0000000000000..18dc67a301a7b > --- /dev/null > +++ b/drivers/gpu/drm/panel/panel-samsung-sofef01.c > @@ -0,0 +1,360 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +// Copyright (c) 2023 Marijn Suijten > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include