Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp332448lqz; Fri, 29 Mar 2024 21:00:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWyvgIGJVYkKzB7yOl1SdcgZe6b7cjkHDL+AQynTN49aayE+GiJHcyMjd2V7WM7wPr2iP4uG1lcS7JLD9a7HNnvzx3UFutzijrR3wHwog== X-Google-Smtp-Source: AGHT+IGrCZBSRT/riO5IfH7ay6cZ4CjQM92PiMNyLoZl2vb3JelxSWN4WtENzIecbVsLXTznmAzw X-Received: by 2002:a50:f683:0:b0:568:13f5:81eb with SMTP id d3-20020a50f683000000b0056813f581ebmr2294989edn.38.1711771229068; Fri, 29 Mar 2024 21:00:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711771229; cv=pass; d=google.com; s=arc-20160816; b=o3iNou7oHDQ7vs+0kyhjOQF+VFQWzuqvKliMYyoDRPVN0ykAYZLKkX13iPf8GNB31T oZtm8FeZa1RSnHhUofP2rDlwmKudwF0fXSN9G6EC3KQolc8zexvLyh4RyCl1KiKI9OaB IqD1hglL9RN3BP0le5gX+RKUU/RV059UvTKiUD9n7QdTAqerGfOFvGQjxdJYajNTQPBO HC0X1TqDY+oEO+BJl1KUTl5z+ym3H1iWshHbN72wgmWFaw1FyProAXZlTLYHrpQXsyRJ N08xg3nfzSMoQeIEU+vS+n8ZuMTISl+Fu/M6r3WU+nbmtYGbxeBa5x2qg9Y9j0Jy73Sd KzHQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=WjzjJkPLaf/5sU8SH37VcIsolFjmu0UrsFouDXMFkec=; fh=0hlLY8BEoep7bBFE0ZBbwurnUEKd8QaxP2HQi/FNTvQ=; b=wxhUWQlGBS1ic13NLL6Bl1Rfa8juAWdBSos1RwYNx4FaoxHbMWB6A9hTYT3ssEQxw2 Ntejtv11N62JuJ73Cg+Wm7M81MiDx7FaAFkiYnpY3cXWapgqGwvI5ynDS5SDU0N6f8yp wm7D0oK7kWtT/WtL6bMXmv9oYgydqnQAWJ2HizMJpQaUwC7DROoiq65qimkxXK1xVfW2 c208JnKKm1QRHri2OmWwehot1UZ331sPs8b5fs6pGGOmD1SWIk1gF57g+JUCot3IgB3Y 79rg8DAliahLOIqG0sbxKG8H6g5gBvDhhKotr1wKG96+MFptBxudBudSIFL2RcTjsd09 Ktsg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZgUs3MoM; 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-125595-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125595-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z2-20020a05640240c200b0056445f4ade6si2565800edb.234.2024.03.29.21.00.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 21:00:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125595-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZgUs3MoM; 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-125595-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125595-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 648241F22331 for ; Sat, 30 Mar 2024 04:00:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 474B7101C8; Sat, 30 Mar 2024 03:59:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ZgUs3MoM" 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 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-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: 7bit 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 +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