Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp976228lqt; Fri, 7 Jun 2024 04:45:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXkazb5ksSqcRoKdmMzahzyJ1Y3YvyiQFFdC2yaEQ6OOSj8E7lA4NPYsHhNpWD6/4i69QzG+RUdm0ymhzq1m5qD5ATmO39fufhJmHo1FA== X-Google-Smtp-Source: AGHT+IGCKJ8khlCUls3TYbXP+kFizCp6D/FCrmCcdCRZlY6RgSC0wnRIfSYGLJTUB9c4d+60AoOE X-Received: by 2002:a17:906:474f:b0:a68:c71e:f3ab with SMTP id a640c23a62f3a-a6cd675c7c5mr146242466b.22.1717760744286; Fri, 07 Jun 2024 04:45:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717760744; cv=pass; d=google.com; s=arc-20160816; b=etttMvzr6/JyybYYVO0vTqR1BvLLkurifmmmm/oZv3PpxJ/xwGhc3xCCPk+0YLGw+7 rEF+tDVSV0G1mjYY1TjSfzd/bGGsY5EzBLKGnRmiY0oIkeaWSqLC2GN/9QhBvDQdWUg7 cM57fCnfW34ZCp2mmmeKjcBkpnzC7LEFGoJFiMcxCi7AS1kY4FcZIAJb4j/oBwlGNRrV GbLemjtjO2tB2c2JLgusb3Gz1oEGNdMO87GVLx1xJtfurMkQSrBS8MRSXDeqGCosdtFJ fiTasm4ncXZEjwU/An2Y3kZS2lFywgEAoay9itWWXP8SN91lZHrXKfTtbYNadUdtyA29 SnYA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=m9Id5g52iskjslb7E3Fri5pitsfV+1j0/ATo26KHxZw=; fh=1SqVqsRTDkHpYBlcAJhPn/k63OElauwcKBgrqXspoKw=; b=YryF+mAf/it6ZlqzLuKjkmxj9iivJvzoXk6GvdsR7mLxdHl4mzNsfEeYMkQcdm+WQU +WBF2f2XtxRKkZhyJTAcYiNgEnnajq0ZIk6HG99Lfmim6ZkVRZgXe5JT9BaTfui8zcL7 LuH0vZi7Wb0644Em1cZyqmCB/n2PfPzA3a/4vwlAIfmF8MxeQBDpGOONM7xluIzfKgzQ vzm6oC1oY2kSmwaKXT9nJ00SRbStpnY2lZtQk5gegE5+GFtlo+ZaAStsFBeHxJx36qHH GouORPbm5kCCVelYZcd4V5zEwaJRZs8DzMZfpyQvpwug5fHsEv2V8NZ9GHh1wcqrbG8a o4LA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=fDZUrHAm; arc=pass (i=1 spf=pass spfdomain=huaqin.corp-partner.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=huaqin.corp-partner.google.com); spf=pass (google.com: domain of linux-kernel+bounces-205950-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205950-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6c8058211dsi174286766b.99.2024.06.07.04.45.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 04:45:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-205950-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=fDZUrHAm; arc=pass (i=1 spf=pass spfdomain=huaqin.corp-partner.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=huaqin.corp-partner.google.com); spf=pass (google.com: domain of linux-kernel+bounces-205950-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205950-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 am.mirrors.kernel.org (Postfix) with ESMTPS id D10C81F249E3 for ; Fri, 7 Jun 2024 11:45:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 565B518FC8E; Fri, 7 Jun 2024 11:44:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="fDZUrHAm" Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (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 B636B15A4B0 for ; Fri, 7 Jun 2024 11:44:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717760689; cv=none; b=rExnXHHftJRCoIUyxyJIRc/mvu2BhvZnQmM7a1hUeCkmFoWDyZKWMGVBa369JyZScA0IM15CtYhY0N2qhNAOF9xl2iT5eeJQ8Cv2JPCycGpw1Br3q+/A08OWzuE//a9cdQnoJ2y6XmZvxLbcBmNIqreRW6YNZQ96ARygyuMvkj0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717760689; c=relaxed/simple; bh=t3nZyyg7d3ssYGGc2XFuvyi4JEmC0dFK9EsjVMkItNQ=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=usuD4sdj35oyfGTA/xcafVWkQ8Clnk3RFU+v3lvn5+QT/GM2tQC9hvlip5dLjEO0jRu4WvUogmR1WwsvxsfvmOJtENfXdq1Qt9qpXu8rI23g6W4UUWERoyDVp08VB94mfFoY24PVCjGMmxzTBnrKg2diGuGYHibno9xtahih9us= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=huaqin.corp-partner.google.com; spf=pass smtp.mailfrom=huaqin.corp-partner.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=fDZUrHAm; arc=none smtp.client-ip=209.85.208.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=huaqin.corp-partner.google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaqin.corp-partner.google.com Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-57a526c6a2cso2308801a12.2 for ; Fri, 07 Jun 2024 04:44:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1717760685; x=1718365485; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=m9Id5g52iskjslb7E3Fri5pitsfV+1j0/ATo26KHxZw=; b=fDZUrHAmOfEJngv5vVHej9MXFCKftF1yffW6xi764KIGjAhXkV4MDrIds1Hp0jY/yM t2e6bUJFYVKb8IrAENlcTC729i2Uj3TqPSvaytjUk2UpyeoM+QZbdY5l3CXCwRagzBh2 lJLAzxEMNlW4qGJNMQGH50yYIcGA3mZTU8KVwibu5PjB7FQx6LU1P9/SpMyu5kxNdBB2 MVfDyQ51kJQX3UINVofvx9GPwowyfgJXTkdN0bDD5Y9vY0NEz/1K4HphOW7D0ERd3gpq 9AbRARLH11f+wz0c3xEsxsFeTN0friyoa7omXEsuCL6b9QL0/ZDOB4ieL9Mjhe+Ue2vN goAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717760685; x=1718365485; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=m9Id5g52iskjslb7E3Fri5pitsfV+1j0/ATo26KHxZw=; b=QjQBJGlzSLFh2l38nwJre7PPKWf3jUDyPXPoGKM9ygbgardHnGrvKmETCDW6vh23vW j4/p7assqYSB29bpRdGT6YE8f757AJrOoCJK7Tfzqr2GtQ+FaHCG6Uojch2X2Odb2zCR dtN7m+G/i43JHZdNjiwwTLLaAibUgv53gtr+OH1ylWATXnzKlU0NgRpW9yNLNJMg/C/W 0PvAe1VZlX35MnQf/M7iGz+Deub9EfrhV8e6LbTJuFQaiaLSr1sNGw2OUMIL4utmsCw+ 9qM+uGFSHoHL4tadwemeyxVADSze2SqquqvxeoIlCbvcVv8gTeJLDtHMsJ+5m/Thg2IV tMRw== X-Forwarded-Encrypted: i=1; AJvYcCX9zWIOmLtQohqSHsDHCoL/nBVjIVhuUEUjtSDltCdySPm5JQEk/FFptkcNiyq4kDiJ0xt8pdrJANIftl2dJtmLCn+Us+8cijl6WGdr X-Gm-Message-State: AOJu0YwEHXMiL8OH5RfHFg+PTcbgCkXD9IbxOl2U3iz+P5S/RCpsdqpe cMPxF1Be5rla91A/Who0G7RwxxUVkJanmlojJC0Jhbq5sXUkVZgQS2zwpAC9FTW/0nNtbgeTjTX e4EHs4ZPL1U7uu5orGK45GBix9BFo0Eq9Ob/ocw== X-Received: by 2002:a50:f614:0:b0:56d:faa2:7aca with SMTP id 4fb4d7f45d1cf-57c508fa246mr1302502a12.17.1717760684841; Fri, 07 Jun 2024 04:44:44 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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> In-Reply-To: <94c80cae-4992-4cd2-9b06-93505a5ca799@gmail.com> From: zhaoxiong lv Date: Fri, 7 Jun 2024 19:44:33 +0800 Message-ID: Subject: Re: [PATCH v2 2/4] drm/panel: kd101ne3: add new panel driver To: Alex Bee Cc: 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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. thanks On Sun, Jun 2, 2024 at 1:07=E2=80=AFPM 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 =3D 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/Kcon= fig > > 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 kd= 101ne3 > > + 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/Mak= efile > > 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) +=3D panel-jd= i-lpm102a188a.o > > obj-$(CONFIG_DRM_PANEL_JDI_R63452) +=3D panel-jdi-fhd-r63452.o > > obj-$(CONFIG_DRM_PANEL_KHADAS_TS050) +=3D panel-khadas-ts050.o > > obj-$(CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04) +=3D panel-kingdisplay-k= d097d04.o > > +obj-$(CONFIG_DRM_PANEL_KINGDISPLAY_KD101NE3) +=3D panel-kingdisplay-kd= 101ne3.o > > obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W) +=3D panel-leadtek-ltk05= 0h3146w.o > > obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829) +=3D panel-leadtek-ltk50= 0hd1829.o > > obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) +=3D panel-lg-lb035q02.o > > diff --git a/drivers/gpu/drm/panel/panel-kingdisplay-kd101ne3.c b/drive= rs/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