Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp550703lqz; Sat, 30 Mar 2024 08:02:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWlUB2h33j4ck2uLQf7GNxm69oQe3XdGgMRpux0uVhbqxlb5/3dfdzzbdj0g1Zx2bpeJHk9fp5r/ZTdmDLw0cLbooU2Oz3hrO+VjQc1Ng== X-Google-Smtp-Source: AGHT+IEDVRC3j0bk+e+m9BZcNHmbFE/vQCd5OJHpJzyOEvdL78BYnMXa4n+Ke022MpwbxQyEZ9pe X-Received: by 2002:a05:6a00:14c9:b0:6e4:76b5:7dd3 with SMTP id w9-20020a056a0014c900b006e476b57dd3mr5543266pfu.26.1711810934032; Sat, 30 Mar 2024 08:02:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711810934; cv=pass; d=google.com; s=arc-20160816; b=LbUd/bsenu4ZZq3Y1oBmjqP5l84rEJ0KG/Bcu5kO+pDiiSCSgsgfNzhKrigPelTMQA B8aDqf1IVhfS8OXNBtqP3s4UPrBpPXJiEQePRSPvXFK4r+w6SMDb2v1YhByyuK6gZP+0 1tIt382LLlMWHHc+zIxMnnHgmjlIdvKVsLc9IGuuQCagGj2wRTLYt14pN0GnDHqWnBoj 4KZQgyBcwMuocxKX66ZjGTZyfets0k+iCGv3ZYsw3tBdWtXt6wxuTuX5pCVcgrSmv8H1 DN7+jl2kKeTKhWsykiXucEwXzT4JfWGfYjM5yqtNg8CNJmzLDCQE++PqEKAJFOYe3/wl 3Aiw== 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=OoeceOXD90b/faMyNELCuqZCbGS4AC8UJzwAJuXctxQ=; fh=xrJvJ4x/k74HIbx8+owq94kQ37GuFRMIy7+NeqVL2Pk=; b=gYp3TXt1yVZD3XBKYMvWiCE5oe2ejdfeQtLKIOpxTQ5NSI2e+N/ksc1ZfeHzGJ04x9 rkN+2OW/sUQuElOlW7bZJbmoELJ5QIu3dyicSKMI7S3Oyk8lEhHosoa1nfHkbP8ZcU/x ZMLJxEaVrJW/TVSI7DHYYICsco/Rsx14Oyu9ffSh9KMFDXTR8X5r9Fw7igBYn4ugsxTk DzaKmdy/67IwnC1SkmjxI0wnbTkLVLRS/BeDhDsfwzxUKoKELPrxqXTqiSvSKudE0WoT NlHcCj6R63l4vQD8elOEs1Z8y61m3fON9iMal2ROs3DNFEntH2fjjmFXXwiExpD9vP2q 0yew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D3+Otqc5; 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-125755-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125755-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. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id p20-20020a63fe14000000b005d5fb7a5133si5780824pgh.245.2024.03.30.08.02.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Mar 2024 08:02:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125755-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D3+Otqc5; 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-125755-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125755-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 5046CB2162E for ; Sat, 30 Mar 2024 15:01:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 17AEA3FBB3; Sat, 30 Mar 2024 15:00:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="D3+Otqc5" 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 5E93638DF1 for ; Sat, 30 Mar 2024 15:00:52 +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=1711810854; cv=none; b=SY4PW4lYqPehlnl1vKzT44DHV0A8VoK2TyEqi6UxCUCjdKWtPWBulwuSi9qg6g6hP/qNx0IhlY9qVrNgviv7PrP+LIPxlgpTTznucHHQkGUIb5E41V62GqRDbW+qtxDYAP7QlpnVH50CgHOjPVwmewK6TOh0re/uxFfyXKYmHqM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711810854; c=relaxed/simple; bh=6eyOWDzw9LhAdwHF11NxUmKTnAcKVzQqt7phGeeb+OU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=k2Qeieo6hxJaEu0pGlcsl1qnY4GP9BP9xdmojaBZ1PXw9d0Jo+QotRXToV6AIPAqoiV3dkRWuhjjC7QOw1LNd4Zvixjx4ijhxWa0loDm/o7KfpXg73WmUGR1m6r0LkhHoWLrpu+AYXiYPea9NJOywvIU79Weiz2UI1rGKte0k+E= 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=D3+Otqc5; 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-515d515e28dso640830e87.0 for ; Sat, 30 Mar 2024 08:00:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711810850; x=1712415650; 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=OoeceOXD90b/faMyNELCuqZCbGS4AC8UJzwAJuXctxQ=; b=D3+Otqc5SEgS+zlRd6eB+WjDGnExgq/6uSCckpzFmdPWLzOgqwA5YWFBUYWTRQP4Gb Iy7Ud9Za+AdZEOUl8ieFwd7q7urV0Q0fSpVnvOWYu04ZInW7fYyNF2qXjqOcES3sqTu6 d/VciChFa+bOtjP2LcR9IJQCIIsLDr8qGoO8xCz5gDKZKUAq3Tnhg9YgogLDydEJ1/oL WiXqCYxoJIlMFlznSJ077xqGHhuNVUGwiWckJzx/PrhX+YRj+x2EKukGgyIJw+M4IELW 9WI/Ex6pynVHuGAu1wHmQPX8as/HeMNOIf/6ZdSzhoTDJUW8cw/JjdwVBSsCdCClskwY LlVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711810850; x=1712415650; 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=OoeceOXD90b/faMyNELCuqZCbGS4AC8UJzwAJuXctxQ=; b=LEG1HC2eSPYT0uszaO4rXcCXRrzHUYdAPohiBW/m12AXep7/vDOsTet6kuuzX/5A8F m4kQ8y8Aoiqe3sxvLkAyGGoZ+s4uQzA6hwty0vV4pQ6Sfw9DwFOd0gPOsSIzXTbhFysk 7ylh5ncTZ8wX2+s71RHruqLpI4XcMT3QjqeU/JJTuWJc4o6sa6n5IVtwcSFwGUzlhTa4 ECfxCk5tF5O/aLs4rEpLJIzixuxBlXuetWEca6K2nIWtht0bXyAd7INMe1YAtH6nvwOB 8C/mYAhxdV6JQyvaJkZIdWF6FAjeTnxxTRKUoSmDXw0NLWeEgX+qQlVNLkOjzAyi7y2R waAQ== X-Forwarded-Encrypted: i=1; AJvYcCVA2KhVkOMCFJ/Y4NOF+jQy1FG5dCD0M1jDLI8qoQExHvjIr3v6CVEYrTkrGKszFmv/EdzIZsWehohuQbAt8Ub6lQeRwMNB3sIdyVXm X-Gm-Message-State: AOJu0Yx1IW613N4ZCrXSQu6stB0Ojprtnmh8iU+8qU221L8iQfj8jwYe 9AxJc51bhfel7AYPXlRJ9Jc0tcpbiWNgSR7jGGvxZPmi5J2XlGeXEKpuU/+q9No= X-Received: by 2002:a19:645d:0:b0:513:5951:61a4 with SMTP id b29-20020a19645d000000b00513595161a4mr3014559lfj.6.1711810850608; Sat, 30 Mar 2024 08:00:50 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j5-20020a056512344500b00515d205a6f0sm496199lfr.29.2024.03.30.08.00.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Mar 2024 08:00:49 -0700 (PDT) From: Dmitry Baryshkov Date: Sat, 30 Mar 2024 17:00:48 +0200 Subject: [PATCH v2 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-v2-3-293a58717b38@linaro.org> References: <20240330-lg-sw43408-panel-v2-0-293a58717b38@linaro.org> In-Reply-To: <20240330-lg-sw43408-panel-v2-0-293a58717b38@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=12229; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=D6vJJI+0cd9TezSGqlz9pC0jmFumI9Fyojywzyt3GeA=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmCCkffNwBqAropCyO2l9Jyg07Kxpr10x4DXZIo z9bQSoOw56JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZggpHwAKCRCLPIo+Aiko 1SZ5B/9Cv+ba2KyMkgNicBHJyvACx8mdXa5zay9s9JfnrmHcgAMkkTyvPWJn3cA7lBke+Zj7LwX zz6JpF0DZij96RrVVs3h8HqkOrkHe3F/oVRCPA/jhy7weDjRCr8LZzbyff/cqqLbkFwu8hcsjSS +W0/jxzrtS78N6nd4YQ7G+GOLYd0VN/5BafXu9i6Hqv/FxwsynObGSnk/zzQ9ydQ/9RbKYnWwbg ayQ+dEXOTThpxdIbVZkughUOUtEAnqh94MenrmDUqFR988DJTrNs6M7UF6AjIPymiJPYYpe19rs bbeDlR50Es5A2/QRQ/PqZ79YtGSzKyikuMmyeiylkXpURNXO 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 | 321 +++++++++++++++++++++++++++++++ 4 files changed, 341 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..6c244b9642f1 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-lg-sw43408.c @@ -0,0 +1,321 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019-2024 Linaro Ltd + * Author: Sumit Semwal + * Dmitry Baryshkov + */ + +#include +#include +#include +#include +#include +#include + +#include