Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3192325rwd; Mon, 22 May 2023 09:53:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4yKrruy4bYI9m+HOQj18uYhHuZNbwOnmPw9huDBldffmSI/okMSaWEIpaLLjZPiFNv7Ht6 X-Received: by 2002:a17:902:c944:b0:1ac:8cd4:7404 with SMTP id i4-20020a170902c94400b001ac8cd47404mr13184215pla.35.1684774390444; Mon, 22 May 2023 09:53:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684774390; cv=none; d=google.com; s=arc-20160816; b=WM5kxzaCkLp1A207qY0aX4AsfCCjqvZbx5AmXlKbpHhDYSYRhF5LE/oPU/f5TBf3Ps vrHNcPas0eGcIxyF/dKIHXIZtr2WYMC/LTCu6Olpk8J9BORy060ZRv+JSptxA+uJW4cF VPdb9C0L7v265j+KOyXK5NSH/AdK4l5nrAsCMh99tk9FDEV3hVaR+yFpv9cjVfiSUTjG 9fQhj0pQkOMG4ja4z1M1fWYtNEq48l34yZB+QmmQkoHdIU1GoKZZE80iefIEskzRH4Dt NPqnFdru8SkVU4aZVLkJgBR5s/s7IBlr4RwOCMqr1gLJVVDdgytN5oHoY5A84MVlFDFA tKSw== 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=EjBSL8K5gXttJqCACE9w5r3vIlFrduJP0uiiZYksreI=; b=UdqjWHgrdgbqvxJLP2UNVMbBmyw24loiEzIN693lESB4dEbrDeT7Vj9ffJX78PW3u+ +cKaLRpyZckVzgbOty4F0aBMarHlGRAcb1RgcyLCGFIbY0XyPyFbgaMeMeh2etjGY1Mn LqbiGfkhDYdGOS121pwUroD8xMsr+kbKjRqegSk6Zw0PxJSWckHCpcOyWscSjRgU2ltD QY3AlR5xxqr3j0b2YXjJLex4oy8VefrbOMST1KM/s8iNTC1GhG5NfJYvwbcpYjU7JmM+ 1Q3uWkGlRCnGozVo4vI/HzS2lMA+SMfQ19hbneMc9pp56KIK4dXRaXAQvpYB+Fi87+el L7Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vEFrQ2+N; 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 km3-20020a17090327c300b001ae4a4961d0si4704840plb.274.2023.05.22.09.52.54; Mon, 22 May 2023 09:53:10 -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=vEFrQ2+N; 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 S233141AbjEVQaY (ORCPT + 99 others); Mon, 22 May 2023 12:30:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232835AbjEVQaT (ORCPT ); Mon, 22 May 2023 12:30:19 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EB73120 for ; Mon, 22 May 2023 09:30:12 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2af7081c9ebso20450241fa.1 for ; Mon, 22 May 2023 09:30:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684773011; x=1687365011; 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=EjBSL8K5gXttJqCACE9w5r3vIlFrduJP0uiiZYksreI=; b=vEFrQ2+N1HB45UEZL0lxZdvkMMWzsyCbjBHM1xHviHAVIO58KXAz6vc0oZE+vePNf0 OlJ6vM7Jw5qXiRMaQm95X9/9SHAJIDBnUcd9bPejRZeytTItku9hI9yPrAubNnKAD+ws FO0xaXSBBDKjp/U4OaPCjGHwg+rayJUXGhiqCxX9ByilKhiz789QINkBaQtQeR1AORAY /nmmT3/oqqYD/k6X9G6RPIttewImUN8ijYGJWNOTK3HgOVhrJZLcnmN4LgPeRh6oXnCJ YVYW2YBVUQYUDYPOemGJx3HCT9OJTZZQ55W2jIpWrt+SlLqT5vcTXis2gIXdl6g0sydS 58KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684773011; x=1687365011; 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=EjBSL8K5gXttJqCACE9w5r3vIlFrduJP0uiiZYksreI=; b=TjPJ8lZDs6Y+jKfbSMd17LbZJXP4Utk4+PCGW+1p4y/Z0Om6ZHwdTnCyHYHp3k2+2g z9I8mCCReZNg2Ggow23YSqHEjJvJDCxfckeO9Hwgn6IYAWqOwoIhbHugH2NtMQsa/pvN S7dOOF/9T3+CNx4hm+z2zvKLEmiPQqmh5c7ql97Fycro1RqDry3VlxJZIknPTmlmBCpg jzGijr5ZTXAGLba6pMbb+mmnU1aX16hTGCWw0OhKrP0CY8nlKKRfRVwb/2s9hyU9Oj5F gt4qPyYcnarD+EPBnSf429xz8ncLI6Z+S1+mSX++qbOWD9jqJYpLMVzg9jmVt48kGTNz v3uQ== X-Gm-Message-State: AC+VfDwDwBYsCwZn1cHtzDfas00JVmJMPhA/nKxM3DzSRp0uCfNfuEbl jsMbyFbwo/7z8t4rP/LuS6evVQ== X-Received: by 2002:a05:6512:512:b0:4ec:9ef9:e3d with SMTP id o18-20020a056512051200b004ec9ef90e3dmr3214762lfb.26.1684773010574; Mon, 22 May 2023 09:30:10 -0700 (PDT) Received: from [192.168.1.101] (abyk97.neoplus.adsl.tpnet.pl. [83.9.30.97]) by smtp.gmail.com with ESMTPSA id v28-20020ac2593c000000b004f13eff5375sm1047110lfi.45.2023.05.22.09.30.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 May 2023 09:30:10 -0700 (PDT) Message-ID: Date: Mon, 22 May 2023 18:30:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH RFC 06/10] drm/panel/samsung-sofef01: Add panel driver for Sony Xperia 5 / 10 II Content-Language: en-US To: Dmitry Baryshkov , 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 , 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: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 03:19, 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. >> >> 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