Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1345576lqz; Mon, 1 Apr 2024 03:30:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUaMr3jr/sYcMPrI3feQD6I4Jew2Xl1Bs9MTNuhv+Lz0F2Bca+XiYeGEH8TSRWLnliR/NSE9u5fGNUb2FzIIxiEinZ6z693Mbb3SvIuTA== X-Google-Smtp-Source: AGHT+IE8DDYFJrzLNjhpeuDyN31KjZ1nbtdvR7+3kkE6uuLYn5yrXjpNCr8syn3i6PjnPzbz/hTd X-Received: by 2002:a05:651c:1247:b0:2d6:bb86:5174 with SMTP id h7-20020a05651c124700b002d6bb865174mr5653506ljh.7.1711967403146; Mon, 01 Apr 2024 03:30:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711967403; cv=pass; d=google.com; s=arc-20160816; b=kFWlPXTrn+/2I6rvfveSRP4tEvYxXOeitvsijJUTogAJeVJkX7q5DHB78tB4pqLDcJ FFqTRPjX7oBvCMzOWMNVcBoMJiwFS++CwZ6eK4OLAPHRhaQUbKtVQCEwQslVO0b831cy Z7xkn3pFUd0G8iBo6QP9YzQ8dvHDFqLwGuofRBVNSOZHHEkKT98C4b2wMF3+h8ckZtzg /CK3HOGjjG75T4YBYZAgTIT1/ysqNRH90czlgpUupHgflOLfFhjW0ai01QinhiU4BFvh on+NB42sbcq00E293ZMvapWvfvFJuWDOl76y8WIDV1mwNWOQMO//Ua1GAPej8fRJINoM Tq3g== 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=xKD4QWk3eGTkSNIm9y7pfIiIs7R6g63qdtpo2s2GWf0=; fh=VyAv4MXqqCUVajaTa91XNW3HtMLtv/8y1MWp72AOgns=; b=clZo5jPZJ7tQFKKJ9p0NpdVoKcFYGT0rcMlBjOMH6WoftlMRZwARDiXVw5CkRR1lL7 wRL7IL7W1dMYt1zt2dhSKquRtesxCeH57DdxNx6oXsEfpKFdF73z+ceOC/wQo3Ohe+ZW Q7wQX2katXwO3oqim1fM2Kt72pdd7oy7wUE55RutQzZhjfFSZDpKZuTTSU7JzwslXMo+ Xp9M69VnXmh5/d7ltXFfBndDca+4LEBbWpWALJagTn8hAlGdXH1NgchS5VKK4nC4ui39 niSACnr/eGZKpKyD4S/JGw0XKf9uT+EJAepDbDfLgQXCdgJyrL5sE1y1/mXiOO6t2TSU KCTg==; 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-126595-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126595-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a24-20020a17090640d800b00a4dec4f0cd0si4413314ejk.158.2024.04.01.03.30.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 03:30:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-126595-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=somainline.org); spf=pass (google.com: domain of linux-kernel+bounces-126595-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126595-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 8E4601F2238C for ; Mon, 1 Apr 2024 10:30:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 20D5317580; Mon, 1 Apr 2024 10:29:54 +0000 (UTC) Received: from m-r1.th.seeweb.it (m-r1.th.seeweb.it [5.144.164.170]) (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 E42631171A; Mon, 1 Apr 2024 10:29:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=5.144.164.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711967393; cv=none; b=sD8iA8NXW4+Yki4eRfYvoLgpF76jJ1zNGPzW1n1JhZeYHSp9Jjcs0Q+dRlFj5sYx0hkx1OT8vhCL4VWgig28u2sCoH4kUxSS6OAXWKqhTonb89vaies8nXz3W57MTBWDmhBjblJIAvvVKrsFIsgEJWhQY0kCeQHqZV33JZpUJbc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711967393; c=relaxed/simple; bh=E2wylmEub0/+aLi/zFFLJj9ZtgqpNAZ2P2Pfi8wm4qs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=heTIr9mlNI06PHHE3EeJHr/rD5qRP6OlLDPv7DB5rTwZIEe4iCq75sIvE9ZN7gCgfi9qomXpFnHQiTE51G5MQCl/w2MZqIQDF+JXstPRKeQMP5IF9VZH+tzL39pU6rl7Ey0tlq0SYqY4wGDQ7MwzIFDjTgt+ghm1LO2Uw0Nvvpg= 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.170 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 D945F1FAC1; Mon, 1 Apr 2024 12:29:40 +0200 (CEST) Date: Mon, 1 Apr 2024 12:29:39 +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-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