Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp446337lqz; Sat, 30 Mar 2024 03:45:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVgEgPCMO8Pl7T35sn036qDG1ZzoYRRL3doGNXAurTmthqzSMhiMPw8K4KyuaWKWy5T79Tbc5DzxMKjIX66TlIHBRlZNd79lHTrmG1Imw== X-Google-Smtp-Source: AGHT+IHhhaIo1xlxFBMDYazNPcYuvYY6Cgv7cP8a0jSbWjlvAbrAXCVS/Y5LFjIVax1uCkw6J6Ul X-Received: by 2002:a92:c262:0:b0:368:9d53:2595 with SMTP id h2-20020a92c262000000b003689d532595mr5686959ild.26.1711795528576; Sat, 30 Mar 2024 03:45:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711795528; cv=pass; d=google.com; s=arc-20160816; b=MGBTRAhP3z7dibr03QA3YbUDzaasdoNRpkrMsExHqeC1lRScCjTpz0LamDheecKzRz ufdkR4z2yEOHqWTJQVNvrEuCqtywf7XLN8HL14woKfp/4BYVz28R+KcMGq1f6tm7i66R Ojlhn4qBthj+sQ1svTrRvdSSlcZ93UVqHFxyOoNVJEel0OXjtyRLRcVuRrMFwOQwFecP 9KHz9T18iHEkyaWSI/uSUhWRWS/uo5DVnuyqwcPlyitoQYsFO3gVYbUljyUaCI8zc4aU ZrldvXY63XaeY1Crivr1rvIYPNGuO8aMFKTMPBxGwNiBl19nOT6LyYuEl4AF8mCqHlM8 OwpA== 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=nc7zZeICXl4Y9Ig2aiqCUWmGPh3e9IVMMhZvVH3hNhw=; fh=VyAv4MXqqCUVajaTa91XNW3HtMLtv/8y1MWp72AOgns=; b=OcAn1Bhx7v849fCWOgXFs61Y9fANlvvgVwR+vWZT4QiEEiSQE5guMMCvnUvedtRAD2 wLUQTjD1lPXDDnfySuJlMtM0G6jfzOHQDStckKGvDfekpoXoYPNaNtbk4iZTElG+w3gD Ft2Lou4Jt+lj6sc5E4hgDLTicthKWw0h24Yp5RkimCGwOzqYvECB1QHho7IIFxx8S//Q CqRcx/p3bLxj5jaQBXGj6ND8xHeWe402tAZd1dcBBAxWJgum8oSPLLZfWXN+W2NK98ly lwzTC34WGBdoEmjTj8Y8CThkQW4sWZJ4rFGB7ACk+io5bNN3TMm8qPNKtbt2E4xXlWEg 1Ryg==; 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-125674-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125674-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 e4-20020a63ee04000000b005dc9054610bsi5494330pgi.307.2024.03.30.03.45.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Mar 2024 03:45:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125674-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-125674-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125674-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 399A9282C22 for ; Sat, 30 Mar 2024 10:45:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4EF4329CEC; Sat, 30 Mar 2024 10:45:21 +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 14262847B for ; Sat, 30 Mar 2024 10:45:15 +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=1711795520; cv=none; b=WcugkkU6tb5csh4PX9OZdgHVsr1P4062beHTLdN5WXB4kD/XBuDzqhxqy0iPmBbIFbPCyI6lcPyITUvT50HGxQDPT1t4m9LzKkIuyIeqyPbVQRVtKvjEJ/H0b/0feN0wwD/W+lvqG0yLI98RVsDtld8hdF0n9V1Z7vVYBVdTfDY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711795520; c=relaxed/simple; bh=c8N08nzajbS7Tgl5ZlzhtT3eqkrPtdhcztfed5kdWJU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NK4Nroftp0nAZ1N8etIzlc+Bzwmo2WUAU5ePSJ34UYbs2HxcXa8TBGYkys7N96wg9sPeBxdUseOW2a5YYxTlqHbISoTl1o5AjDVmx+uhWUX93252zAd53PUO7/eiKPka0k8bi/08qkV5GS71Fw8n6i6MUV9KV4l0YGr9kg7UvL0= 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 750A92025B; Sat, 30 Mar 2024 11:27:34 +0100 (CET) Date: Sat, 30 Mar 2024 11:27:32 +0100 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: <554zkisebym7gbbom3657ws7kqvyidggfmcvetjm6vrnwts3gl@l53hejt72b5q> References: <20240330-lg-sw43408-panel-v1-0-f5580fc9f2da@linaro.org> <20240330-lg-sw43408-panel-v1-3-f5580fc9f2da@linaro.org> 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: <20240330-lg-sw43408-panel-v1-3-f5580fc9f2da@linaro.org> 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