From nobody Tue Feb 10 11:56:07 2026 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (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 693158820 for ; Sat, 30 Mar 2024 03:59:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711771177; cv=none; b=S7bBSYcEcA6LwmcvokdT8z2YHC5W1GGBCKMp2Drn6HDcFDjBusBH0wJZ9YSaOj70uia0ww+iPIjKkn+01P2sUP76tWMHVhvITbwD1byiaG38kkwrsTbwwRlZnrjLZuReRj0QdaoUVcY03gIHnJY9tg7OBxG5woXSkHkov86w+pg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711771177; c=relaxed/simple; bh=jGtrHeHPmueVzUgIbjMS5QtzEcD+WLcUmdUWnaJLEhw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PUAvR+E67pdei0Flv6nHuGs/naCxnd/HEXpz8KWXNMkYj/qeXZyFnepEn/WKq+a/zIagEEakeic1mLzOZUoMlh+CP9xdxDDr/93cpPnlrWuHXEwsVFI8CrNNbu7GPRUlvsxpz11qFhwjOjPVwkQ8mTFl5nWqsWpdop/gXSj5JPs= 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=ZgUs3MoM; arc=none smtp.client-ip=209.85.167.42 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ZgUs3MoM" Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-513e25afabaso2729696e87.2 for ; Fri, 29 Mar 2024 20:59:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711771172; x=1712375972; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=WjzjJkPLaf/5sU8SH37VcIsolFjmu0UrsFouDXMFkec=; b=ZgUs3MoMtMRrWOqJIa3hYkKrTkdIFwHjqF+V7A2RDdzvh7xr8HhXWmW3v/PNOWKIXT lhDFH6rFP7JQVWzWnSgD0nh57/rIhn+huHlwMgFKBVu4F1hwKBmFrZsuYGmYtK22nGV+ uo4UlG7jKC/Y2ecavvDvoIQFB+MgbvXY4yK16N/GFuzaLt/2jxMRL+PSFkAm2cxI2Y5p ToEci0BUryvM17+3hUBnpfJNvIaREg+aS3kCcFoA0MGSUq4/IASOgMbtNRFWkjkoznoP dDmJuHpk2jzCLRUwSXRWThZgC4ZLABQAHDGebwd8t5NXMTNmCzJbTe/AA+cdeQvCMIjJ Nw/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711771172; x=1712375972; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WjzjJkPLaf/5sU8SH37VcIsolFjmu0UrsFouDXMFkec=; b=uW0EHj/jkHflEPV/p2eFg9DzmSgadNa2B+K86ycDIdhuwUTX6PkrVPv9oH9VmWm1rF s/UgWsEsyEFRUnpiYM0M/NjES4lY/X2o8f3VZs7UlW3t4so5qTMy7knjClxpGqJDHMzN a3HSCW+DvJ9+KnNqTKpSsyGQkj6Wk7mVUaMmz6WH2JcnKh+6ej4pi9Dv6Aqawgr7nU2W Rc0xFHFpmM780d/wv1Tmh+djR8betg7DqY/idT1LT7n23wcuC5b5M0fX1HjOlvZBjFHc VrBcGH5hDbDDgcp8P1ICQt88MqFbxCwebDQYJgX3p2neOHf1ZC2VuW6WjFtBuwxyXZPu wk4A== X-Forwarded-Encrypted: i=1; AJvYcCWiO8WtBwjJdWl3JiFDWkG64Nk5ZAaYK2DnYBENdWVFk4n064ci6BrL8YDOfxFZFvAIaAYp1HfT2dGxdZssVm+Z1DVTO0XFi0OBUtC7 X-Gm-Message-State: AOJu0YwE34sP2OgJm++k57TH4e1YlS5hkcm4GS9vVsKNvKcg71nPwFcL zRpP8H7VxWciTo2GPLt9WQ7HtqQKDDStQVbZk/OSMIyWr+xyukHoAH6vA897fdM= X-Google-Smtp-Source: AGHT+IGqVPCCB3/eyVQg9oHRpBYxv5wUfYVbFTb1Te1jY1NNi0uT35uP6k6LWlpa/PFZlqz6q6RHXA== X-Received: by 2002:a05:6512:5c9:b0:513:b30c:53c7 with SMTP id o9-20020a05651205c900b00513b30c53c7mr2646887lfo.10.1711771172614; Fri, 29 Mar 2024 20:59:32 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id br2-20020a056512400200b00515d1393f3csm423957lfb.104.2024.03.29.20.59.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 20:59:31 -0700 (PDT) From: Dmitry Baryshkov Date: Sat, 30 Mar 2024 05:59:30 +0200 Subject: [PATCH 3/3] drm: panel: Add LG sw43408 panel driver 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240330-lg-sw43408-panel-v1-3-f5580fc9f2da@linaro.org> References: <20240330-lg-sw43408-panel-v1-0-f5580fc9f2da@linaro.org> In-Reply-To: <20240330-lg-sw43408-panel-v1-0-f5580fc9f2da@linaro.org> To: 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 Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vinod Koul , Caleb Connolly X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=12464; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=YF+FNs4wpu9U2rfxEq/PVlcJ4tLwN+tWipMzmBnmhFI=; b=owGbwMvMwMXYbdNlx6SpcZXxtFoSQxp7n+K+iexlj0y5mdXnTGmYIqmQobNV6/IT+8wTu7kDz 818cW1WJ6MxCwMjF4OsmCKLT0HL1JhNyWEfdkythxnEygQyhYGLUwAmkjKd/Z+ho+12o/rVeQ/8 dDICi017bv+ZFLjO0f62olecq9L+3WuL3SbkeHQ+La0K7S851b7r2MJt4s/8A/Wbkg/0b7lTo+e x5dx3mWtViml+x547JRsoyR/qeOusbHtlSaNH3hoRFo49LvxXLnUH9mRs3suvPavp1nuJfb/Vs7 dbXDBp+Dz/29yiKnPjB1n7v+s4vs9Oy+II8jwU/fyqSdG/VzVutTlO6wK2Tgt80NP9vchw/m27N 4lJ03v4f8jteB7ifr7AhfXRTANJ76qXmX8YdKssjBRjr2eluUTZ+8Up9iWEbdRXOZbAL1xq7XDr 7rOfSRLsd7b9epqYYcfD/2bBpoqbvRWNxw/PUzBiqa0GAA== X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A 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 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 =20 +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. =20 +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) +=3D panel-l= eadtek-ltk050h3146w.o obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829) +=3D panel-leadtek-ltk500hd18= 29.o obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) +=3D panel-lg-lb035q02.o obj-$(CONFIG_DRM_PANEL_LG_LG4573) +=3D panel-lg-lg4573.o +obj-$(CONFIG_DRM_PANEL_LG_SW43408) +=3D panel-lg-sw43408.o obj-$(CONFIG_DRM_PANEL_MAGNACHIP_D53E6EA8966) +=3D panel-magnachip-d53e6ea= 8966.o obj-$(CONFIG_DRM_PANEL_NEC_NL8048HL11) +=3D panel-nec-nl8048hl11.o obj-$(CONFIG_DRM_PANEL_NEWVISION_NV3051D) +=3D panel-newvision-nv3051d.o diff --git a/drivers/gpu/drm/panel/panel-lg-sw43408.c b/drivers/gpu/drm/pan= el/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