All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dillon Min <dillon.minfei@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	"Noralf Trønnes" <noralf@tronnes.org>,
	"Dave Airlie" <airlied@linux.ie>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"Doug Anderson" <dianders@chromium.org>,
	"open list:DRM PANEL DRIVERS" <dri-devel@lists.freedesktop.org>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	"Sam Ravnborg" <sam@ravnborg.org>
Subject: Re: [PATCH 2/2] drm/panel: Add ilitek ili9341 panel driver
Date: Wed, 21 Jul 2021 15:27:44 +0800	[thread overview]
Message-ID: <CAL9mu0+C1p1mMEbw90Z66KCt1Rp2=GV=RcXgZizJRxu8rVaOGw@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdZZyN_8ND52+piHYaksujwwwTMigkv6eL0fih_2dYZ4Lg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3089 bytes --]

Hi Linus,

Thanks for your detailed review.

On Sun, 18 Jul 2021 at 08:31, Linus Walleij <linus.walleij@linaro.org>
wrote:

> Hi Dillon,
>
> thanks for your patch!
>
> On Fri, Jul 16, 2021 at 12:20 PM <dillon.minfei@gmail.com> wrote:
>
> > From: Dillon Min <dillon.minfei@gmail.com>
> >
> > This driver combine tiny/ili9341.c mipi_dbi_interface driver
> > with mipi_dpi_interface driver, can support ili9341 with serial
> > mode or parallel rgb interface mode by register configuration.
> >
> > Signed-off-by: Dillon Min <dillon.minfei@gmail.com>
>
> Nice!
>
> > +config DRM_PANEL_ILITEK_ILI9341
> > +       tristate "Ilitek ILI9341 240x320 QVGA panels"
> > +       depends on OF && SPI
> > +       depends on DRM_KMS_HELPER
> > +       depends on DRM_KMS_CMA_HELPER
> (...)
> > +#include <drm/drm_gem_framebuffer_helper.h>
> > +#include <drm/drm_gem_cma_helper.h>
> > +#include <drm/drm_fb_helper.h>
> > +#include <drm/drm_gem_atomic_helper.h>
> > +#include <drm/drm_atomic_helper.h>
>
> Hm now there is a (partial) KMS driver in the panel driver, kinda, sorta.
> Is this the right split? I'm not the best with DRM infrastructure,
> just asking.
>

I tried to remove one of these two headers, but got compile errors:

linux/drivers/gpu/drm/panel/panel-ilitek-ili9341.c:719:3: error: implicit
declaration of function 'drm_atomic_helper_shutdown' [-Werror
=implicit-function-declaration]
  719 |   drm_atomic_helper_shutdown(drm);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~
or

linux/drivers/gpu/drm/panel/panel-ilitek-ili9341.c:562:16: error:
'drm_gem_simple_display_pipe_prepare_fb' undeclared here (not in a function)
  562 |  .prepare_fb = drm_gem_simple_display_pipe_prepare_fb,
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Actually, these two headers are merged from tiny/ili9341.c to support only-
DBI interface, I'm
not sure whether the maintainers will ask me to remove (tiny/ili9341.c)
code from this patch.
If so, I will remove these headers.

But, It's a little strange to support different interfaces from different
drivers.


> > +struct ili9341_config {
> > +       u32 max_spi_speed;
> > +       /** @mode: the drm display mode */
> > +       const struct drm_display_mode mode;
> > +       /* @ca: TODO: need comments for this register */
> > +       u8 ca[ILI9341_CA_LEN];
>
> These are all in the datasheet but I guess you plan to add these
> TODOs later. (It's fine I suppose, the driver is already very nice.)
>

Yes, I didn't get detailed information about these registers from this
panel datasheet, so leave TODOs here.


> > +       struct regulator *vcc;
>
> Use the right name of the pin for the regulator. I guess this is actually
> vci. I would implement all three regulators and get them as bulk.
> See e.g. drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c
> for an example on how to get and enable several regulators
> using bulk.
>
> The regulator framework will provide dummy regulators if you
> didn't define some of them so it is fine to just provide one or two.
>
>
Really appreciate your suggestion, will add to v2.


> Yours,
> Linus Walleij
>

[-- Attachment #2: Type: text/html, Size: 6635 bytes --]

  reply	other threads:[~2021-07-21  7:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16 10:20 [PATCH 0/2] Add ilitek ili9341 panel driver dillon.minfei
2021-07-16 10:20 ` dillon.minfei
2021-07-16 10:20 ` [PATCH 1/2] dt-bindings: display: panel: Add ilitek ili9341 panel bindings dillon.minfei
2021-07-16 10:20   ` dillon.minfei
2021-07-18  0:16   ` Linus Walleij
2021-07-18  0:16     ` Linus Walleij
2021-07-21  7:29     ` Dillon Min
2021-07-21  8:08       ` Fwd: " Dillon Min
2021-07-20  5:32   ` kernel test robot
2021-07-20  5:32     ` kernel test robot
2021-07-20  5:32     ` kernel test robot
2021-07-21  7:39     ` Dillon Min
2021-07-21  7:39       ` Dillon Min
2021-07-21  8:11       ` Fwd: " Dillon Min
2021-07-16 10:20 ` [PATCH 2/2] drm/panel: Add ilitek ili9341 panel driver dillon.minfei
2021-07-16 10:20   ` dillon.minfei
2021-07-18  0:31   ` Linus Walleij
2021-07-18  0:31     ` Linus Walleij
2021-07-21  7:27     ` Dillon Min [this message]
2021-07-21  8:13       ` Fwd: " Dillon Min

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAL9mu0+C1p1mMEbw90Z66KCt1Rp2=GV=RcXgZizJRxu8rVaOGw@mail.gmail.com' \
    --to=dillon.minfei@gmail.com \
    --cc=airlied@linux.ie \
    --cc=alexandre.torgue@foss.st.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=noralf@tronnes.org \
    --cc=robh+dt@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.