Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1753225lqz; Mon, 1 Apr 2024 16:54:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU5sh9iPv0L+fN5tZ33yX0PIhqt9y2WFuymgdAJLt/JbLJj0q58gFGJ7crz+TkHkTa/07WZ0Iv43bbqeoy7WavSGEgUn3LrpxndqoSZaQ== X-Google-Smtp-Source: AGHT+IEvRGQHLWjuskzzGIjEwwSLYwogEZsTxy5dtf2wLgwSWnQFyiLXWJHmxqgw+n/snvmKJtDI X-Received: by 2002:a17:902:f391:b0:1e1:a74:5531 with SMTP id f17-20020a170902f39100b001e10a745531mr8499953ple.36.1712015642865; Mon, 01 Apr 2024 16:54:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712015642; cv=pass; d=google.com; s=arc-20160816; b=p3r7T26cv/N3kiEs+QRfIM9qrlZTBWLVlWKS8mw+B6jsoPRaldhZmFbyFQCiClUcVz DyS+5eBGVwXZOvlN4icYMmVEa+jfmHey0O6ECM5J/P8EXx+/WSxA8arRLMHnN/QIEIre 41iF2kUUEWRFZ0VZZ1g0FPsQFbLnLYhUrwuCXmOmKjLxyEdh7c8jPZwZTQjP4JNhwgjd LqJrDkzfllQWKhke6cwKorgQBloBl76u9QoQrrzmh7ts8nRIG6IWPpj8PL3N5Dd0uh1D BHqM+c2NKfdtTeZcdd0Ha7oVfG57b4yvUwmz3H+dmuAUXw4JW9ZcwyGzH1QNL4qGhsN3 w7WA== 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=TImHaMPxC7KJyi9PLNXdSBnin8efgauOGmSl1YeMQhA=; fh=4q57Hh1QmztjL/8ql7l+RA/Rpi3j+1KTv0h98ADss3w=; b=Ezs0xCIUS0KBBmVTCXxYvH+o/5Cf+M048bL9YN3mzZbntIRMTjhF3e6NlKEyLoTM99 oL7wZ8QdkYCAXjYb9hkscuG2KXtNOMYBKAEt8bSaigff5TSJ4QZUowFyS5VN85nhErWw nVl+JvzrdkjstkHOgigt0wHWSjJxD0nuEZ11gtX1E15mCkdJyTnFBaJDMypxxq1hMHDs qBKNwb3DCwSx/9Hf/x0EcgmQRq919d2tyegbeuIlGhiarlFZFt4G6C6yilzC07WfyIRp RF5Fc9ypwscaWtqqzqL9AWTnI64oFnKrXyuPvw0XbSbiK5mwgO5GwGv+RZb2+eQw5qSY k9OQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y4QaeIYt; 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-127209-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127209-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. [147.75.48.161]) by mx.google.com with ESMTPS id l8-20020a170903120800b001e0b60f9063si10294430plh.369.2024.04.01.16.54.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 16:54:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127209-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y4QaeIYt; 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-127209-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127209-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 AF9B5B22BDA for ; Mon, 1 Apr 2024 23:52:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E113B59B5A; Mon, 1 Apr 2024 23:51:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="y4QaeIYt" Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (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 0BE735788F for ; Mon, 1 Apr 2024 23:51:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712015481; cv=none; b=o7IsHyYHD8rceAabEWMAfXS6AOSEJakH6WyS2TnammVWkH3yz2vEZ85jyz9MvTJuOcUUMOoyYhYJt7RO5Gj2tNQ3fAldnFKGTmPllkUhrJI3BGaHVWgiIS5K9ystZwnMWa76jHG/yqAQWXzvOYg4qZ8/P/dddm9oVNVYuDP89QI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712015481; c=relaxed/simple; bh=+8CADZiS2wkSVK8yjmnv9snx1iy+VJCJMa45DSXJIe4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RbhvPbJYz9hDaBUOyACFdGZFg81JT+hAT4kb7L8Wa2XCudARDPUXju0bBjkS+5zP9BOgL8aacKvAax2RU6d8HNjJNuCe45EI+fz/TwgELgwz+nC4pSv/dRi51S+P/0y0Px5EgLTRoAGwlM9I9xytvD2OO1nXDPF4e1qaA1XdL48= 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=y4QaeIYt; arc=none smtp.client-ip=209.85.167.54 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-f54.google.com with SMTP id 2adb3069b0e04-513e89d0816so5322482e87.0 for ; Mon, 01 Apr 2024 16:51:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712015477; x=1712620277; 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=TImHaMPxC7KJyi9PLNXdSBnin8efgauOGmSl1YeMQhA=; b=y4QaeIYtvTgnohWF0gpdrF7NIkmCU4eLlS9DGCy+sLtrCA+H1bDmUQWWnb6T9cV+i3 k8YbiXKY/ekLl/+8SSM+DBdxNYoq80IUBfjidNwl+iXk5nnzb2n+aGrtLtW4XMQQrCQF iNwiNiRlSJ4IIl6lFvxWrkqY++gTQIXi5dytlEQMnm7JykjoHbUeXSBTvwryB++uRCDx mldeexfEb4N6Qtizy2xmjDDPxyWYo2ZUTFgynzp9YZXOp/3bnxPMjiVCdjGEEQfRv//O nRH51vfY/t91FbE5UKLeS/7vaZG2AcA/ObNg2jccMNL3ZwdfYB6HOLLft1xwQr7fw4YY f4aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712015477; x=1712620277; 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=TImHaMPxC7KJyi9PLNXdSBnin8efgauOGmSl1YeMQhA=; b=s3CPcLxdQSnBj8uw435FoRV8HhkHyBhRRlPjWRDawcpfDTEOCchg93EBuLxn7mceqs pzyxAFBhNJP2TKUBJzDhRozr0F/SxBx/WjoCaPWQVNHMRICw5bQ7ySM/NpOhrlbyjitc 3/+6kQg5QWHZodUKD/0AEuP/0O15hskNEdLtynZfcs0CFoiyrytDhGaDSkbQ17eYjOAf 9K2xN2yIBgrWm//IRJCMq8O+vW/o4F45c4PVRKJAz1xAhpkyLEYkQxbsdN1HG2r00mEi +0l5UbMgm5t+6PFkrOCGKEgLk4PH4MUmzTDbmXp8OjJW98cC7gVW/XsZaKW2+zONruA0 3YFA== X-Forwarded-Encrypted: i=1; AJvYcCUCT2e/k8U74M53BKEGXHjtgojqNHjNxLIAMJc+HTjFHkicnZbvF6+ehyqa19dr4SJb4c9Fkx8xG9CR5Ch+bOSf+Za40MduDvBVubdY X-Gm-Message-State: AOJu0YwdANjSZKf3Sbr7R6boVZYw74H7RjexRf4KJPs7iCTVoYU3u17Y e/e5hQJaAzWFJmRoDqQ4tS/wpgB3JejaQzJVuWjzyqXP0YLLj1O66dLLhJZRKNQ= X-Received: by 2002:a05:6512:3b9d:b0:515:d16b:5ce5 with SMTP id g29-20020a0565123b9d00b00515d16b5ce5mr8784160lfv.7.1712015477198; Mon, 01 Apr 2024 16:51:17 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id g28-20020a0565123b9c00b00515d127a399sm1176135lfv.58.2024.04.01.16.51.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 16:51:16 -0700 (PDT) From: Dmitry Baryshkov Date: Tue, 02 Apr 2024 02:51:15 +0300 Subject: [PATCH v3 4/4] 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: <20240402-lg-sw43408-panel-v3-4-144f17a11a56@linaro.org> References: <20240402-lg-sw43408-panel-v3-0-144f17a11a56@linaro.org> In-Reply-To: <20240402-lg-sw43408-panel-v3-0-144f17a11a56@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=12340; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=MNtQocnhPbn21d01nTwkNNinrQdzLkyr8DRma9TIYVw=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmC0hxpRxbtYshJNrsXySDiZuVd/ph6njfNGCw8 UwfIDVBJuKJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZgtIcQAKCRCLPIo+Aiko 1RUqCACOH3WnFeD5VAvBwRUPH8zFdYMJMfHVIdncB+aoeA3We0Xr4uzyWrGO5WlU+pHiFRiL/Yy nM47AFrfLzljAjlowxd3NaAZdB3NPRznfSP0zUTxkWN/DN43T6KbdBnJjoRgmpiHjgIEXWqR7pe u8R4iA45lOBIUm4IRNsV/t5T5vMhN8JKItNZ02Z3ofnJZMer9fObN9kaLa71aRViy9apI8GEbEU dQzCgRPHhcgxJS+6+H0o49iqee4Xn7rWoCWADCsDFX56PjZDwxGKpVONBpe1D5YK/AM7blAlgIm /w1RvK4RyZBLVcDehP6H/dKAa4HzjAqNHipE6J/iGIFkINED 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. 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 | 326 +++++++++++++++++++++++++++++++ 4 files changed, 346 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d36c19c1bf81..4cc43c16e07e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6789,6 +6789,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 6dc451f58a3e..a55e9437c8cf 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 24a02655d726..0b40b010e8e7 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..c7611bfa796b --- /dev/null +++ b/drivers/gpu/drm/panel/panel-lg-sw43408.c @@ -0,0 +1,326 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019-2024 Linaro Ltd + * Author: Sumit Semwal + * Dmitry Baryshkov + */ + +#include +#include +#include +#include +#include +#include + +#include