Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp304757lqj; Sat, 1 Jun 2024 22:07:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXmhr2XgdHLRW+pnliElnl6cZuqy/X1XPpNeQAsZ0Bj03IENS5qtVqJYjVc6fOplzra+0sUAIbZs28+EeY30xozMfHhwWculISI+vIY/w== X-Google-Smtp-Source: AGHT+IG3Zs2VXfH0cEDVVcChY6rzUGgG3ksSGqyUkwz6Qmmg0CLKw5PEUxIn7eQBGne9gZMCMz2o X-Received: by 2002:a05:6a00:b8c:b0:702:cec:85a2 with SMTP id d2e1a72fcca58-702478a3f6dmr8227192b3a.27.1717304860280; Sat, 01 Jun 2024 22:07:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717304860; cv=pass; d=google.com; s=arc-20160816; b=z4GelsYsbcmGrSnVn7CA5AKHMUBByqIbFBCnIbmVqoQdbhZjBEmT0QCmhPD44euSxK /oTQHnA3764U4N4w9AhZ1TvmTfyxNgrieqYmdybFJwKdWhfgvcEb2wT2ua9DVIb6X1jx RW2pmDvTItuojs+b3lOaHGuonWieEwUu+4t6/CbWsREH4NXccx199ZPMkv+qvBnIt/lH /0KZ4rSix51+rk6PrT3tSLjEdUAxX33mgoqyTOgE9nQLrKUa62c2MikY0RCdRUHkhLJ8 ZKh8z/d6Eef/GqLqexMtRPLIGUP5bI6/qpDigSRJwen4kyi3W7qCyGRQ/mQres6IZgxO Laog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=ANOuOIj21dBRnsbDhD3MChrhN8nctxPTpgEyWOUaK84=; fh=qj8P+hLq4n3rZBa3uTn7OV3U1ZoSLM1IJpKf5ICyjj8=; b=Pm6B/SmHKgbrUvNiPg1f+ZGygnVzdOCeqsefyfRR1iK2GmhvWiBNi3N89VcOfc6Ps1 9q7bOJmPO9mJjHuEjsZruUYd/2jGQlY0AerqUklBgGgIsk8G5/rJEVcPVYOOgJX0TIpj cquUfEqIPpc4ppISMpHxuaRXXgkHit7S/6wnFa2np4JNdmUBdyEeTcAavfgipsP1XcKN qagZALj3uJbITZwTT8L0coEWbl3I4EAIdVjqnleKdLwjGYGSJP5woS0EspxKZK9kJkqf Kd9trNAlfURUMVXdMuDBKCEx5YjB6MrX7aeHPi6rKpHqsXZ6stPWCgb3UUlXTgdtZXAD GDCQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TCU1w01p; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-198134-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198134-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c3540f8564si3088286a12.31.2024.06.01.22.07.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 22:07:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198134-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=@gmail.com header.s=20230601 header.b=TCU1w01p; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-198134-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198134-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 5D7D7B212E4 for ; Sun, 2 Jun 2024 05:07:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5765317578; Sun, 2 Jun 2024 05:07:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TCU1w01p" 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 EA569CA7D; Sun, 2 Jun 2024 05:07:25 +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=1717304848; cv=none; b=Jns+Wj5UbUT6Uo4BxJn80ZnVuzuc2PSNmczIcqvoRfUblquUrafqp7qljjUiSt6WJ3+ZkrhkcndxFvPd3BTwHm5J0Dzxv8Gdc4bqaxU5qIfg/xNb0JkpNE0O4ngaMygATFKEdHRkWV/2fJTM2eCuqc0ptpnBw6+GxSRnZ7p70HQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717304848; c=relaxed/simple; bh=rGq5YUYsYT5zk9CApMIxNnLDfW7Urc2951E2gVM4w00=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=lLvRBBmhocOY+Go5BcLV56BMk3GLK1yI4Sl6SPAt66XEM6+y4u3qCdQXrT9eYIQHQgsb7IKHJ2SyuejKanCEEW1JTwjgh9pqmB7LYE4c/KyKvy6Ml1HQK1jX1C3sbc9/SfGVPf0v1A/+9j9Pt+suZOK4lBG6BEL5L0LITmVAm4E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=TCU1w01p; arc=none smtp.client-ip=209.85.167.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-52b7ffd9f6eso2939133e87.3; Sat, 01 Jun 2024 22:07:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717304844; x=1717909644; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ANOuOIj21dBRnsbDhD3MChrhN8nctxPTpgEyWOUaK84=; b=TCU1w01pmN5yzOsv6B0ymFEHY0upvwwZUpjEHKIowNr1mNmdHH5Y6LC8In/d+fKUC6 fr3Hsb5NXGqMLc6S8yS4oDN51ZvJBq9KfrgTvCdGU8OLCcR6U/AgBd2+hlvLAq5D+KU8 zP24hWdH27SRPMA07riwqDZeXOzKpziFTBwm8jRaMsxy+PsWDQuJUO67vokYw4d8QBnX eT3unSaIkV5BWxUkM/bjnNpolh15Jb74O7BJe7TJje63FKDTYdQgSrDujuAMBaasnziA 9100zERkDdiGsudbtymZkOcr7YNIMwK9jWw4R/sisdJqjvn3CDB0oLjT+nO5GVFnmQRJ lkYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717304844; x=1717909644; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ANOuOIj21dBRnsbDhD3MChrhN8nctxPTpgEyWOUaK84=; b=Ho5wssE9mMHG2w2As/btUN4hBGMNDYMNA8MBkrI8Qjugil51SXsRFqcRXq213/PDb/ ajWv2Eik0wCkrfmbTp1hZMXGrN40InXZqMfxPyn49sDFlVoqek05aQMmknGF80qscl5O F8gQ8VnuNg7VI+MmiEYtGGCWcIxc6eDrVneXP1lv2TlV11LeTI9nP2xQqDTl5gf1DjW5 6lbKGbtrEFPv5uGuhNVpYuOI3+Z7aSPtFQYy13aL1+42zgrilIgzBE6niTO6KrpZ1XjP 8cl5uquZCQ77meR7CNJBv6TJaCx+XOykB9m5jx1P/CxVgNte9wsmRWCesKArjpyhjpxy quCw== X-Forwarded-Encrypted: i=1; AJvYcCWzwCimMim1pd2mEBxlp7mgUluX9QmSH3m3GNXw/H8fIfkHfH+sKn3ibuAJtsyqJT8+53Tut21jc1IE8Dleoeqj/7+ty8IsuipwdJ88CxdVPG6MpgJGk8B9QJW6AIqajjZVuC31hzVGoQ== X-Gm-Message-State: AOJu0YyP9VgvwH7cZtgBSKV++mOWHI3+/ZSSTiqaxSSz/D1Mhi8DY+Fv TnWY0jJ62qDLXgfHwOw1jiv3JPJ4FzglgTVN7lYGhuFuMVWNbdk= X-Received: by 2002:a19:4354:0:b0:51e:f2bb:158a with SMTP id 2adb3069b0e04-52b896e0decmr2844859e87.64.1717304843598; Sat, 01 Jun 2024 22:07:23 -0700 (PDT) Received: from ?IPV6:2a02:810b:f40:4600:f4e3:3e9c:a02e:a3a1? ([2a02:810b:f40:4600:f4e3:3e9c:a02e:a3a1]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a68b66c0c87sm144921566b.73.2024.06.01.22.07.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 01 Jun 2024 22:07:23 -0700 (PDT) Message-ID: <94c80cae-4992-4cd2-9b06-93505a5ca799@gmail.com> Date: Sun, 2 Jun 2024 07:07:22 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/4] drm/panel: kd101ne3: add new panel driver To: Zhaoxiong Lv , dmitry.torokhov@gmail.com, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, jikos@kernel.org, benjamin.tissoires@redhat.co, dianders@google.com, hsinyi@google.com Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240601084528.22502-1-lvzhaoxiong@huaqin.corp-partner.google.com> <20240601084528.22502-3-lvzhaoxiong@huaqin.corp-partner.google.com> Content-Language: en-US From: Alex Bee In-Reply-To: <20240601084528.22502-3-lvzhaoxiong@huaqin.corp-partner.google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Am 01.06.24 um 10:45 schrieb Zhaoxiong Lv: Hi Zhaoxiong, > The bias IC of this kindisplay-kd101ne3 panel is placed > on the panel side, so when the panel is powered on, > there is no need to control AVDD and AVEE in the driver, > only 3.3v and reset are needed. > > Signed-off-by: Zhaoxiong Lv > --- > > Chage since V2: > > - 1. Use the new mipi_dsi_dcs_write_seq_multi() function. > - 2. Modify Move mipi_dsi_dcs_set_display_off() and mipi_dsi_dcs_enter_sleep_mode() to disable(), > - and drop kingdisplay_panel_enter_sleep_mode(). > - 3. If prepare fails, disable GPIO before regulators. > - 4. This function drm_connector_set_panel_orientation() is no longer used. Delete it. > - 5. Drop ".shutdown = kingdisplay_panel_shutdown". > > --- > drivers/gpu/drm/panel/Kconfig | 9 + > drivers/gpu/drm/panel/Makefile | 1 + > .../drm/panel/panel-kingdisplay-kd101ne3.c | 533 ++++++++++++++++++ > 3 files changed, 543 insertions(+) > create mode 100644 drivers/gpu/drm/panel/panel-kingdisplay-kd101ne3.c > > diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig > index e54f6f5604ed..71669e990e8e 100644 > --- a/drivers/gpu/drm/panel/Kconfig > +++ b/drivers/gpu/drm/panel/Kconfig > @@ -297,6 +297,15 @@ config DRM_PANEL_KINGDISPLAY_KD097D04 > 24 bit RGB per pixel. It provides a MIPI DSI interface to > the host and has a built-in LED backlight. > > +config DRM_PANEL_KINGDISPLAY_KD101NE3 > + tristate "Kingdisplay kd101ne3 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 the kingdisplay kd101ne3 > + 4-lane 800x1280 MIPI DSI panel. > + > config DRM_PANEL_LEADTEK_LTK050H3146W > tristate "Leadtek LTK050H3146W panel" > depends on OF > diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile > index f0203f6e02f4..4576c9fe33d9 100644 > --- a/drivers/gpu/drm/panel/Makefile > +++ b/drivers/gpu/drm/panel/Makefile > @@ -30,6 +30,7 @@ obj-$(CONFIG_DRM_PANEL_JDI_LPM102A188A) += panel-jdi-lpm102a188a.o > obj-$(CONFIG_DRM_PANEL_JDI_R63452) += panel-jdi-fhd-r63452.o > obj-$(CONFIG_DRM_PANEL_KHADAS_TS050) += panel-khadas-ts050.o > obj-$(CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04) += panel-kingdisplay-kd097d04.o > +obj-$(CONFIG_DRM_PANEL_KINGDISPLAY_KD101NE3) += panel-kingdisplay-kd101ne3.o > 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 > diff --git a/drivers/gpu/drm/panel/panel-kingdisplay-kd101ne3.c b/drivers/gpu/drm/panel/panel-kingdisplay-kd101ne3.c > new file mode 100644 > index 000000000000..8994a1c9afb5 > --- /dev/null > +++ b/drivers/gpu/drm/panel/panel-kingdisplay-kd101ne3.c > @@ -0,0 +1,533 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* Panels based on the JD9365DA display controller. > + * Author: Zhaoxiong Lv > + */ > + > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > + > +#include