Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2158677rwd; Sun, 21 May 2023 14:35:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4eFJdF97ao6CmWccBDlG+8dtIGGug/lcb/xa+yvhTP3cCWwGSNpXSbFQZitN0BlBmG9O8G X-Received: by 2002:a05:6a20:6a1e:b0:103:b448:ddd8 with SMTP id p30-20020a056a206a1e00b00103b448ddd8mr10527631pzk.58.1684704929789; Sun, 21 May 2023 14:35:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684704929; cv=none; d=google.com; s=arc-20160816; b=f1gIJHta02mFOtnZZaePubU00rBbCp1j/vX1Ku5tbaZc3TqQdiPytAdRl6WEPizMtx m/1jYEYqJ9g/XmtcV6XVvpjAfaBdi5zfGx4/dtCL8ffDMd7GJSqj6oKMLxfDcyvcP+bT R1THMZI+UAzI7dCU4XhbKXfEtiYP6h5IVELvDURLehxdgwLy4q37kxVLXRx5mo1ODX7x ktrLytyA1/Ni3CjIYralM3n2eulN3+d/H2P3zQmDaHyVqVXc3X5OTO2c9zeUV3P03L0z o9Cug8HZeRlUQyna8UiyXvnCaxirnoMa7Pl04Ke66jEPsx64EI6il6emZCRbmxwWe4yY ODoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=s91gkDntXOM5H0jUtBn2lgtf3XFanMnGuBJflOYltsQ=; b=mG64AU/p9gx+JDvTXYdhm70Mv/K9QIbaA3wHojllmtENexK+h4ts1abk3xySwQWUko 2tV/teaAFYzo0NFtqt0qeT42OpOW6mTSTvvN5cJ7eQs4OTnjgax/kWh3FYV+mezCANJL Pq2dD4IsFcoVqYXWmPKCV25lZoI5EEBlBapngndr3+ADFq3Pt6o23hzTeFOYCz32DkpM iOK7bwa5Q21I72rS7+l1tui3oZ4zq3B+3jEIuwOVZwLGSZjCXmHo96wXvnGXLeCNYIUx eVIQL5ldxS9NLSmxveaZnAq0vHnd6sob5C/q2SeSBQos8vLTMMQ+SuJ/5iuXG1jCiZ4/ bzIg== 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 w6-20020a637b06000000b0051f0bd1b159si1901418pgc.718.2023.05.21.14.35.17; Sun, 21 May 2023 14:35:29 -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 S231231AbjEUVXk (ORCPT + 99 others); Sun, 21 May 2023 17:23:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230521AbjEUVXU (ORCPT ); Sun, 21 May 2023 17:23:20 -0400 Received: from m-r2.th.seeweb.it (m-r2.th.seeweb.it [IPv6:2001:4b7a:2000:18::171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9358FFD; Sun, 21 May 2023 14:23:16 -0700 (PDT) Received: from Marijn-Arch-PC.localdomain (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 X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id 6FD673F35C; Sun, 21 May 2023 23:23:14 +0200 (CEST) From: Marijn Suijten Date: Sun, 21 May 2023 23:23:08 +0200 Subject: [PATCH RFC 06/10] drm/panel/samsung-sofef01: Add panel driver for Sony Xperia 5 / 10 II MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230521-drm-panels-sony-v1-6-541c341d6bee@somainline.org> References: <20230521-drm-panels-sony-v1-0-541c341d6bee@somainline.org> In-Reply-To: <20230521-drm-panels-sony-v1-0-541c341d6bee@somainline.org> To: 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, Dmitry Baryshkov , Abhinav Kumar , Kuogee Hsieh , Jessica Zhang , Marijn Suijten X-Mailer: b4 0.12.2 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 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