Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp96718lqj; Sat, 1 Jun 2024 09:23:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUAfidvu/WAN8/Ihqohuhu6bCgQWuBnZLQ3MSDTJ5Up3O8Jzt2Kb66YgTAPIbG6E9tAirxWvAaPKp5PPchNGI7IMfRa1h9GS7g0aznzug== X-Google-Smtp-Source: AGHT+IHOqx9C09XyeeWl4t8Cu+UBgbohSMeGam+PE7+Bpy0gnk1qF2IIdkirMQm6yRwyGGOyWrym X-Received: by 2002:a81:9103:0:b0:60a:576:7b79 with SMTP id 00721157ae682-62c7984ccbfmr52703587b3.41.1717259034987; Sat, 01 Jun 2024 09:23:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717259034; cv=pass; d=google.com; s=arc-20160816; b=gf3b/QoF3E+HNgyJbsKp7TUw2LjI1AFAlGTmGGUEcUg9090qM9NbQc7Tzqz6D36Zsa Ujr/54WuuMSIpQ6+oMbNaKr1MEsXHxfbLP33pBIbhBvRFzpEPgm7cqUaUMMWkf94rN9b f4DTvwuzbbEvGCN7jNDraVfiGLXgVs7cne9ZuwVLkf/l2tOYETNFeZyijqJhGNxFkmkc pTjxX7KMU+4Azcr8haRM8gOHV/eMAN5449PtOrnDRM8OZt3/JTGMslFjpB5vIrTYXHL4 lk4Ti+s/ifE786s7HITa5nzfvZw1xEB6A4qfh2nvhUydIr4hbzgFgf+bo87aLiC771h8 ZHlw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=AFYbHI/iftzeCVZcgyHEUN23jefa2GL40WdI+hSfcUY=; fh=p0NF52ydnHt1Btzn8Lyon58pS4/K+6ymzn4afro+uYw=; b=bY4ViHvyDBuQi5e9fdnkVgyij5tM30TtVkWkYTltSUuTebKEImBCrqyzsZYUUhy76F jimAfURGO4jXu1w05VL9zUppvKFLvv3xDtkfnjuXtNV9xWQPTpCL9iyfD0Dkz+f32fRZ Cjeod+qBV4dLwRZcitxNrjlUjo09yc6SyapBx6hwWhjRQNFPyknHSvzkuC7tdj3paqCF DRFmXVE0C+egXX6TnQoSf00wJKdCwusVeUG0KblhOliXLNRb697ygB/4+64+3BqzgVDC 6lljBqAkT3lqXqc2UJVNE2DrKrCrmR5uRpX4wDb9lizypXdOhpn4l3MVpqAZnN35DcAw k2VQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Vd+0Ghtc; 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-197945-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197945-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-794f2f05a26si460764585a.39.2024.06.01.09.23.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 09:23:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197945-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=@linaro.org header.s=google header.b=Vd+0Ghtc; 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-197945-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197945-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9EA521C20DD2 for ; Sat, 1 Jun 2024 16:23:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 930D21534EF; Sat, 1 Jun 2024 16:23:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Vd+0Ghtc" Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (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 12DC11E502 for ; Sat, 1 Jun 2024 16:23:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717259025; cv=none; b=TMC5mnfrgBYwNHsGQQWaXzyYntWiJcu2NIBuNGKSEnPVw4YEI23c/hkjnnQoZ3ANDmDncAXndYFwcN011Vn0DtHgdiD5AbglPR4i0EiWZNkMEgu9dA18DHGYgCLEP/XqYuRIyxop3Df5ERZTRX2JIDFzsJJswQKw0/EZRcdn/Bk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717259025; c=relaxed/simple; bh=sWSgOiMeSu3hdqkX7RXlbgROaZVfjDiL1k3XhWlqymI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SeYPyQOmgrp8DAyEQsRsVsFYuInMYccC1fRxeJxAs7KUGpZI70EML7KbEEXsIePwfMsM1jW+ZntLhfo5xdFtlj5ChHziTkbht+fIrvJ/E9rRZL7kJ15MiKMgI45+brAR0of7Bw5zOJMhrOH3vG3FeJde9CNYQ65KqrfyIXZN27c= 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=Vd+0Ghtc; arc=none smtp.client-ip=209.85.208.171 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-lj1-f171.google.com with SMTP id 38308e7fff4ca-2eaa80cb573so700101fa.1 for ; Sat, 01 Jun 2024 09:23:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717259021; x=1717863821; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=AFYbHI/iftzeCVZcgyHEUN23jefa2GL40WdI+hSfcUY=; b=Vd+0GhtcZTWOw0mpKYC/OjElvOlrOYfBcYzp7ltZcjNGYT1q9VxSoTgRof90iPx1ev NAPwyXZ34lplamR/oFGs0+zxnTKBzX06ptsRbtlij5djj0Pvx3JSTqMiIk1GHqE3QWq/ Zbnx7wkHdOfWiZ3GplmL6mZ4rBTT/arIFBbbdGOtLUlxtCe1wWjFUz/oJriBe2C2uI8U 7BSMWElbWECNJlJncay53eijx0m1hrKmyjaUFGC7DkgMUbL//JXvP5o1sFJ3Z0U1EHm/ pX7EbLrWbIKfuz+r6AFau5bRjtxpdadCGnNveFkb2OiCicUB4OGwlV6XZ7PLV57qqSob 6Xkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717259021; x=1717863821; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=AFYbHI/iftzeCVZcgyHEUN23jefa2GL40WdI+hSfcUY=; b=mCbofKzsjkHpS0M1tsgy46cBakrQFJFNPug0zEqk9f3vSgbht6RZlRd3ZJqa1TxML6 Rmbg4pkd52mgaZdCch7YtLvXvxfdrnFRy9193jkbE4UiIQhbvJ9kEl3MKe+Ua6dJfaPA mSp5yvKo1EY8IsRI/3Z4IEdNIIovDoRUo3xz/dX49OyHIROje2zQFKdBhdnrdnliZeSN coKB5zWMHOkVuNodBQobeZECQ+3C0C0bJIP36IRGspt+KVXGQDYzqjEiV5OSHSSFqhUs ytJHLjn7bh60A2j3aVQmXWHqP4nDg+TXH4RrrHuq1n9Xb9mB5aFdoS4AB2M0XjYuqe0C koDA== X-Forwarded-Encrypted: i=1; AJvYcCVJEYw1Xn/y2DBAMBlaNoZbkDA9IsiFYeSUD5DnKmamPzfo8QhV4Q975xF3y1TNdHPHWQGxZdBQ5MG0TSkGM+qTi3n0HkFnp2buTkKx X-Gm-Message-State: AOJu0YxYORv3ZkSYOKg7T471+9+bmZtWT3sis32ao9nu3BUwSPAfcQaJ 4oasYaIKAWMFXZB/a+vwuIFz2bOuvkdV48KzSY8pPVHEokFcTwutnOe8oRXWWHU= X-Received: by 2002:a2e:7c10:0:b0:2e9:756f:cde0 with SMTP id 38308e7fff4ca-2ea9512a367mr27454421fa.23.1717259020714; Sat, 01 Jun 2024 09:23:40 -0700 (PDT) Received: from eriador.lumag.spb.ru (dzdbxzyyyyyyyyyyyykxt-3.rev.dnainternet.fi. [2001:14ba:a0c3:3a00::227]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2ea91bee773sm6157261fa.66.2024.06.01.09.23.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 09:23:40 -0700 (PDT) Date: Sat, 1 Jun 2024 19:23:38 +0300 From: Dmitry Baryshkov To: 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 Subject: Re: [PATCH v2 2/4] drm/panel: kd101ne3: add new panel driver Message-ID: References: <20240601084528.22502-1-lvzhaoxiong@huaqin.corp-partner.google.com> <20240601084528.22502-3-lvzhaoxiong@huaqin.corp-partner.google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240601084528.22502-3-lvzhaoxiong@huaqin.corp-partner.google.com> On Sat, Jun 01, 2024 at 04:45:26PM +0800, Zhaoxiong Lv wrote: > 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