Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp379477lqp; Wed, 12 Jun 2024 04:39:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWwh8C2qQxgN3FiXz2sdDzAT7tv/rdJh01AXVolFjz6DBm77wom4N1fNbxlu3Vor9/KOwIyyQbjxC2EnHlJNZTFtkGc2+AmSC1S0DhN9A== X-Google-Smtp-Source: AGHT+IFEVaxNkLSpdjoCv1LBvH54uACUczaguYcE+sKX9HqBOtkzF1YaUmqRTTPjCmrJ12RnjBMn X-Received: by 2002:a25:abc4:0:b0:dfe:3e88:3649 with SMTP id 3f1490d57ef6-dfe6677152fmr1406384276.20.1718192392210; Wed, 12 Jun 2024 04:39:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718192392; cv=pass; d=google.com; s=arc-20160816; b=kEYn1edxb71pADZO+pTWvYy1hQnu/lY4yVA98/3FnPX5BWNUybSlNGhb6wmnGjh8Ya zO2bt8M8R0NmKjzeNMf+sTffbpy0xIRkSd9u63ebuWv2x1z0mehmthHE5jdkJmmCdrLX 5uuvNfOIS+PwOFYacISIIByN31C3IRqv5zDC/148b+yzzhWf6VoBNp7RgoGip6G14hB9 qXE5Ym7Dy0SOr0zhG27oWJc4oDf0OB8OD0KWvavxoYmLe3OwqpoON5meo6/Ng3+lSIYZ q/kW+0k4SjeRSa78pfwgc9k4DpboXTA9mkENmpzUXZ065NknRJmAckVV9Ste1Wsjwv/Y x+qg== 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=c8FAm0LBtb963WBJfDK2yn/TklfumUoBtjxVqLw0hOs=; fh=3T3IMUPEiT4nyQmrcadS9RsvmLKIaVKANpzKJGmXR5w=; b=P/UcdvbWnnW8ALgb5rV1sx7VTGcAY/ZlH75FNmuBg7BwmNQzHbmYxIdaRWapCCVMPd In7DJY9ymHV0h2gZ6cUCFRO6a1gXx2H01ksERSZbUeN12mjxk4hQgLB0aqgNmbaUgTqv 1TcYPNw/DpTXC48n/e5oNtCSZ7uTHK0Vub9uWcMsDIzGB5VaVfLcqc6Ko4uCVbbQO9A0 hpFFlRS9ekJh4M7aF5PUbVxg9sEWUdbm+PUoWp+m+rOxxMi51TZLCKxPAaSYF6Pu6yku ThN0rvD6Aw36+14XID2yHilh2GYodjQgSDaT33T6iujvuk5rkt8Gu55yUSlnTcrVGUF2 vHgA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=VnDqEZ5j; 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-211429-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211429-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-441280b93c1si54512791cf.163.2024.06.12.04.39.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 04:39:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211429-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=VnDqEZ5j; 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-211429-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211429-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 07FF61C233CB for ; Wed, 12 Jun 2024 11:39:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EBA3816F0DA; Wed, 12 Jun 2024 11:39:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="VnDqEZ5j" Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (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 C583716C84F for ; Wed, 12 Jun 2024 11:39:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718192360; cv=none; b=ilYh4pdAfMXA587/n3pmwzgRRupTIYrYc6QJoDUnSwaMxGdP2cpDogGoAB3KpFrkIklOtKJBWV4hgUXtNWQvhsCwpSoRnMu7kDcknZOV9FTNAiVkfFiOPizZWPlsljr65wLXKqCmcBo8htzE2YBK2C7I71AyZLDPZhk0Vg4S8O0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718192360; c=relaxed/simple; bh=ImaAdT0nVO0XOQoCC6Ha+IyyIcDB628hPsvnrWlsDiI=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=huTKPXyIuWo5uyXmtI2PdxYCegor7POC0kjhvwbdxEH4QJiVsjIIPChGwMHemBQt2HyVaVle28kPmmw+CdB5w+oi8p8OOYYwobb3m7W+r1RR/xGSmaMLz18cJuhUduRQb7GPnCzhrnOR+QH7LMBrAI32fEHdH8jlaTZXm/XMSaA= 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=VnDqEZ5j; arc=none smtp.client-ip=209.85.208.54 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-f54.google.com with SMTP id 4fb4d7f45d1cf-57a30dbdb7fso9865958a12.3 for ; Wed, 12 Jun 2024 04:39:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1718192355; x=1718797155; 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=c8FAm0LBtb963WBJfDK2yn/TklfumUoBtjxVqLw0hOs=; b=VnDqEZ5jt7wKLSEcQ+Mds4G0ovLv3uKjzt4xg0yneb5jsfRKJ2gmmKOVG9XEKhLMPH BgxqT//KuhEtBmxjOTMAjTP3r+50m5sueZjZ0OkNlybe3dgWY9Z2yydbZFWbaNs0GyNr OkkAQKaaARYBgZrSHulpjPdKo+yQ38wAh2oiz/3a3E43RFBXEL76alNO/4a3Yfg22f+d BL5yf2tJHeU5DSQjQCP17/409oDDHF8g/N8Ll30Md3HSyvxiFaobWOoNkAx1p68INd4H rSDLVcBWSMAQG9+M7qu76KiSFoYvUhAl4sN6b+TVfYbwmVul1sS9OnRaXKM2q9ZlMWJ8 AndA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718192355; x=1718797155; 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=c8FAm0LBtb963WBJfDK2yn/TklfumUoBtjxVqLw0hOs=; b=d9Is1GlhX4uyVODg/+iUDSmoZ2dotCf9s+kISG9O3PDrB/gznf6Q1cnMcsyGHeNS+0 yaKsyj+Ua4kK/wZXyewEy8hYCQemYVcQA5zYX7ZWdWID1qfKQVr9e9J3bTsu5m5wHk7n TAD8AL52TeNaoP9uQOoMaZr4WL3FLqccbmd9tlcpRoRHPxmkQzfPslhZ1N5DiCn00nXg sZut5BNRdG9LXStWhxYN5K+c/lKkTY6G48SzAxeZxRPPjB0fkpZIaF3c30D7CHbrdFhv Z8FnFCYS9+6l6hUbrMyYUlOEdaduWJPly4OvWHh5NnoPhAslqtKk1OfpkQVfeUcehWaV /twA== X-Forwarded-Encrypted: i=1; AJvYcCUzEgNzbBZmBDek3kaXjKalAZfk8jABV7cQeDavrd0OTDkHmIAQVN7vXrn+pbHDW98ispA7jOqT5cAmU04n7hV5SaCYtjOcTrj9jcT1 X-Gm-Message-State: AOJu0YzUhivPDsy6QC+IKSs64O7oTAaHDs5qbNXXtMrsMecVf8NO9XG7 W9S8KL8pwBT9yQ54F945I4Oq8X9uA1iG+ZV6ZJzmhUViPi6cHYJaA2p89an/eehVba1EUhz1fgu VgcoUkd5QN6tEo1qhFZICvwKZmlwK5mZ4VlAXww== X-Received: by 2002:a50:9e24:0:b0:578:57b7:9f32 with SMTP id 4fb4d7f45d1cf-57caaabf033mr1174502a12.35.1718192354904; Wed, 12 Jun 2024 04:39:14 -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: From: zhaoxiong lv Date: Wed, 12 Jun 2024 19:39:03 +0800 Message-ID: Subject: Re: [PATCH v2 2/4] drm/panel: kd101ne3: add new panel driver To: Alex Bee Cc: Dmitry Baryshkov , 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 On Wed, Jun 12, 2024 at 7:35=E2=80=AFPM zhaoxiong lv wrote: > > On Fri, Jun 7, 2024 at 8:41=E2=80=AFPM Alex Bee wro= te: > > > > > > Am 07.06.24 um 14:01 schrieb Dmitry Baryshkov: > > > 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, t= he > > >> 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 y= ou > > > happily overload with an unrelated panel). > > > > > +1 > > > > panel-jadard already supports different panels with different > > init-sequences and they can be set per panel-type (compatible). If you = need > > different reset-/enable timings (what I doubt) you'll have to extend st= ruct > > jadard_panel_desc. In any case you'll have to put dsi->mode_flags in th= ere > > as your panel uses MIPI_DSI_MODE_LPM what the currently supported don't > > need. > > hi Alex Bee/Dmitry Baryshkov > > We found that when using the panel-kingdisplay-kd101ne3 driver to send > init code, it takes about 3.5s to complete the sending, but using the > new API (mipi_dsi_dcs_write_seq_multi) will not have this phenomenon, > which seems to affect the user experience. > I would like to ask how I can deal with this? > > thanks > Sorry, it should be that this driver(panel-jadard-jd9365da-h3.c) takes 3.5S= . > > > > Alex. > > > > >> 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 lo= nger 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-kd10= 1ne3.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 kingdispl= ay 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/pane= l/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) +=3D pan= el-jdi-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-kingdis= play-kd097d04.o > > >>>> +obj-$(CONFIG_DRM_PANEL_KINGDISPLAY_KD101NE3) +=3D panel-kingdispl= ay-kd101ne3.o > > >>>> obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W) +=3D panel-leadtek= -ltk050h3146w.o > > >>>> obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829) +=3D panel-leadtek= -ltk500hd1829.o > > >>>> obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) +=3D 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