Received: by 2002:a05:7208:3003:b0:81:def:69cd with SMTP id f3csp4332207rba; Tue, 2 Apr 2024 13:57:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXY0Sw4NSw8Ji/u8aR/znyF3jeji1sU83pUN4u0lMwNXz2+P867vwNHJ3/cMG8QHXp9Hc13z/DOkXGTQ+LVy6rG8VZ42GTm9GegOJRTlg== X-Google-Smtp-Source: AGHT+IGPx+ByHFRCshjdeZwwP6yw6QC2w5pNULsMClOpZ1Un0okZDkA702Ow2b+JNaWQOKRcBKBd X-Received: by 2002:a17:90a:be04:b0:2a2:1415:723d with SMTP id a4-20020a17090abe0400b002a21415723dmr12220459pjs.42.1712091463132; Tue, 02 Apr 2024 13:57:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712091463; cv=pass; d=google.com; s=arc-20160816; b=Pw2/KPYEzyksfCId02wDImbegBvThMRbUjNQ1F4ouHjiRXuq4Z438WgvJh4uRQ2OQB KUqErliSYEuMQBZ44IcMb4pPeuFI5rO2m88czzQgd7swb80rz0DCpb3aDBOlbbv2G6ZO eK0zcJCj3/V1u0Y8WdFhAGwY6/AfqRM1BQYiheJqayl09wY7Mtq74EZIC7rh+zV9Fojn uwhnt16GBNWcBUYTAU+WJ5LsBP0wM+YklcOFcRRnfqgRaAO/yvUCMh0KDaoPouV+tUTA cV1XxVjnROF6GQv+Kum3MAwmgVP9bmzZTCsPpZXp4Z48z05M+6qh5ukOzTSMJEWWWmcT AXjw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=GkitwcLe20vkFCJ6WV9cjbYIgHHGZLB9/5qIwGtk16Q=; fh=VyAv4MXqqCUVajaTa91XNW3HtMLtv/8y1MWp72AOgns=; b=LglrMhfgy3eMIDuFwOEkDei70GHDyUADXBnHWwRY1+cJzHFY00vnjS+YXty+EUPqg4 CdvRgL7yXJoWMwcziY48cuQlPb40M/4Zqk78vDWdX+Bgn5bXXf06CphqoYjoFjBp5hpe 9sSwa0C35Qa+2ewEOjBHno0mykiyBw1SHNLA/7fccYtHdmrQK7jwAUr+0PmuR8KoXmGN hXG51uqyeVCuRlFZ2u9uUxx6ly/VpvalcZDu5jAewV2/aXvgdlnJz/vmycvWnKB6Ulmg nGmKgNOR3+Y3ohTzgJXt3U2jAEFL2b1FJNBpVIsA9fz3B6QbknFTEqw23BAe+4vEEbA6 /Rfg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=somainline.org); spf=pass (google.com: domain of linux-kernel+bounces-128686-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128686-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y18-20020a17090aa41200b002a258632a7esi1934616pjp.82.2024.04.02.13.57.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 13:57:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-128686-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=somainline.org); spf=pass (google.com: domain of linux-kernel+bounces-128686-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128686-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A6BB928C4C7 for ; Tue, 2 Apr 2024 20:57:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E654615E20B; Tue, 2 Apr 2024 20:57:34 +0000 (UTC) Received: from relay03.th.seeweb.it (relay03.th.seeweb.it [5.144.164.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9785E15DBB5 for ; Tue, 2 Apr 2024 20:57:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=5.144.164.164 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712091453; cv=none; b=m6rT8348f+Nw1iY9OkHj2rzSVjOLk5jzZ5CLc2jXH5S96bu/UTNAPy/lHCCmutm5hWJWed07N7EHpK/NYj6bGiNkK1WQKFu09yh/Q5bVOA90I+qT4GvGg8dxknSB2qt7cN5bP9b307d+SfFW4C4FvuxeF1Np2gmcAklKe5EkR88= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712091453; c=relaxed/simple; bh=UF4YCZTNGImODEeCHhEO6Kbx0YKmXNo2WCoJ3NHEJuQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=c4GXeNcdMo6vAAx+t6a6X0gZej7MotP3+sud222T4auYvwf+EPEyloLjvvYO6x6mOC2BKUgzDoeopb9sEC+Cz0hK4KmSixKsqFo0297fub2avBozE1HTGWKJkH2mCH0Dpqr074UHAdDavnYjLnWhZN8XlhTLK6SeAZiJdpvbRBk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=somainline.org; spf=pass smtp.mailfrom=somainline.org; arc=none smtp.client-ip=5.144.164.164 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=somainline.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=somainline.org 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 (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id C9B5020266; Tue, 2 Apr 2024 22:57:20 +0200 (CEST) Date: Tue, 2 Apr 2024 22:57:19 +0200 From: Marijn Suijten To: Dmitry Baryshkov Cc: Sumit Semwal , Caleb Connolly , Neil Armstrong , Jessica Zhang , Sam Ravnborg , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vinod Koul , Caleb Connolly Subject: Re: [PATCH 3/3] drm: panel: Add LG sw43408 panel driver Message-ID: References: <20240330-lg-sw43408-panel-v1-0-f5580fc9f2da@linaro.org> <20240330-lg-sw43408-panel-v1-3-f5580fc9f2da@linaro.org> <554zkisebym7gbbom3657ws7kqvyidggfmcvetjm6vrnwts3gl@l53hejt72b5q> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On 2024-04-01 22:11:48, Dmitry Baryshkov wrote: > On Mon, 1 Apr 2024 at 13:29, Marijn Suijten > wrote: > > > > On 2024-03-30 16:37:08, Dmitry Baryshkov wrote: > > > On Sat, 30 Mar 2024 at 12:27, Marijn Suijten > > > wrote: > > > > > > > > On 2024-03-30 05:59:30, Dmitry Baryshkov wrote: > > > > > From: Sumit Semwal > > > > > > > > > > LG SW43408 is 1080x2160, 4-lane MIPI-DSI panel, used in some Pixel3 > > > > > phones. > > > > > > > > > > Whatever init sequence we have for this panel isn't capable of > > > > > initialising it completely, toggling the reset gpio ever causes the > > > > > panel to die. Until this is resolved we avoid resetting the panel. The > > > > > > > > Are you sure it is avoided? This patch seems to be toggling reset_gpio in > > > > sw43408_prepare()? > > > > > > > > > disable/unprepare functions only put the panel to sleep mode and > > > > > disable the backlight. > > > > > > > > > > Signed-off-by: Sumit Semwal > > > > > [vinod: Add DSC support] > > > > > Signed-off-by: Vinod Koul > > > > > [caleb: cleanup and support turning off the panel] > > > > > Signed-off-by: Caleb Connolly > > > > > [DB: partially rewrote the driver and fixed DSC programming] > > > > > Signed-off-by: Dmitry Baryshkov > > > > > --- > > > > > MAINTAINERS | 8 + > > > > > drivers/gpu/drm/panel/Kconfig | 11 ++ > > > > > drivers/gpu/drm/panel/Makefile | 1 + > > > > > drivers/gpu/drm/panel/panel-lg-sw43408.c | 322 +++++++++++++++++++++++++++++++ > > > > > 4 files changed, 342 insertions(+) > > > > > > > > > > diff --git a/MAINTAINERS b/MAINTAINERS > > > > > index 4b511a55101c..f4cf7ee97376 100644 > > > > > --- a/MAINTAINERS > > > > > +++ b/MAINTAINERS > > > > > @@ -6755,6 +6755,14 @@ S: Maintained > > > > > F: Documentation/devicetree/bindings/display/panel/jadard,jd9365da-h3.yaml > > > > > F: drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c > > > > > > > > > > +DRM DRIVER FOR LG SW43408 PANELS > > > > > +M: Sumit Semwal > > > > > +M: Caleb Connolly > > > > > +S: Maintained > > > > > +T: git git://anongit.freedesktop.org/drm/drm-misc > > > > > +F: Documentation/devicetree/bindings/display/panel/lg,sw43408.yaml > > > > > +F: drivers/gpu/drm/panel/panel-lg-sw43408.c > > > > > + > > > > > DRM DRIVER FOR LOGICVC DISPLAY CONTROLLER > > > > > M: Paul Kocialkowski > > > > > S: Supported > > > > > diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig > > > > > index d037b3b8b999..f94c702735cb 100644 > > > > > --- a/drivers/gpu/drm/panel/Kconfig > > > > > +++ b/drivers/gpu/drm/panel/Kconfig > > > > > @@ -335,6 +335,17 @@ config DRM_PANEL_LG_LG4573 > > > > > Say Y here if you want to enable support for LG4573 RGB panel. > > > > > To compile this driver as a module, choose M here. > > > > > > > > > > +config DRM_PANEL_LG_SW43408 > > > > > + tristate "LG SW43408 panel" > > > > > + depends on OF > > > > > + depends on DRM_MIPI_DSI > > > > > + depends on BACKLIGHT_CLASS_DEVICE > > > > > + help > > > > > + Say Y here if you want to enable support for LG sw43408 panel. > > > > > + The panel has a 1080x2160 resolution and uses > > > > > + 24 bit RGB per pixel. It provides a MIPI DSI interface to > > > > > + the host and has a built-in LED backlight. > > > > > + > > > > > config DRM_PANEL_MAGNACHIP_D53E6EA8966 > > > > > tristate "Magnachip D53E6EA8966 DSI panel" > > > > > depends on OF && SPI > > > > > diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile > > > > > index f156d7fa0bcc..a75687d13caf 100644 > > > > > --- a/drivers/gpu/drm/panel/Makefile > > > > > +++ b/drivers/gpu/drm/panel/Makefile > > > > > @@ -34,6 +34,7 @@ obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W) += panel-leadtek-ltk050h3146w.o > > > > > obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829) += panel-leadtek-ltk500hd1829.o > > > > > obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) += panel-lg-lb035q02.o > > > > > obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o > > > > > +obj-$(CONFIG_DRM_PANEL_LG_SW43408) += panel-lg-sw43408.o > > > > > obj-$(CONFIG_DRM_PANEL_MAGNACHIP_D53E6EA8966) += panel-magnachip-d53e6ea8966.o > > > > > obj-$(CONFIG_DRM_PANEL_NEC_NL8048HL11) += panel-nec-nl8048hl11.o > > > > > obj-$(CONFIG_DRM_PANEL_NEWVISION_NV3051D) += panel-newvision-nv3051d.o > > > > > diff --git a/drivers/gpu/drm/panel/panel-lg-sw43408.c b/drivers/gpu/drm/panel/panel-lg-sw43408.c > > > > > new file mode 100644 > > > > > index 000000000000..365d25e14d54 > > > > > --- /dev/null > > > > > +++ b/drivers/gpu/drm/panel/panel-lg-sw43408.c > > > > > @@ -0,0 +1,322 @@ > > > > > +// SPDX-License-Identifier: GPL-2.0+ > > > > > +/* > > > > > + * Copyright (C) 2019-2024 Linaro Ltd > > > > > + * Author: Sumit Semwal > > > > > + * Dmitry Baryshkov > > > > > + */ > > > > > + > > > > > +#include > > > > > +#include > > > > > +#include > > > > > +#include > > > > > +#include > > > > > +#include > > > > > + > > > > > +#include