Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp983916lqt; Fri, 7 Jun 2024 05:02:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXU/JbA4YHCtjz+8l+DiuEE5tq6p7czDOvWRKLHMtDVR+rP7aWciNs386ReFszwkKfqiSXov4Qm0FXb0ov1KgSBRxi7czW5haZGw6oqyA== X-Google-Smtp-Source: AGHT+IGD90OX0o5FxBbdmMxw0ghpULGdnJjO1OyXihmwG7o61T9xaAZly8I/GfTBkR84J+k/c0sR X-Received: by 2002:a25:d38d:0:b0:dfa:7732:4e46 with SMTP id 3f1490d57ef6-dfaf6493794mr2269210276.3.1717761735928; Fri, 07 Jun 2024 05:02:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717761735; cv=pass; d=google.com; s=arc-20160816; b=k/FxXo0G1vJpF0CUUWx17dfolNi0T+JR6zTLXQG6Jf88vJM7SQCSoEOygqCu2tJytR tLYFV4BuAuAr4SGId/NBoeRP+oS42/GLPB84HoY7kAbHxUsD8oksTX/xBvQGbLtcXZRC 9v9TXZ4csliLml8Il+ysIxxLdLyko40AO3ho1gcKAfox7MihQXB6Gw/VT+dUWrf+AEEy /FSKFe4DFQFDVVFQna0PX/Baa9j6QNH1AkFN62mwzPlpMhaeG3GKnYVoHyJNHu70xwEU D8W+QeUpHKo8AmmYpFfSzoN5T+IlNbzvq3psAsjcSedKZfcwt5AxDV4kQOQ7ujuDRKNW m8sg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=EB/AHB4drLGqp3LAAnekHACdVdXBs122PeStG4GVF60=; fh=SDHZMKJUDfY24an9Y/n3padYyg5PfWWvuqOlLEpEDwU=; b=ZkUt7Om2uO2FOkgccetB3DsH4OKa3nXN7xPz9VmrTP0M/eurvMRbF2Ilehk0ximooi 1ycLbBGyfZ3gRunHjN9vs+8SUiOQ145VtSXv1YqTX6GdZG3/7zH30sO0d+VLZ3UZAZSI 1oI0jQnrITF1OSNu/pYB5Xu2yTqWjoxPQCUjFHJobLixIkogoGmo4J2rnx6K5M19IgaN F8mkqQTR6bbuoMXS7+ck87/ENK8ulgZPxMVloEHj0sn8/PGj0CsatUhBCH0YCC/2FDy3 rlBuX8Co8rnLuUaqYzA8SgIGpAGr5Ga9owu+FWfEenSFG20Xu/WR23hUFx2bIo0mfaYX VZvg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DtW9klpU; 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-205977-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205977-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 3f1490d57ef6-dfae53c74a7si1690750276.246.2024.06.07.05.02.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 05:02:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-205977-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DtW9klpU; 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-205977-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205977-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 04C761C23607 for ; Fri, 7 Jun 2024 12:02:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7643F19066C; Fri, 7 Jun 2024 12:01:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="DtW9klpU" 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 8623F8249F for ; Fri, 7 Jun 2024 12:01:21 +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=1717761684; cv=none; b=Y+9iQz4bU11rOBXcnhEIb1aQkCx+l4upi/OdA0S/pcZayx0iBSZpefPUsyM5cjQiDXbF05ZwfCIKdLH79E0EfXva1dvmlwlQuFO+zM99aUgE7kzsuwcCzdXF8Tq2Nq8JeX9+M3awDLjIoMpihBkNLisP9Qw2FlCmhSwfg+VdIkc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717761684; c=relaxed/simple; bh=3KGF8C8gH0G8oyxOsmZPM58l4vvR9xRcySKYs5HvnJg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EKfVldAr8Za0E3dob42D7m8PpztBnlEl2cPn+1cA1CG3h7AtSFhIuOvTBEJ1keW+RQ4Ex2he9rCjqmda0EbprJFjm4m0RBYx+RmMShKw/7XJSNjzVer1RaXe/PLPIVThb7mK+CTRHuv8xJB502nua8VlYBb1G6aiu35yfH382nA= 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=DtW9klpU; 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-52b90038cf7so3115167e87.0 for ; Fri, 07 Jun 2024 05:01:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717761680; x=1718366480; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=EB/AHB4drLGqp3LAAnekHACdVdXBs122PeStG4GVF60=; b=DtW9klpUohJ9QDQ7eSfdudNTjb8zYV1qLtkzot9nLeuYiSOMfj9HYr0RmpGHenAqUy PnAcCKAfdKxdF98RjQBsWYuPQ20V0uI+SAQ0EKMSbsxeT42yBeyCLNir/RPrX+/FNMdY FmyLzvRSu7ehLNMxpgJET8ooxaDxuQF0h+igZ9Vw3bLspfQPiXQiDxu1k65xKM4LN708 AVwFZn4W44ogPCKp+AssQXgz+tV/jUwsDcjqCvZJgTWZImVi0t/0CbEiwplGv0qHaZg8 QFY1G3Stiyk+s/o0Jeqcn5711qDXkGkMph0jA6cMcf3MmujugJqdI8nSoSRafOKdo5bt cuYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717761680; x=1718366480; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EB/AHB4drLGqp3LAAnekHACdVdXBs122PeStG4GVF60=; b=fjpOUzci0j7K6b9lkDaZx6XrBgTapu0eK7vo9SRS5WSg5hCOfcvGzyEGSGxSvCsZvV RSE8tlXEUdWQExTdQNXXNkHOSWSWqk2G4NZYtg7g8MNFS/MDjDW/j5zxLvOH1V0QQbpI JhC2Bmb7NQZ8QQme5nqwcQ+h28d4dghMyF8nccewSyhWjF/1AxBrogMGEl5Ap11j3WXB jbYSYlPIMwT3L1wxYOqwN4K/UTc+Wm/rhG5h9Q88UHdSqwS7fEmGk1C0nKzU4RjBfniF sdZ4YYuMEFQyO208NIZIPAUbGafPqWRTjB2RLbyY/48lq3xXWoki3ErYD9DGo/7GZMa6 8fmw== X-Forwarded-Encrypted: i=1; AJvYcCWY0Z2a7b5DJ5T/S7pqHTY2vAPjYOOrTydHycp9HK8p1HSSaHqGllJ7PBFVoP3tgzMMc6KkzUNGTBNUnHOgaeUBAMb5efhb9LgTGJ2T X-Gm-Message-State: AOJu0YyoAMBlAUpFZKCn+O6esuHGvT8dVMwgTLQVuzAjYq1EZMsZJ8s4 H2ShvmybZMbkfehP2oDqZJmjAbP10FFvxmCGEvEMe86ldziRMkHUEBlC78Hr60A= X-Received: by 2002:a05:6512:3a8d:b0:523:41ba:a297 with SMTP id 2adb3069b0e04-52bb9f5d310mr2075017e87.5.1717761679638; Fri, 07 Jun 2024 05:01:19 -0700 (PDT) Received: from eriador.lumag.spb.ru (dzdbxzyyyyyyyyyyyykxt-3.rev.dnainternet.fi. [2001:14ba:a0c3:3a00::227]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52bb41e1fd5sm510567e87.17.2024.06.07.05.01.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 05:01:18 -0700 (PDT) Date: Fri, 7 Jun 2024 15:01:17 +0300 From: Dmitry Baryshkov To: zhaoxiong lv Cc: Alex Bee , 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, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/4] drm/panel: kd101ne3: add new panel driver Message-ID: References: <20240601084528.22502-1-lvzhaoxiong@huaqin.corp-partner.google.com> <20240601084528.22502-3-lvzhaoxiong@huaqin.corp-partner.google.com> <94c80cae-4992-4cd2-9b06-93505a5ca799@gmail.com> 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Fri, Jun 07, 2024 at 07:44:33PM +0800, zhaoxiong lv wrote: > hi Alex Bee > > I compared these two drivers. Although the control IC is the same, the > panel is different, and the init_cmd and timing are also slightly > different, so I added a separate driver. But it obviously uses the same structure as the panel-jadard. Please use existing driver instead of creating a completely new one (which you happily overload with an unrelated panel). > > thanks > > On Sun, Jun 2, 2024 at 1:07 PM Alex Bee wrote: > > > > 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