Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1007271lqt; Fri, 7 Jun 2024 05:41:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU75XiI9EFTSaKPbZWmSRP/SSAatjQ35Ftr+BrDVMrbmNPX2/txXfYcibtEPs8n/MVGDiAbAty/Ek7IiRIpV0APSCRwSAn8YWW6MWRA/w== X-Google-Smtp-Source: AGHT+IEpyB+xgJjGbX2B/qVxLCToFg5DIvqL2NTrxMgmWjl/gbQX0mvEZoI1shnSnXwP6SwPqgyO X-Received: by 2002:a50:8e15:0:b0:57c:5caf:2b94 with SMTP id 4fb4d7f45d1cf-57c5caf3068mr1143426a12.36.1717764113139; Fri, 07 Jun 2024 05:41:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717764113; cv=pass; d=google.com; s=arc-20160816; b=EXro/3iDXzAtwkKzFk2svB+O7Tfz7E2IWhy0MNUuyD9wT+JiaxAgMG0T65B05mV1Fy 1I7fiYV0uWLvu68J3QrY577bhyFCngy+BjE87cpya32LmdENoaCKV94lQdqeidh52+8b Rd+4kj9Gqd1/4Ah43xFGHbkhzETA8aBMPZkkwZBtccY4EuYDYfRsuVefaB9vTLYVEYpB 4hkUWAa5RELErN6eMTTgwWlVFyjrReqGnLrQcYg6Gv5lvdPO4e5ZOto5D4ltwyx94ieG jVmxY8w2jsWPTZzgDcsAonEcc2fTij4unWPvOd6Q+k1KLDI44Z9ElPE/zzXG7WqAYHjW QLRw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=yKtNQs0cbsSHfNHTh13rn73l9D6LhJGK9zYecrPTZnE=; fh=kTAZqCbpXJ5ZyAWaYB2G/3NtWFYZwhooeDiTIaSbBCA=; b=fQHryUFTCKHSbaZu9+z4sMLcgvnjH6xhrhGVdTqcY4bsFEs2ZS+wpQf/kDSuVfjD8Y sHmgri+eo6NOaJpupG7iMXK+iWwv/jbePVT06pqakJ2dyGNxg+haq0XeWBVQ8ueOQDMf Y4Kzzbag53VCJamn0gjj8rIs96ZOg4GoDiiueOsoBuUFSbW1hQAes3ZOmqk/0+cFfDO8 6P+dkRnmJq5+V5tU8IEpNSBzbaXAy/4Q5nW4ctbuQcdYZEYxNi9yIn0nRxR7d9xe3o1H uHoA7bkUc59PNoJcxk7TmIXLVqBIVu4pOCXfpPAG/tQ1SS05ZlkpWCyF5w3es6VbIOxu CCGw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hh6to2sE; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-206060-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206060-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57c5fd77aa8si336990a12.678.2024.06.07.05.41.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 05:41:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206060-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hh6to2sE; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-206060-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206060-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 A58D91F22327 for ; Fri, 7 Jun 2024 12:41:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D036B19413F; Fri, 7 Jun 2024 12:41:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hh6to2sE" Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (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 08187193062; Fri, 7 Jun 2024 12:41:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717764070; cv=none; b=WLi2ObnNrE9B9IsdTeWEOlCQRNY7resrWsFxExmvpg0CDLlxsRLFGWjTWIG4PfuAdkVTIMvORY7N2QETFNIzTNZ36xr7dkcRIWhapv+9F/KdUO4farbEmGqrvVN2W2+VmACtylnBVZE42OHN6e1iq0URzrHTFeX/jgXQXH5qajM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717764070; c=relaxed/simple; bh=tQ3g7yKYsQEHjEJ53KzCpK2u0ITZJfLmiMAE60L6kQg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=bdA0eUprjeryO9/OzsVlf2mzVIWQNbFnhTHRGUQMYI7lDphqWOz078v6qcmqO/obxbAltfARGD6qO/U2zfI0/I4554vO8HNUX3prNFuOmR8p/XwOlDtyar3210XnOhr7Y+t6HJYJYmHiMilURZaxZr+vEQ16qHTTIX1ASRyyTaY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hh6to2sE; arc=none smtp.client-ip=209.85.208.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-57a4ce82f30so2530524a12.0; Fri, 07 Jun 2024 05:41:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717764066; x=1718368866; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=yKtNQs0cbsSHfNHTh13rn73l9D6LhJGK9zYecrPTZnE=; b=hh6to2sEWJBHVxG8INLPnS3WhzR9aunpZ12nLOmmHMdF9ZGP53y6nlKLyhAGtVvtzI 4Y3sXDCpMN75zZTFxzFqmbBvU6cP3GfYGah5XKD26XuTBGRkTQZ8DRzhMWx7FLW4LYux /UZ2lZFYVX72ynGco7ug4cpUy8VSVGCpwAkIDfQwsH/05EadrCBfrAoEMCtRFbuWUySA COKji/EgauiGTjGlYvtR/K/8+xQBvMNgsthz0o+bbvZMADWl6uuMJ+OXZuD1Yw3lLeGz 5la+Hgo6qkixtqiHagpirAIpKGHR6imCu39M5Dy3UdSUry4n3chI0BTce0qEhSTZypsE qKTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717764066; x=1718368866; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yKtNQs0cbsSHfNHTh13rn73l9D6LhJGK9zYecrPTZnE=; b=BLLXqsXp2uR3Gnj50aVnzNtLj5aQ6ZKrBIUdgMRUy9mUVVIqsCxofS8TF9VKhPetgu bQEVbDynHiIeDDTp5lGNWdqsNjm2djWVxQVyxH4UxZaS5NaZnjoUPEtRi0SLp5r9+hq4 F5gO7dLpg+r6cS2v7PyqG6bZXO0QW18ZP5v5WE+IvVIo/kCZmNRJRcRi1rjfF7aK02RE 4CAFcxo0knDsMRZK64L5rt/Y7pgdskDV1lO7oqOkEM7C7FN6dtA+hnCBmWW1JtCULxZ3 T3lQu6IVbgATEgWOV16cKctn9mtQHRG45hSGC2WIjtSzX/m3E09+fnKsx+pQzdAEwiRu 7dsg== X-Forwarded-Encrypted: i=1; AJvYcCX60FVqHSAzPcJ5cqH2sljva33jgKf2VLQPADjAi2FqW/gl4OBWvgA/KgbLw7CWMJ+P1syoC3y5VcIkSRn9kwEThmCiZBOAn++fYuR5J6jmPQbmP34CVZ9ACpjAELkX3edDqISywmmz1Q== X-Gm-Message-State: AOJu0YySBqEbm5dCvPrwDPyPG1q6gQNGUPITjUKMi05anBQ76Zvk/gJt fvwE2BX4OR9+OtD01VRaiKqZ304EDXLmNltYdYlUnEiqe914Qeg= X-Received: by 2002:a50:9518:0:b0:57a:2fc0:9ee7 with SMTP id 4fb4d7f45d1cf-57c509901c0mr1633278a12.42.1717764065849; Fri, 07 Jun 2024 05:41:05 -0700 (PDT) Received: from ?IPV6:2a02:810b:f40:4600:ede8:94dd:c500:cf53? ([2a02:810b:f40:4600:ede8:94dd:c500:cf53]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57aae1009d9sm2684805a12.41.2024.06.07.05.41.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Jun 2024 05:41:05 -0700 (PDT) Message-ID: Date: Fri, 7 Jun 2024 14:41:04 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/4] drm/panel: kd101ne3: add new panel driver To: Dmitry Baryshkov , zhaoxiong lv 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 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> Content-Language: en-US From: Alex Bee In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 need different reset-/enable timings (what I doubt) you'll have to extend struct jadard_panel_desc. In any case you'll have to put dsi->mode_flags in there as your panel uses MIPI_DSI_MODE_LPM what the currently supported don't need. Alex. >> 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