Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp377658lqp; Wed, 12 Jun 2024 04:35:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV/V46vk6g/G/i0Dy0MEuPe34Ith7aHaOeeFTLxkm5C29t/eNvSBOKeXnjvdzLx8+5nr9aoheXhV4uRaDOxtrxVjnwWygV7qHYuh8UyiA== X-Google-Smtp-Source: AGHT+IERHe9bbP+IMdmnZaeFi212+H/l/btxG02+OKjPtd8olQPtSKsXfhsdTsIxV0b2KEJSEK9+ X-Received: by 2002:a05:6808:23d6:b0:3d2:20f:a0f8 with SMTP id 5614622812f47-3d23dfdd000mr1863155b6e.2.1718192152800; Wed, 12 Jun 2024 04:35:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718192152; cv=pass; d=google.com; s=arc-20160816; b=hbioP6q1S42hzChnUV6sZADrkdjl49cM4RPrzOL/KvVAWtEylQlSUFdak6bCtM1lS3 iy1TlcWo8uE0wyjTLdz/4h6QaOdykEOkoN+48scKnYPCr2N1Smiuhc5EPzcm8UCBRH8l fJcmau6LhGotDn/o7X0TPbPdTEKWbJ2/VkhBBU2Vv8elInV6761sgNoB4QAh+jBx2YdN KZf2LNTO0QJaraOzdXrg0P7arjX59FWPMdo/KvmYVbThowPr0h9VaHSr2R/siWxQ9Xxc HFEAeBaNrEnGLd6WWDIglAm789eaon0Wirwq+zTeQuCJqZfM0n4Q5YkkMW34oBi4AghZ 5YUw== 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=FD3TcpOevdw4jGOGlfKKrgKgvEbgvcfQmdjNQhdMv58=; fh=i7Y7/sK3PsB4JBBYNlnuh9hYynnUkN8Fx/Y2cEPuU84=; b=JPaBzsCF589R+QgKpGGCoEp4ctiPcV9TvFo81uTx/H8d5zUQq409Lh2VFYdht/51Jq ru4O2nEX2kVnTCfgJy1Wwzb94JPU0+Grx7+Co3u6VqHpKYMX4U/4xj6sXAD0qVBIJ9HM jGC/uoC3pHWHh245iN/rmV+uCVS3LfkINJUsII/PlhrEbz2iRQwtvwiLGDwcQI8SBI1Q j2Co3EiyJ7eouCBXPCZ8kp5H50c3O0/UraHupvsWpAiTzcbyU5flT/DJMv6r4gEASypY Hvm16J33ku66rIIhiIT9MwPcqZvzM0LKoOt50dqilJqRiFW6qPnmSYCwwhsmHUYVde1P MoiA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=EvyOi2En; 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-211422-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211422-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. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-441580b6725si18974241cf.270.2024.06.12.04.35.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 04:35:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211422-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=@google.com header.s=20230601 header.b=EvyOi2En; 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-211422-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211422-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 698091C213CD for ; Wed, 12 Jun 2024 11:35:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D5C016F0C1; Wed, 12 Jun 2024 11:35:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="EvyOi2En" 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 CA44915624C for ; Wed, 12 Jun 2024 11:35:42 +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=1718192145; cv=none; b=PTaZmQEulzkakXgBNbs/McjlNqjN9wJV3xmOvVNgq2AjWC0CsW37WYVspYcobTB4ovn0kNs64p6/mHydh5Cc1X0kzaIj3kHw52pu0kyVu8x9vEJcPWf9TiL3JPMDXq+K8UFBmVCOTMYHxt7zE+CvGZ6dageOAqDh9r9EoTb+5Ng= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718192145; c=relaxed/simple; bh=NtYmsudCnauKzxu24L7twM2u69VqGSLsT+ZyYg5yd/o=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=TN3HIjCQWXOdz91QblcwE/G6IVDojOpl1wNz7jI/zGkERTQCEKImJjeiqKGi4zk7U5g0VaUc5KWb8mex5wYOqdKLuRR4+0umm2dzU/+IAJO1zUeNjp8uvDdnOlsoyV4NS4BNhn/DaDhaPBBWGEzrtj8gE5wTGh1oTQ0M6dkFa80= 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=EvyOi2En; 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-572c65cea55so1283121a12.0 for ; Wed, 12 Jun 2024 04:35:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1718192141; x=1718796941; 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=FD3TcpOevdw4jGOGlfKKrgKgvEbgvcfQmdjNQhdMv58=; b=EvyOi2EnxqoeoGjHxRwzIq/0tlRor7IoBUyLvSwoR2M1d+p0SgKy/ucSnx/e70ml9P ig3j1zNLfvw4wjCiV/BsFy9Rna9UYr7/n5DhUcdfXtqBnC+9OVszKo7rCATMEYLlRnYz u12tuk0EskaTZ6TsOpyB+QSLHw0g/pYwEWFo4WFVta6WbNBHlslHc+RYIrvZI9iZlAKb 42DIK1AUSecfvIb7Gqe4JVHemC4BYr5s7OMgi2rOeM09y9wJRMImp3pe0z1F0pC4wWoa 5uTGrrUOvw4ugcj9iGBudUBnuRb92pWDvtAD9kLED+P4BRajPxufFMG1C97qq5GztTLX Zxnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718192141; x=1718796941; 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=FD3TcpOevdw4jGOGlfKKrgKgvEbgvcfQmdjNQhdMv58=; b=ZmEBY9B6YH3OcssHLY3TQUqIXB6C3mhpBESic8RE0htAg69RoPBvymVeYTUO++aNTT n2+0Qay9t4HJ4+7sDDjOeaONa3rp8tLRAm8GTLXI6PHyG2gdiE35V4b437MC3SwtWHrN Q9cmj+l8VZOlZxsPUsbXTmGyrNH/WFHvGsrDz7f2kL1N6E7eflJh0xvankOB+IueA/7b aBBH5hr9n9O82h8sPmIwTshfT4pLeJ89qlqFRwaIXTltk+5apNtMDj7aEm6kitZhBzr3 FeGtQPnhY6xMKuoxBcUc+OCkpuZ5nImBqyN3uBc1167TbdyWqabghalXJz7QtpSko9fm P02Q== X-Forwarded-Encrypted: i=1; AJvYcCUOgljcXoS3ur9F4GFHsgjE6RKDE82yG2poWowJTj9Wi1qDmazwLRJOOzSirzGOfGrOmI/HQ1ADly6pMOvmk2zzx6hpgPUfITPoGYLc X-Gm-Message-State: AOJu0Ywjfv4RYIBezoflcnzBYVPHpFXrCXK7uQ/q/wIwLT6SNqV5W3pR 49mzr1vQ444bryVvjtbWEDr2aLmnqRR2E/UqP231Rb6xQfzdhfn8NED+328lPxytlLPPlUgrcL/ enyJp3kCeydQekncPQVoqih9FNJlaXvy6tsvlow== X-Received: by 2002:a50:f68b:0:b0:57c:603a:6b2b with SMTP id 4fb4d7f45d1cf-57ca8d31923mr1122667a12.21.1718192135287; Wed, 12 Jun 2024 04:35:35 -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:35:21 +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 Fri, Jun 7, 2024 at 8:41=E2=80=AFPM Alex Bee wrote= : > > > 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, 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). > > > +1 > > panel-jadard already supports different panels with different > init-sequences and they can be set per panel-type (compatible). If you ne= ed > different reset-/enable timings (what I doubt) you'll have to extend stru= ct > jadard_panel_desc. In any case you'll have to put dsi->mode_flags in ther= e > 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 > > 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_en= ter_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 long= er 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-kd101n= e3.c > >>>> > >>>> diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/K= config > >>>> 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) +=3D panel= -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-kingdispl= ay-kd097d04.o > >>>> +obj-$(CONFIG_DRM_PANEL_KINGDISPLAY_KD101NE3) +=3D panel-kingdisplay= -kd101ne3.o > >>>> obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W) +=3D panel-leadtek-l= tk050h3146w.o > >>>> obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829) +=3D panel-leadtek-l= tk500hd1829.o > >>>> obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) +=3D panel-lg-lb035q02.o > >>>> diff --git a/drivers/gpu/drm/panel/panel-kingdisplay-kd101ne3.c b/dr= ivers/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