From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3D22C47254 for ; Sat, 9 May 2020 08:31:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 985992192A for ; Sat, 9 May 2020 08:31:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HBeVC7g8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728040AbgEIIb4 (ORCPT ); Sat, 9 May 2020 04:31:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726214AbgEIIbz (ORCPT ); Sat, 9 May 2020 04:31:55 -0400 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4996C061A0C; Sat, 9 May 2020 01:31:53 -0700 (PDT) Received: by mail-io1-xd41.google.com with SMTP id y26so4245624ioj.2; Sat, 09 May 2020 01:31:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=oMY/3sjFWC1UpDvzgv1fjSMjjGsRYq6az0tfm/ZfbUs=; b=HBeVC7g8EbYmHXyY64+VllupvU5PasK0EAVzLCWhwmChSN+ym06Qg/qJo7wOYZCs7r YTYdMhWmw58E22GLc1/hfSql7f9HSW/XbGCSYAWQtqPvSeEePG9HGSog9e+1QVSVDhSZ SrKGTjE5/FrIG20xQ7rS84ytqqwQpIWqzWkdB5o9WTpFJ+3shyBq4P6L8TSokfxDfbJo yrqHddRFbvkl4OGXjQwGmLkawr0wKP4dAjAn2+xXcs9b16Dio6Gp8i3AJTvq+X3v5On9 hBxI0syuaSIxMYj7zAf1wUr+FdLhqHtdEfIu4Rsqz3DQOkb/K0mijcGc8UxMicQQ+zF9 U27Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=oMY/3sjFWC1UpDvzgv1fjSMjjGsRYq6az0tfm/ZfbUs=; b=FPSWhiA751nCKQJV1TMMOJ/z1jHJpBv2AJP1xCB3P5p/7Mnwn+r2uTzCpBGSz0MYvS mSDceNkc+9yaDtXFXDB4zXEOPxMECuVPDauqkWGk+7B4v/qNwt6i3l/ZELQjTmY0un44 71hP/3Z23xlFiOtZcjnIRFL2BHQQUdE9TLgTsi7Ssiv70PD/3k2XjJkkqxkoqIjbR4kK NRqjtTHhaUJIeTJAiATbofJ83iaAjAAWtytNETChW8Zo0bSFKhQdnHDe7AbGSkx6sspI c/3Mi3/B1Yqf2+ZpYaJeq1alrgBd1DSX6U+kvGonXBmPqaZaQQjB+UKwXagPbvPtM51F fogQ== X-Gm-Message-State: AGi0Pubj+MYkoSCAHhkXvWxxq17if31gnw53l6mS2HU+Ccbovc6Inrrt FhKlZHFk2eO3KHcbAGlk1FzWaCRcxxUKL+6Fc40= X-Google-Smtp-Source: APiQypI2ZCoAh2bIVwu9IePr9OjjxWauYR21rvAWgk9/7RPzvJwK3sLc6kuCNTaD0sjCOCKTGQL1nBviJHt9cKLAoN8= X-Received: by 2002:a02:a40b:: with SMTP id c11mr6279582jal.62.1589013112824; Sat, 09 May 2020 01:31:52 -0700 (PDT) MIME-Version: 1.0 References: <1588911194-12433-1-git-send-email-dillon.minfei@gmail.com> <1588911194-12433-6-git-send-email-dillon.minfei@gmail.com> <20200508090247.GA11575@ravnborg.org> In-Reply-To: From: dillon min Date: Sat, 9 May 2020 16:31:40 +0800 Message-ID: Subject: Re: [PATCH v2 5/5] drm/panel: add panel driver for Ilitek ili9341 panels To: Sam Ravnborg Cc: robh+dt@kernel.org, mcoquelin.stm32@gmail.com, Alexandre Torgue , thierry.reding@gmail.com, airlied@linux.ie, Daniel Vetter , Michael Turquette , sboyd@kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-clk@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi sam, all, i'm not sure you had receive this mail , as gmail's html encoded messages blocked by linux arm kernel mailing list. so, resent it in plain text again. with my name "dillon: " at left sorry for trouble. dillon best regards dillon min =E4=BA=8E2020=E5=B9=B45=E6=9C=888=E6= =97=A5=E5=91=A8=E4=BA=94 =E4=B8=8B=E5=8D=886:13=E5=86=99=E9=81=93=EF=BC=9A > Hi Sam, Thanks for your comments, i will rework this panel driver after l3gd20 patch submission. > Sam Ravnborg =E4=BA=8E2020=E5=B9=B45=E6=9C=888=E6=97= =A5=E5=91=A8=E4=BA=94 =E4=B8=8B=E5=8D=885:02=E5=86=99=E9=81=93=EF=BC=9A >> >> Hi Dillon. >> >> Patch submissions starts to look fine. >> >> On Fri, May 08, 2020 at 12:13:14PM +0800, dillon.minfei@gmail.com wrote: >> > From: dillon min >> > >> > This is a driver for 320x240 TFT panels, accepting a rgb input >> > streams that get adapted and scaled to the panel. > This driver is, I suppose, prepared to be a driver for ILI9341 based > panles, and as such not for a fixed resolution. > I expect (hope) we in the future will see more panels added. > dillon: As i checked ili9341 datasheets, this panel just support 240x320 resolution only. if i'm wrong , please correct me. thanks https://cdn-shop.adafruit.com/datasheets/ILI9341.pdf This panel can support 9 different kinds of interface , "3/4-line Serial Interface" have been supported by tiny/ili9341.c. i was verified it but the performance on stm32f4 is very low. currently, i just have stm32f429-disco in hands, with 18-bit parallel rgb bus connected on this board. reference to panel-ilitek-ili9322 and panel-ilitek-ili9881 driver, i have some plan to rewrite this driver. 1 add your below comments in. 2 use dc-gpio, reset-gpio, rgb-interface-bits from dts to config panel interface. 3 drop regmap, porting drm_mipi_dbi's mipi_dbi_command to config panel paramter. like tiny/ili9341.c 4 support rgb-16, rgb-18 interface. 5 use optional regulator or power gpio to control panel's power, as panel power is always on for my board, so i can't test this part. could i add the code which can't be tested? 6 support rotation in panel config (currently , i rotate the screen by kernel cmdline paramter) if you have any other common panel configuration should be add , please inform me. thanks. >> >> >> Some things to fix, see comments in the follwoing. >> >> Sam >> >> > >> > Signed-off-by: dillon min >> > --- >> > drivers/gpu/drm/panel/Kconfig | 8 + >> > drivers/gpu/drm/panel/Makefile | 1 + >> > drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 561 ++++++++++++++++++= +++++++++ >> > 3 files changed, 570 insertions(+) >> > create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9341.c >> > >> > diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kco= nfig >> > index a1723c1..e42692c 100644 >> > --- a/drivers/gpu/drm/panel/Kconfig >> > +++ b/drivers/gpu/drm/panel/Kconfig >> > @@ -95,6 +95,14 @@ config DRM_PANEL_ILITEK_IL9322 >> > Say Y here if you want to enable support for Ilitek IL9322 >> > QVGA (320x240) RGB, YUV and ITU-T BT.656 panels. >> > >> > +config DRM_PANEL_ILITEK_IL9341 >> ILI9341 - so the config name matches the name of the driver IC. >> >> > + tristate "Ilitek ILI9341 240x320 QVGA panels" >> > + depends on OF && SPI >> > + select REGMAP >> > + help >> > + Say Y here if you want to enable support for Ilitek IL9341 >> > + QVGA (240x320) RGB panels. >> See comment to the changelog, the driver is more generic - I assume. >> So the wording here can be improved to express this. >> dillon: Add support RGB 16bits and RGB 18bits bus only ? >> >> > + >> > config DRM_PANEL_ILITEK_ILI9881C >> > tristate "Ilitek ILI9881C-based panels" >> > depends on OF >> > diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Ma= kefile >> > index 96a883c..d123543 100644 >> > --- a/drivers/gpu/drm/panel/Makefile >> > +++ b/drivers/gpu/drm/panel/Makefile >> > @@ -8,6 +8,7 @@ obj-$(CONFIG_DRM_PANEL_ELIDA_KD35T133) +=3D panel-elid= a-kd35t133.o >> > obj-$(CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02) +=3D panel-feixin-k101-im= 2ba02.o >> > obj-$(CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D) +=3D panel-feiyang-fy= 07024di26a30d.o >> > obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) +=3D panel-ilitek-ili9322.o >> > +obj-$(CONFIG_DRM_PANEL_ILITEK_IL9341) +=3D panel-ilitek-ili9341.o >> > obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9881C) +=3D panel-ilitek-ili9881c.o >> > obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) +=3D panel-innolux-p079zca.o >> > obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) +=3D panel-jdi-lt070me05000.= o >> > diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9341.c b/drivers/gp= u/drm/panel/panel-ilitek-ili9341.c >> > new file mode 100644 >> > index 0000000..ec22d80 >> > --- /dev/null >> > +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c >> > @@ -0,0 +1,561 @@ >> > +// SPDX-License-Identifier: GPL-2.0-only >> > +/* >> > + * Ilitek ILI9341 TFT LCD drm_panel driver. >> > + * >> > + * This panel can be configured to support: >> > + * - 16-bit parallel RGB interface >> The interface to ILI9341 is SPI, and the interface between the ILI9341 >> and the panel is more of an itnernal thing. Or did I get this worng? >> dillon: SPI is for register configuration. RGB parallel for data transfer > >> > + * >> > + * Copyright (C) 2020 Dillon Min >> > + * Derived from drivers/drm/gpu/panel/panel-ilitek-ili9322.c >> > + */ >> > + >> > +#include >> > +#include >> > +#include >> > +#include >> > +#include >> > +#include >> > +#include >> > + >> > +#include