Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2418082lqz; Tue, 2 Apr 2024 17:51:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWkEkYd421GZgcyHwhGYrtOpBZbgSPm2KmYyTWSKDKIH+Y9SSCHh1/tDBRKQwzwsGBwuLH9vRqU55wWuPWiESekrJS2xPZSuDAwVgH6jA== X-Google-Smtp-Source: AGHT+IFQPiMArh6O5F+/enxjTjQSngYW2DV5d6vHAa+51DOeDsT61Fp44JyhJ2aKgFcGrSqkNAof X-Received: by 2002:a05:6a20:914a:b0:1a3:c512:580c with SMTP id x10-20020a056a20914a00b001a3c512580cmr15223244pzc.9.1712105510807; Tue, 02 Apr 2024 17:51:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712105510; cv=pass; d=google.com; s=arc-20160816; b=urezpnVZ8KCqzad9w5DFXINB+iSMkwjYCkk7yXNDPSAPe/9N7ugmqiegkEt5aVpjAT PFzatbil4JSOwTGVVaPnxFXs+boP3k14aUBIdFyXje725gUURHRnIWhkxrs0cFb6nqY6 PXgCwzWmM/TkPR2Zv7s8NSjiuD4WHkZmgnvTh3fyD/uXzgsGDX4N75urLxOVQF6GZxXm 2+2WGSb+8d4jd2YLRG8dVhw49E2PkllSZBRni7PwA1ESbadulc4XtkgwLUu6jbJloClk jiojJt8iQMuoZR2G5EtEyugyRHmuL5PQIr/3p1P9ZvNb1w2ZWIevB5+pXMpTXbzBMjSW Sa5g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=NNfAfOqwnizaLfnkW7XQbz4Wiw97ypK4zCmV2dzlDVQ=; fh=zW/+Mj/FabrR5DQeLUYdrnnN3Nq8lDJBUe1QuKPrBcg=; b=04cTQsd7qOKOHcz5kbFjIhJYGcIZbfNFgSiHX2rRb88/qRTTRzIWzYRTeZCkSgqCNh k6p36m1VU63qzTGnOwSruBhBem3KouC4ezk5M6kS8WZaPsgW3qIE/gcTXlwBKZxtOsU4 qlMWK4xHzIeYCQD7VHzjzM8w9pR9yWjEUOoH1o6Y6vBvZ0UeAOaxy/Vl5GPFNz4OiPEg H0kIoiwkvJNnyPwE/rYkP7/TmJbMmpM7KsguXNtshEmoWCO59lEhU8Ns7jS4GtUIDjG2 6yROQPTkLjEPqAh+ZgyldGNFWT7iLVrjFj1HPrLbDM9obUrLptzE1PIXiBZ+T27y7CMu He4A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Js3M7E09; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-128891-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128891-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id t22-20020a17090ad51600b002a2104f345esi10318076pju.89.2024.04.02.17.51.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 17:51:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-128891-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Js3M7E09; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-128891-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128891-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 0FACCB21F4E for ; Wed, 3 Apr 2024 00:37:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D345D27D; Wed, 3 Apr 2024 00:36:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Js3M7E09" Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com [209.85.219.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 10B3017C8 for ; Wed, 3 Apr 2024 00:36:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712104612; cv=none; b=FgPpKxmvsUHJ2RyVO6GR6rn0dEzuIshVhKAq0W3qJ+F1ehKgQzWMZFpQerd6/GHfm+glyFPTlXRHxt70qCVflEEAGB3nltdXbkLrZCvIdxMiHakUeZ0T5OcERpE9dzvJbsmwg/6yaMV7AIW+WtPqcRNizOZmSuTBZXpmdWu3Pb8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712104612; c=relaxed/simple; bh=9o0SYy5CVgwzI8UVqOnxPd3o8m0wfqi4eghSlwDDHjs=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=U/PQ7tjOEbcuds6Fm6byc8qa1evJzI2OLVZQOGTQMle+qzfNU8Mjm7SOkZFpAL0or4Cmw0+OcfryOD71nHq5bIRbt1Mmlvl/r3WmKBfrVPAVRsCbR7Xtrz9A9Y9d4TKc+AN6DyJPF2CZujnp7JOBg1JsjyT2HLUuK3lj2iDgcCQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Js3M7E09; arc=none smtp.client-ip=209.85.219.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f175.google.com with SMTP id 3f1490d57ef6-dcd7c526cc0so5422393276.1 for ; Tue, 02 Apr 2024 17:36:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712104609; x=1712709409; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=NNfAfOqwnizaLfnkW7XQbz4Wiw97ypK4zCmV2dzlDVQ=; b=Js3M7E09yzwXKPucP8K+4pGiF4ezNcaOYYS8vjjaM0Bu78LPZYS5DsQpwG904DGt8y g3OSBZurcRIE9FXY39bvd/ORFgUnrDfOXl2j/O5FGz13QW9d1qEw0fDGon88Z8wS+0No FJ1Cy2ZIvR5m1LsVOeNw5XdqPCFlo1jdhgHRCwjgIFb4Gn9UVSKNBCdwHFUA5OApCz9Q gMr9E8I5A5+Z+oYIXrmLLGGj4S1nt91zI8HpzyoGxNsUCltSha1FucjDiMhSo9RReWYB fsf1I8Zv5KZ2b8LJcfp/6by7StGt+vNKUp5SXaNTWuVVGXI8sXaOkHphecd2TXlK0L3n 1ybA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712104609; x=1712709409; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NNfAfOqwnizaLfnkW7XQbz4Wiw97ypK4zCmV2dzlDVQ=; b=CYX+wePtbjNmBd0lUA6MqESXizrL+Lf/YFMsGRnXYZvrk7PB6IdOQWbGCmQ4N1VYeQ gnA2hkv0geqqH7Pfw2NHvx7CNObHeS0qr2Nbz4anDeWIzgYSi3Y7A3r3J1TzsGWSSPgH WdgPmu632RT5KTQY6jJ9sCsLpSfiNhv0KDl7FqmVy/SolWig0c6XWtdXpWRIsKXBMHpe F4AICqZNtEdpJ7creUho5P0rzj45buyVNYj5BUDS30rfl7+wsdB7U0a0RwhJBnpjA727 z2mvzr2/BlI/rXFU7xXOnfVe/6+LqnGbcectXpD9BiFauQr/nzDmksKlEuq8o/rScPW9 /Prg== X-Forwarded-Encrypted: i=1; AJvYcCVV+1yEUHLvnVh+K237pJc86rEgwW0IhEHlOqaPPIpT8Iz4JqWDMSAfD+TYmYBaaFrMCTDhsm9twOa0G1aMJ0LgkEKBxEhHniFgHcwb X-Gm-Message-State: AOJu0YwHCJpkyqhqkU+F8wXOhyaLuKeOJuv+KhZYW5bMTgo3A8eu/zaq AAXnnPQHjFBXXJvfG25pa3nO0U9yw8Vdqp7aMYp7iyRxe2F8N01RTvr667acNGDCXqoqUCLyvXY GEPToOs0zkXZ5e4q8irlD+SdozgXRFvul+IRN8Q== X-Received: by 2002:a25:ae8a:0:b0:dc7:8c3a:4e42 with SMTP id b10-20020a25ae8a000000b00dc78c3a4e42mr12455333ybj.30.1712104608945; Tue, 02 Apr 2024 17:36:48 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240330-lg-sw43408-panel-v1-0-f5580fc9f2da@linaro.org> <20240330-lg-sw43408-panel-v1-3-f5580fc9f2da@linaro.org> <554zkisebym7gbbom3657ws7kqvyidggfmcvetjm6vrnwts3gl@l53hejt72b5q> In-Reply-To: From: Dmitry Baryshkov Date: Wed, 3 Apr 2024 03:36:37 +0300 Message-ID: Subject: Re: [PATCH 3/3] drm: panel: Add LG sw43408 panel driver To: Marijn Suijten 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 Content-Type: text/plain; charset="UTF-8" On Tue, 2 Apr 2024 at 23:57, Marijn Suijten wrote: > > 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