Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp541303lqz; Sat, 30 Mar 2024 07:37:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUYxOQyqRKcug6wbIl7inHX5XKCvHkHN6qN6SJY32Sf4gmpaqHKU12RGZHCktT32GVI9wPbBUO2SlaBFMBOhN3si8rTXHng0qNKLieZDA== X-Google-Smtp-Source: AGHT+IG49XoshoHPoUUSxTXQfLEjHBc43LeDK0NXaf9xdLEHcnUboTdxvhrkVRGPlQcZdAgciC9Z X-Received: by 2002:a05:620a:84a:b0:789:c48a:7ba5 with SMTP id u10-20020a05620a084a00b00789c48a7ba5mr4999850qku.41.1711809453774; Sat, 30 Mar 2024 07:37:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711809453; cv=pass; d=google.com; s=arc-20160816; b=fmS9PDXWbNY/CaF3sdRKXw9HdVP/sy0ihj76LWbiN+r0bmZDxqvCuK7/itugba/0nl OnVDDxUJ9K2tW+dTuE1h9VfeSvzLqihFMebfjTDunrzAUpNBD7BDinFZvMyYSUVOkHst 7sTlG7VuOFE6X0Cy3IiS6fEkyXcaDNDoHJ2acRODfb9OG8VgSnu5rRzuE3+sZtAoUcdF F3RkhtMAzgArCmcO76HmvpvpQmqNi53aB/CFe8K4v9WaRNPoSPppMPL1GCPGfk6RVTid gsi3d3tHv18F9vgC9aobOXhtMited4xic4D4B2QnP4vtCWCijPZUnDS9gjjuVjxiNF6Q iexQ== 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=aJ6ElGYrFyYktQQmezQwKd2C5y/rvXGmDf2faO7h/lU=; fh=KX3Y2rprE/Fb3jUEQuACAKkfU+AwMn82C95VSP6USt4=; b=tF9kA0/nwYvtsNTJq507TUXML+RoWtTUFWoRB59T1fKj2/cacwklyXgRFzp0qwb3/3 +nK/a0pni6kdBt/h4AK6nu8lsDHOUjLO5Be55oizU0YGRsfWqibUyaPk+WerZC+x3JIv U/IPJ0bSaPqHqhyZIRpTEEiZjvjhpIyBZtaI2Y9sNM6tgg15G+P2j1Ny3RgZCLRbDwxO raLjdjZ34B3dTyJV/WeFTzDpT+BJzP8t332G3A4ofYrVKd9fEUuiKxYZsDCVm5G+3VWL Gj5tSj2aRiK9f4qhFdDezkPoXPyWBcj7Aeo0zFFKu/Elgua6o61CA5MVMo9I4fXKdUyp FDBQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VG+DMPCH; 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-125745-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125745-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u9-20020a05620a454900b00789e79e1857si6138573qkp.702.2024.03.30.07.37.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Mar 2024 07:37:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125745-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VG+DMPCH; 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-125745-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125745-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 72C471C20E59 for ; Sat, 30 Mar 2024 14:37:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4547B37714; Sat, 30 Mar 2024 14:37:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VG+DMPCH" Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com [209.85.219.176]) (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 8F5381C0DD5 for ; Sat, 30 Mar 2024 14:37:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711809444; cv=none; b=giF5ZLHMU8JoamhqUP3YOMEGFCu+VWeFkr2be6QM3ctRakuN7OoNvVYdU1hQVb8dRrj4W6kKKOCCx3B3mH2xhAm9hEhW/ySInOUq2fV4sPkoEhPBLGDJsOAgXmvmIbxy1K4D8JjnNkjV9wEmq88314s4UOdMn1mrqn1PRCiPBDc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711809444; c=relaxed/simple; bh=X6ODqOaKdqQ029HON8uGnO5+XwM9dsThu74kjUSfDYs=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=hIWqcLIzK99Xv3fIEiu9WkYBPYfz9TNqyAufoBnRMjQXxtPsQ4axMPaS27MI2t5aSzyiZAyM4eqLxlDHjAGbTlofTZp6yVyO/k7Y3FLn3ppr/2dSyNTsyhb10NgUedj9VFpxSxQ228qXxWsX0W/ZAJyWdekYXWfWxd5mMV0fyqE= 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=VG+DMPCH; arc=none smtp.client-ip=209.85.219.176 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-f176.google.com with SMTP id 3f1490d57ef6-dcd9e34430cso2920746276.1 for ; Sat, 30 Mar 2024 07:37:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711809441; x=1712414241; 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=aJ6ElGYrFyYktQQmezQwKd2C5y/rvXGmDf2faO7h/lU=; b=VG+DMPCHNq60uYPvy1vpZpPoQAse4Bv7IrEBQ0H2+t+Rbg5/6BjPPGNAW9DdjSrG1O NQCZwXQ1vnanmBGnuPLGx6Gz3VSEyRZSnd6aH/Db8wekszmkxpmiQxGqs7z/1hGkHpWs vgcB4wFvCERfY5Ftze9DcAuKd8iPsG3Cq7w2a9hp0N4weeEBBkojaWoLo7aE1+83CLJR OEUCmAOpdBw+PUSOewi+PkUoi3ou4kiZ37U3eA+PWaChPeASkM+5xAbI0RRNNFLfUoCr YvbFbU1iOrFj7szBdNeGdKfJPe5iEkHiheWkh1Pcn3wDHJ05z5VzwCtAb+rjZvO3wJIr bz5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711809441; x=1712414241; 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=aJ6ElGYrFyYktQQmezQwKd2C5y/rvXGmDf2faO7h/lU=; b=UU90hqqchuZxvN4BC2VOY8Jejct7JnlQ7hz4FDy/i++6Nw50CLaC2JSDM/fw/rvW3d lPsYkxMcbJP8wzW+jSfsHJFZUYkgRsOVYZC8hcpWyyH+krRbw8bVNGY59OGkWPP+/haG Zwig0BL/HMDStD4jwUfyLo2rglLGdmBt3NP3DHsFrpK0bHFzSNR1gSeoWbZusSDaEdRZ AARtU5rtlkWk8l64lmVLKBqJhuIstyU/r3krGRilvRcvM2JeOkfx+vLUbwGVkZ2/Vbtf 64sPQQQ5COxCg09IxnuEJd45wp6VWC5HIjygfpiTDGEEfNnHKQwfUoTo4Av7WMCQcOvc LlEQ== X-Forwarded-Encrypted: i=1; AJvYcCXO2IVs0FKQzI7uMSNzRit6URJFzGCefhzWrRdqBtW/hpsadR4bPEoJ95DDhv4SzUFz7P1N4RLlvxAhj9B98Dy5b5+hcYOO9GyFK3q3 X-Gm-Message-State: AOJu0YzCIUHVGuaC2zBAbe/wh+ZA3DmThF1J9Dzqkiu2Xh9u3/Ycw4sJ Dievh3PWRIIm9QDXbCZB9swvUmrBOhoy1mpaeXPJb5vXbQ6vDCOM+0hztopcHfgOF6dZTEWVB2p VswF9yGzt1+p8OS1B3IPUqkAKYQ/mr2V8GCxJ9A== X-Received: by 2002:a25:80c1:0:b0:dc6:b820:bb45 with SMTP id c1-20020a2580c1000000b00dc6b820bb45mr4279294ybm.27.1711809441398; Sat, 30 Mar 2024 07:37:21 -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: <554zkisebym7gbbom3657ws7kqvyidggfmcvetjm6vrnwts3gl@l53hejt72b5q> From: Dmitry Baryshkov Date: Sat, 30 Mar 2024 16:37:08 +0200 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 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