From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9C40D29B for ; Tue, 10 Oct 2023 11:22:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="PPIema1g" Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 815BB9E for ; Tue, 10 Oct 2023 04:22:03 -0700 (PDT) Received: by mail-oi1-x236.google.com with SMTP id 5614622812f47-3ae2ec1a222so3901051b6e.2 for ; Tue, 10 Oct 2023 04:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696936923; x=1697541723; 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=iIDqPxwTUbRqPTvD/oGymQRcW9d2LB01AyGLCtA47MU=; b=PPIema1gXS6/Xm+uH9XFcfutEisNxevhua36nNhU8lQWFJRPorSt5JaR8hTG4I5zhG LwuPLGTvnjSfa5/D9anLPJT4DcXj7FWl3+D+7nueLV049HxpkKgFulABeArnnk0SfYFq 16K+UqSH+X2maNC2Q4RxckrNTYb6781Xre2cwES7/P0ZFedENvCB+31fx32Y9NOeLaXb sJ8W42KhurNYjrZWnrvPG4rvoIvDErWroNwtw5Hclqk+q25Zmk3Hx6LhT3UNkTSPNyDm h+S36G7wAuyK/zNmyx4xfrc6mYRtGWatqkvk+EPcx1PGVrIwwPLwSX0tXgy9M/bUtZqR L0zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696936923; x=1697541723; 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=iIDqPxwTUbRqPTvD/oGymQRcW9d2LB01AyGLCtA47MU=; b=n3rbH4/kXsAR508M0pQ0Ok7wxq9gPpUns4gk9NKM77jMcxe223jD6qDVmXjawruJa2 6K5amgjH3ZMJvbdBm+Emt0xfGIfU8b/EI6/3nkM0hu1YHJ/0O3W48KAT18+Z3C7HJeUO Nf8hR37EblG+Q6TJqEhkS3WuFWOI5qB5TeqGP9BQTdlF9qD4zLKMKm8+RAh+QbjhWBx3 bdXtGgAqKLn4cKCwtvSS+QNEDaa9CqSjTf38kGzAoHqE9RsozB4j90/oBD8HQPnDjt5g fEZyBSjodU0v81zA+g5mGB9oU0pYW1SmzEZJyhUQOhx5ipS9v8YtLW3nOGiDRcjAEvPM B/uQ== X-Gm-Message-State: AOJu0Yz/G2rCwP/o1muUQreeckeS/PTd6Vu0/R9ZuZSB/O0jAw86GOpy HY/PE6cjTK+5mphYWcgxJDpLWLKLXDpej9OlvkuOUg== X-Google-Smtp-Source: AGHT+IEPsHAdybNHlhqULqHwmnZcm8PamxWfzC8OgThdXUdvxqpngIMjRF8ls07V5GFoCscEx4M+8PgbpcFucQXDt7E= X-Received: by 2002:a05:6358:5e0f:b0:134:e549:50d6 with SMTP id q15-20020a0563585e0f00b00134e54950d6mr22484878rwn.10.1696936922655; Tue, 10 Oct 2023 04:22:02 -0700 (PDT) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231007060639.725350-1-yangcong5@huaqin.corp-partner.google.com> <20231007060639.725350-2-yangcong5@huaqin.corp-partner.google.com> In-Reply-To: From: cong yang Date: Tue, 10 Oct 2023 19:21:51 +0800 Message-ID: Subject: Re: [v1 1/2] drm/panel: ili9882t: Break out as separate driver To: Doug Anderson Cc: sam@ravnborg.org, neil.armstrong@linaro.org, daniel@ffwll.ch, hsinyi@google.com, linus.walleij@linaro.org, swboyd@chromium.org, airlied@gmail.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 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Thanks for the review,I will modify these in V2. On Tue, Oct 10, 2023 at 4:44=E2=80=AFAM Doug Anderson = wrote: > > Hi, > > On Fri, Oct 6, 2023 at 11:07=E2=80=AFPM Cong Yang > wrote: > > > > From: Linus Walleij > > > > The Starry ILI9882t-based panel should never have been part of the boe > > tv101wum driver, it is clearly based on the Ilitek ILI9882t display > > controller and if you look at the custom command sequences for the > > panel these clearly contain the signature Ilitek page switch (0xff) > > commands. The hardware has nothing in common with the other panels > > supported by this driver. > > > > Break this out into a separate driver and config symbol instead. > > > > If the placement here is out of convenience for using similar code, > > we should consider creating a helper library instead. > > > > Signed-off-by: Linus Walleij > > Signed-off-by: Cong Yang > > --- > > drivers/gpu/drm/panel/Kconfig | 9 + > > drivers/gpu/drm/panel/Makefile | 1 + > > .../gpu/drm/panel/panel-boe-tv101wum-nl6.c | 371 --------- > > drivers/gpu/drm/panel/panel-ilitek-ili9882t.c | 752 ++++++++++++++++++ > > 4 files changed, 762 insertions(+), 371 deletions(-) > > create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9882t.c > > > > diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kcon= fig > > index ecb22ea326cb..99e14dc212ec 100644 > > --- a/drivers/gpu/drm/panel/Kconfig > > +++ b/drivers/gpu/drm/panel/Kconfig > > @@ -203,6 +203,15 @@ config DRM_PANEL_ILITEK_ILI9881C > > Say Y if you want to enable support for panels based on the > > Ilitek ILI9881c controller. > > > > +config DRM_PANEL_ILITEK_ILI9882T > > + tristate "Ilitek ILI9882t-based panels" > > + depends on OF > > + depends on DRM_MIPI_DSI > > + depends on BACKLIGHT_CLASS_DEVICE > > + help > > + Say Y if you want to enable support for panels based on the > > + Ilitek ILI9882t controller. > > We'll of course run into the same problem we always run into when > Kconfig symbols get renamed or broken apart: people will have to know > to update their configs to include this. Not much we can do about it, > though. :-/ optional: I guess you could theoretically also include an > extra patch in your series to 'arch/arm64/configs/defconfig' enabling > this new config, since the old panel was enabled there... > > > > diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c b/drivers/gp= u/drm/panel/panel-ilitek-ili9882t.c > > new file mode 100644 > > index 000000000000..bbfcffe65623 > > --- /dev/null > > +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c > > @@ -0,0 +1,752 @@ > > +// SPDX-License-Identifier: GPL-2.0 > > +/* > > + * Panels based on the Ilitek ILI9882T display controller. > > + */ > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > +#include > > + > > +#include