Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1637065lqz; Mon, 1 Apr 2024 12:12:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW1PY5NrXADUq26mdvqDme4uFh4dYcSgQ0JSAN4rrHkOS99GpT2a/xaMa/5dWvt5q8JATXIGv7uB4YRCIDpeGIJEmOKsATPh3sMk7GUkA== X-Google-Smtp-Source: AGHT+IHoZPfRyOnvzzhew0lsGStWfk/5UBUQONiHCOFJWrw0fGG2mw4DqVd2dYemJgEjQBH8kNmx X-Received: by 2002:a05:6358:5499:b0:17f:870b:9dfb with SMTP id v25-20020a056358549900b0017f870b9dfbmr13831757rwe.0.1711998730012; Mon, 01 Apr 2024 12:12:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711998729; cv=pass; d=google.com; s=arc-20160816; b=xt+iQa5HRuFdKCaWHqsDxOaLIJPvEYZI7EW9Rs7LxtXTsCpGHXXTrRCNLXnTXyGLLj 2iCw3ZqUyCEdW27ptRvbKnQA2/IoGG4okmsjLaUKSABxxNaSeqi0nsrRQ6E3dvAc70Rn KXzXqgKISp61CUY0zqrfXAV7gIPVZ9vXl/WcQrzhA6+046WSX/RwFgIrSCopjbBrCSSw jx4vHF7snpgs8TehYQB5Od36FG+ENwwNYUXOi6ImE/7d0Jxeel2Ion4yeDeyeWBNuuOH TDe3zoL+vQgVbf7a1ZTRKQ3ZHRMWfq+kUs3EkG2xOJo4D7fNxonmzGyHMgLkqwtbmqqm YgPg== 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=kk7Hyn+xpvgbM6tKLNLW7TGc/bsms5PvzXNhL2wyFJo=; fh=9fDKeRpNsWNSgvfzXqg0whhhRgH5i30CpmGRA6epcsU=; b=J6/pmOH/SVgIYe+NlHjfgXh9oCr+mOkrJig/fx+oBfj2ML2B0yT6Qsdm5dZWceiTAl HGUDo0ZliUhNfetGokfW8K2JG7JV5B2cYqqSmSPG8iwPjVk9I4HXeL9++DuLue8OF2/P l0zsftOszV4N5xRdq+oERV6FEy+y7GfVZZuxhFKvh/K3HELpYcQ8VpLozCwUjVM9B6d+ FR6BAiNucry+XnoPQbIjSA3WJumX6nYnUdHvjkjWc5VSs2dyjzzOynte3n482pMhlgII GJnUMOaUFatTY7IXtVj7tXcRWf2rCf438qh29s7P60icISCrDURrKbGpIDc8rcjsrj6c diEw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="wtF/avTZ"; 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-126978-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126978-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id w15-20020a63934f000000b005f0a52625b1si5092737pgm.547.2024.04.01.12.12.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 12:12:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-126978-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; dkim=pass header.i=@linaro.org header.s=google header.b="wtF/avTZ"; 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-126978-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126978-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4ADCA28273A for ; Mon, 1 Apr 2024 19:12:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BBDB5524DF; Mon, 1 Apr 2024 19:12:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="wtF/avTZ" Received: from mail-yb1-f169.google.com (mail-yb1-f169.google.com [209.85.219.169]) (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 6FA0A22085 for ; Mon, 1 Apr 2024 19:12:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711998723; cv=none; b=JyLSn0hqUlD5awT+1x2PukUVYieX6GsqXlG6Q79RJNJ+COzqvAuMI1UZGExniwfOd9dQCz3wFWn+lt1BjJ53muQe5QnsRuILPeplXpxXnxje+HG+262W+PJBWK9J3zzyvV+1wtucek2ly8Mbzd9mXy8OOtIRcVxYttUo0cOEOXo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711998723; c=relaxed/simple; bh=x1zz7MdsTCJuVwQOPljsjb0GOlEYI8qTxfhUzxNEV6U=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=JNjrz5EKYzS7OkTMYF12VKh27OIWwrXIfFQHsItnRx9bd6EBviPvFGEn7YrU8KY6swsDwmIXBa8fuD7hTUWOcG1h4LMtvtha6tsoGR7BsyWh6ksqcdldQHtY70HR5+Iwyed4acnIwd4Cf0869xoHilkZUQfnpkYYAw2YK629O4U= 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=wtF/avTZ; arc=none smtp.client-ip=209.85.219.169 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-f169.google.com with SMTP id 3f1490d57ef6-ddda842c399so3098406276.3 for ; Mon, 01 Apr 2024 12:12:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711998719; x=1712603519; 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=kk7Hyn+xpvgbM6tKLNLW7TGc/bsms5PvzXNhL2wyFJo=; b=wtF/avTZ32pvL8GullRZm8YDpT654tFnEEkn5na1T6m1fvj7Oq+JbjyR4kRrXvwJTo c1/974oyi4pTZGJOM3DTAVvQmwM4zFMDCSj7s4afn7GMUTbSwBiXmbhON2NoW7gOsxvC LjONF+lJhw6VpP9+5cqEUUVbUAAUKHG/dlq/2m8ZgWN5s1LBd+ZP6LnWo7gtOK+GRdMA geiqk7+RSr34ZclzLVwWUc182ZcRn/Kx9M4KnXodQfFFbseaqx8+8dI0W7QdsGEzFGEN aqO4A6wm0H6Z8YwJFngAfxjJ1z5gXw7wz/qXVOVLWUDUHqJH6c/y1tEgNu/PR0kjMRkO 0OtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711998719; x=1712603519; 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=kk7Hyn+xpvgbM6tKLNLW7TGc/bsms5PvzXNhL2wyFJo=; b=YmdcIl9IqxYvdkBMSww9B8b/IjSVr8pj37xqFKtQSwflYTg6sbRJNJc64ibYl1gQrA AtVvZMAxzvcUxAg/cRIP+JSxNX2f50dx/xe0TANuf/DSlbcBjzPhmnY+V04q+QKm+0tj rXPp0E4pmmXYLu/nuiQOtx5rgGblXqutPoCQDlTZ0ODDUyFV5rfk2omUR53skbUew4i0 B08WzqNANU0nOJKMSAFh+SvbV6y1//jJMa2LpM7HI8paTq1qdu09UnVSgvVgWoYJhi1X lJOscsNJx1VqsGH2wpbzvZhaKSE1O+X6iNbzigKQtOmvVYvwjFf6cZmqidTboEEVZgyI HLaQ== X-Forwarded-Encrypted: i=1; AJvYcCXUm8L1tl8mhaQaMR3DD55V9DHJOQscZYunV3b0/3CKgTGSrX+tkiBGEsAG8XwWM2UCRn1trA4jtEhbhqXgo3KsWm+W/kTDzb90THG6 X-Gm-Message-State: AOJu0YxOWuzkrbsnogm7JhXn5Jq0amlv81vab4SxgOedkoS6oUe7heaa BkCqOXpu38PaaX/xQMIoOvrK6eu3tz2ONrBbcFr/yRB97+3RQNLPZGYXRqHK85yUAyvwA6NjBqS 0LzDkIL1+FG+Aq13Ukbnn7EjJs8an/FwVgRZv/g== X-Received: by 2002:a25:6983:0:b0:dcc:67a7:430 with SMTP id e125-20020a256983000000b00dcc67a70430mr8993468ybc.15.1711998719359; Mon, 01 Apr 2024 12:11:59 -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: Mon, 1 Apr 2024 22:11:48 +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 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