Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp424887lqp; Wed, 12 Jun 2024 06:04:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUe40jCzWCdgld/A3DYdeQ0Ti2t0ixqRIdE3xjbVD2pXi/IAtYUlGCvyxVu6tu4c1MYNAsuOz0/YvpdYiduR47+ZBsmuvTRBxBuaRgKPA== X-Google-Smtp-Source: AGHT+IHnraEm3nLfdLrJzEG3cQYxnOR5nBT0R581tnqn3p2PmkkOnwkrxKmI4tfd7cxpS8RwwVyj X-Received: by 2002:a05:6808:13ca:b0:3d2:30ce:327c with SMTP id 5614622812f47-3d23e4c1e77mr1824555b6e.10.1718197454258; Wed, 12 Jun 2024 06:04:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718197454; cv=pass; d=google.com; s=arc-20160816; b=zHgiX+Yl04wWUJ3nBbPfh2j3Z2vEGFmeiDc8X4GogXGE0laQK06B2ner8x7c2gDXoK undPTwblQMHxUkCFiIf/m5JYu4qd0Geknc8k6pnW8FM8w8yYGX0ems0N4QIuBIOqGpBS VYN3Zsl0WceR0fjPyxTi8IRvw0TJL+v5QJvh35nukKSlRfPeuW/CbiMUKGK4gpRNkSus GiHFhGJwkenJVDWlfbuxWiG5RkKC6AD5j+E666ikErexASpd6Az+oQLemwweMfvO+WoJ It82G+t5BKX3NSNw1H6XZA8SbqH+GcHvWkVaoVsc1sSxrA/kIP95Je6YzZQoYLyiD5F7 qEdg== 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=h/wHKkItlCiQ7o1IyI0XViLJrWo4JfbCzDlcSSlS1QY=; fh=Mk6gXg2C4inhqUD6mWzSOLBrDB3Z+oldGygFz0Zn4FM=; b=zw9nriKAdewoq4dBzoXb1/EYd3sQ8aEQnfXyOkdlrmyZ+1RGULD153lybVTv55ndsF TuhN0irLXpa6Vqvhy0E800tILwSZymsyzXkR6Ugg4HTi6q98UV3yDREVUoe5YMCd0hcT csJUjtBm7x1rPx2N2TDcHsrYslXEQgTMVaRQILEsTgcPxXF4JRqjDWIt/9NBQH/MN9cP bxhMB7KPJaNI2seJAvTbBB1JlDkwf1Fu7vLVneBzmretZyZNW4xb+LzsMeHOgAak33dk Wy7Bd9j5CVz7emnT2T3FEM7WR8fBRxn9AT6lvM6SUwQfNLzNv6ur4hBa9cNZhLsY4v83 gbNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=peN+GKzU; 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-211527-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211527-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 5614622812f47-3d2292344bdsi2465017b6e.326.2024.06.12.06.04.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 06:04:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211527-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=peN+GKzU; 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-211527-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211527-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 42AE8285EBB for ; Wed, 12 Jun 2024 13:02:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ADAF4178371; Wed, 12 Jun 2024 13:02:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="peN+GKzU" Received: from mail-yb1-f174.google.com (mail-yb1-f174.google.com [209.85.219.174]) (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 12E1316F292 for ; Wed, 12 Jun 2024 13:02:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718197332; cv=none; b=bBOqVG8dPafB5kIuR4lmJlnOfNNPObrBElRISrMahnLSTrc3zwjh/GpEKmjgemSv0npDubvwkxjElEQA6AzcA8erlQa00mkJBwhOkX87mMXYr70kvk/vz1p7VCG3hzrdpF/ZHa310br6uyBkoIrM+8qdCMUzxqxM7WogXyZ8eDI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718197332; c=relaxed/simple; bh=Ysi159Z1rBwKmu8/GJiKrRC53ZHXP0L/DJnRGw/xbKA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Tp4zNkr3ab9WSlL02Z/LEe5fOIIjM7R8nXpME+++4aN4zA80LZ6MBLchpXB+39xK+icu0nmHPs3S2A47kQZy5zQNYyHZdYNkx8/uZHSghDavLvvUW8YfwwHlHULN+P2m7mT0yT4aSwYXIMlNtnitDM00d9mD5apRVWF2e3jbpi8= 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=peN+GKzU; arc=none smtp.client-ip=209.85.219.174 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-yb1-f174.google.com with SMTP id 3f1490d57ef6-dfab5f7e749so6856010276.0 for ; Wed, 12 Jun 2024 06:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718197329; x=1718802129; 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=h/wHKkItlCiQ7o1IyI0XViLJrWo4JfbCzDlcSSlS1QY=; b=peN+GKzUQzIUWJ6KvdoR8AEd/SrXKrXxIvZkHDsf3FJvXs8OmyyZ7s5hgIldIxc/qK Yaeb5IVGuzP/zqrkhhQ5dlMtqiyRN0RyotvWEIirCqTryGEB3xdBTAWJp5AXQqKRcgXm iKdg89WoBlUzozxG6Y/3N04L8mQ5/Mu2lO1/gZTh2hEneSC0f/nzsPYOo3ds8XKTtCNH ESaQ7UxDMFgklCKFjDJzV7AU8n2iKAI/od/4oC/S/c3AAOCa5MN0Y0RvOv7YEZzgSpy0 reOzFxNgnmTLoGMDuGlfM8qIBRmB1Q1PN7e1IPhlfGRjlMkoBP1ZqZCfHfM76vHLwyUQ PlQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718197329; x=1718802129; 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=h/wHKkItlCiQ7o1IyI0XViLJrWo4JfbCzDlcSSlS1QY=; b=C9vjwxvX7xcATh30SMFKK+6eTs0VuVjMFH29/y8HY39J/HdcuNq8xYIWo6IxEr0Hzg qZckL12eKer45z0RJTrfaVi6f3NCQNYOSPIUHbJyE2oQvh3zwoFOnD5jvZ0FZESf0U7b Bh//79HrXmow2WyGewf0Djq+DGnKquAXD2l3Y/WhKgpRhpCt5aLXqSjV9Mo4RKutR7lL /zNpyQ9o8FSJRldVIjDg49jno3yUEntdDtoXdplEnOcWewgbh/5MnBWKfBjFOm2l3tx+ jg5/X2Uau0VTLqo48jPQ5yizK16RPdlJyFV/4RvTFXeGfL5HTQI6G0BqfqW8mNph2wlh bPZQ== X-Forwarded-Encrypted: i=1; AJvYcCVz6vviGp/phkeqNm00yGqA7WqBwUqVaEEp5aJ5LjNDKjHKtC4YylPWKQRTzlLQt4FTU3InQJyB5cwNpKCu2BGf6rjgyL8XK1vPT0o0 X-Gm-Message-State: AOJu0YxL3uIfkCNXlnlvbE4FlZMXTXdjB901MrdV7TYBtc6yZ5PWqqDc /MiYa0QklLbUKBLGE/iN7BHMLjlVdjLh4WYUS8BCUdONxvPkJN7dgIHqtxkzVbtgFlbMx5HWySN gXekairSo/Uhjv+qWZ3Wm8UZGbiAJWS+c1Jvfyg== X-Received: by 2002:a25:918a:0:b0:de8:9a4b:47e4 with SMTP id 3f1490d57ef6-dfe6715a902mr1467832276.35.1718197327850; Wed, 12 Jun 2024 06:02:07 -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: Dmitry Baryshkov Date: Wed, 12 Jun 2024 16:01:55 +0300 Message-ID: Subject: Re: [PATCH v2 2/4] drm/panel: kd101ne3: add new panel driver 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 12 Jun 2024 at 14:35, 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? As usual, update panel-jadard to use _multi. > > 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_= 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