Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1048305lqe; Sun, 7 Apr 2024 16:55:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXskN8SFL0iRout27Pdk0RO6A9vgwFpBpDBFtsfmIKxCKtrWhjBdzT2Fy3H843g+9pB9l37zc8kCJ4kLPfWc2Dyf8A8EtfTI38VD77Qiw== X-Google-Smtp-Source: AGHT+IFgRKDIFfQWAA+kjFBcuI8QujHBDa7FCMKW2lZdHBem9I9o5vODWAULFsZskVcFUVt+Ifxs X-Received: by 2002:a17:90a:fb92:b0:2a2:da5a:85f6 with SMTP id cp18-20020a17090afb9200b002a2da5a85f6mr9861290pjb.6.1712534129021; Sun, 07 Apr 2024 16:55:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712534129; cv=pass; d=google.com; s=arc-20160816; b=WU3ojCaKQPISwLgZtvxGSfm9uznlwz7NH9xJvv47Ec67DtVMgy43RTL3qeUl9bir4F q9O3JPRM47UY+jzyQG0lf+iTP61tTEcBA/hSAq5/ei/gZKoQc2Cei6LN7LSamAu2UdxC GChH5coVCxMt/9SkEx8dx+A5m8Y1X4xUJ7rnlqOS1XUKlL+bDrXjzb6m/QPO+2UJzy+t +P3ngY/rjE7dHdTIMi1vC5JvOFatxdCgyv05/LasJedgGn0mzVUaGhQdL3i1qYc6KKHF 5VOp94+THC1b/HSg3+3wsHsm5tO8fwQVv9IFaDzkVdGiYzeBLh+cKf2ZQa9Dw4o1bXHh ZMwA== 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=W8cZ4HjrT4QF3C+ZxK/HOdz80vfMrRJrlKKl1sb7th0=; fh=IWl8fx3Ktb4E/sRx176ginZSx5PbBQoWRltoEfS+Rfo=; b=vfXJ7Cp49xi+bzNII2c+hMQsKFRiEeW7K2MpDBqSAePpJVoaEdWOxj3Ls5l71VDZvF jgqw/WoeV9ND0ITTcKm5o8sdDmodzNWlow/I1ZQu/A/eWggDsMYbpNba8pOLLC+QEDbD iNC87NGtNLc8Hq/3AP60zYDyVoGpyE8pf1e7QYjXT2HCsRheTeOkRW/9ROLkMb154AgX 5RpKCgFDpmDKCJEzxuyiK3QVV7WdWtQiu4UxzmDUkK+Zoxz/T+0iXL+CWyALMwIPALg2 cku5r/L6Cbboo9CoHAYwx9FG6GWQet0T/0wLYo6GSA+zaDaIuCZMSTbyiFIVpCs+bJUU BFYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=te8oMd0g; 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-134678-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134678-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 y9-20020a17090aa40900b002a4ed388b28si1599750pjp.82.2024.04.07.16.55.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Apr 2024 16:55:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-134678-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=te8oMd0g; 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-134678-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134678-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 C83482817CC for ; Sun, 7 Apr 2024 23:54:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BC0E84EB23; Sun, 7 Apr 2024 23:54:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="te8oMd0g" Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (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 014DA45951 for ; Sun, 7 Apr 2024 23:53:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712534039; cv=none; b=pO/PiX5JCmgkZ6j5LODEKzCERaWHGRnNFOpAmUek96g2p2nIp121JZXRDE+8bA9khev7Ey3GUvQBVbakFlmdrZg5pL6q9UH+/FFU2FWSv1eWRV9ySuMeol03CqMfvEaPpdNSZO1PLhLQ3n0KeheIv+YAtKZfx1c3AhtVQ60PnsY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712534039; c=relaxed/simple; bh=gZ2vNyEf3xtWpmG35b3OtW/LriwLRLam79OQMzrL4n0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mOolDruW2qLK/NrPgWOqFUwTuqs1Kc4JdG5CWu7dL6BIjRpMqFGHh+ENFZMOcQl3kl74WUgBbsLQPtQZb9BPWX5J5cWMEM6P+3QsJsqme5LUpBiO5uJTfji76htdQpRW4pb8TfgjxjCGPjX/eyv+lBbOeRAzFO16MQRz7jAiIr4= 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=te8oMd0g; arc=none smtp.client-ip=209.85.167.48 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-f48.google.com with SMTP id 2adb3069b0e04-516cdb21b34so4835351e87.1 for ; Sun, 07 Apr 2024 16:53:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712534035; x=1713138835; 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=W8cZ4HjrT4QF3C+ZxK/HOdz80vfMrRJrlKKl1sb7th0=; b=te8oMd0gdDQPQ40l9NC8gM6OAFHoQUKlKfzScLySf5S89fWvWlcJJ5bgf2to7ZTWR7 A+MP36z/eMMluSdp9QgbiRf9dYti1qvQI6JAJxQT5fWfSzppm531JvnJSP808qaSiUSE rpPB4TMWu31ArYBEMKMkN9kD3fH/GWOan71oG73BsVwUlzqKgaTAcjvMIU3iPSIFdnxf XD4mvcQipnrHNkzR531PulvF6E0rgVDhFl1q0tvBQ7VlQWxJAvpxZeEWi0z405FqTJnQ jHaGWiH2p+S4aY+s9VCE8FCkXgkv9mFUt5RDKxDJ1eBrSm+pY+4dUfNc89Lxk2Ygs5Nk j0nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712534035; x=1713138835; 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=W8cZ4HjrT4QF3C+ZxK/HOdz80vfMrRJrlKKl1sb7th0=; b=i0wblsrjBMMKjOf88fWmNtks1EBK9t9jEt2/575CsGpxFcc/bF7tkH1I6sgDumAeuG PfrlWAeKsX/zt6M20fXDaWahvZxQ/F/IVPkK/VaXR+XR7fh6KNPo3Xl2vzwm1FJ3jt5c zEr+qWLTdhIVzl49/2k1eFd71udCq1G36c3jhv/mjNw7SSj+aEeP/+ApqOKQJEjRhToZ U75rsm8kBFnJ5z23qWG3z1yQZyvmCBFEXwTNFLF+9ElhmsYqvFJEIcj8w7RbMkXtSXgM KprNS3d5U973sLYETFSRJCfBfI1T/yADdZ9esa/OTN2C7Kf/z6g0I3fXu3ijs6xiUJkp 2ccw== X-Forwarded-Encrypted: i=1; AJvYcCU8QvOv12prIcgA2P89+SDiyed5+WrmL5FNEIXMsm6eoy0xjmBOeBXZUmiw2t3TJWvBlok9zH9qM0fzSjmy7wjj54+nW6o+HTp8lvpD X-Gm-Message-State: AOJu0YzSgKb9Fv7BwrY59dEyLJaKhQJ98ft6tNzHhfyFc54vy6C3MwqN w7Os3lsTfBxAXnxVjE/3i+FuirlJXIY7GAIOlfLtGf3hT00lYCF/EmGpvWb7kFUln2YCB+kxf/S / X-Received: by 2002:ac2:514c:0:b0:515:d0e6:a141 with SMTP id q12-20020ac2514c000000b00515d0e6a141mr4730217lfd.40.1712534034799; Sun, 07 Apr 2024 16:53:54 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id t27-20020ac2549b000000b00516b07fdc26sm965696lfk.109.2024.04.07.16.53.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Apr 2024 16:53:54 -0700 (PDT) From: Dmitry Baryshkov Date: Mon, 08 Apr 2024 02:53:53 +0300 Subject: [PATCH v5 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: <20240408-lg-sw43408-panel-v5-4-4e092da22991@linaro.org> References: <20240408-lg-sw43408-panel-v5-0-4e092da22991@linaro.org> In-Reply-To: <20240408-lg-sw43408-panel-v5-0-4e092da22991@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 , Marijn Suijten X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=12311; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=rBO0yC8UpgMVwvLTQTxZhiafy7u8OGxH1e/YYI9RoRg=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmEzIPVSR9B6y/jl9SjHHOD6e1y+5UOJtLZGSGE meJBTYYLU6JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZhMyDwAKCRCLPIo+Aiko 1crWB/0c/JWNIrhM/3rJ8TpqKfuBOX5Ax4nmpJbllKt4HwF+rqaV88KP7T3TNVJ3m0ldFDwJI+A 1PvXReP1ttFEVQBP+4zvIqyzgP1t6xkQmRjU5BA/CoNkd7bXQa4fZv1ckXuwbarQxT9mh9ATq/H iBbq7AeHdEVOUJ13Mb8wXipLLC3Dw5rXmLF5efIXQW7uxy5aYwyZ1aztb8XUowcLpqGgmeykVQE VCxVTNdzNOAQHRcijy1NMmim3ShqhGleyIh6oSqIOVOSxLJTR6UnC/qW1T6WCT998RnMejCWEpn Vr37VHvuOxak5wyLN17EHFEUtHUAi3Mtd3Lkn05qhyczpjbT X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A From: Sumit Semwal LG SW43408 is 1080x2160@60Hz, 4-lane MIPI-DSI panel, used in some Google Pixel-3 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] Reviewed-by: Marijn Suijten 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 | 323 +++++++++++++++++++++++++++++++ 4 files changed, 343 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..4dc435fd9a44 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@60Hz 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..bd9706ae7615 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-lg-sw43408.c @@ -0,0 +1,323 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019-2024 Linaro Ltd + * Author: Sumit Semwal + * Dmitry Baryshkov + */ + +#include +#include +#include +#include +#include +#include + +#include