From: Linus Walleij <linus.walleij@linaro.org>
To: Doug Anderson <dianders@chromium.org>
Cc: "Paul Cercueil" <paul@crapouillou.net>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Sam Ravnborg" <sam@ravnborg.org>,
dri-devel <dri-devel@lists.freedesktop.org>,
"Noralf Trønnes" <noralf@tronnes.org>
Subject: Re: [PATCH v5] drm/panel: db7430: Add driver for Samsung DB7430
Date: Fri, 11 Jun 2021 00:38:50 +0200 [thread overview]
Message-ID: <CACRpkdZ3=sjxi4VUi35Fa51amoxroOf1GLQP8A2kfZxVgsHwkQ@mail.gmail.com> (raw)
In-Reply-To: <CAD=FV=XVCNZTPmvLPx7uvU8r8uuHai2Mxpxt0-Jv-ryD=grAMw@mail.gmail.com>
On Fri, Jun 11, 2021 at 12:30 AM Doug Anderson <dianders@chromium.org> wrote:
> > + mipi_dbi_command(dbi, MIPI_DCS_SET_ADDRESS_MODE, 0x0a);
>
> I would still prefer it if there was some type of error checking since
> SPI commands can fail and could potentially fail silently. What about
> at least this (untested):
>
> #define db7430_dbi_cmd(_db, _cmd, _seq...) \
> do {
> int _ret = mipi_dbi_command(_db->dbi, _cmd, _seq);
> if (_ret)
> dev_warn(_db->dev, "DBI cmd %d failed (%d)\n", _cmd, _ret);
> } while (0)
>
> Then at least you know _something_ will show up in the logs if there's
> a transfer failure instead of silence?
>
> If you truly don't want the error checking then I guess I won't
> insist, but it feels like the kind of thing that will bite someone
> eventually... In any case, I'm happy to add this now (especially since
> the DBI stuff is Acked now).
This looks more like something that should be done in
mipi_dbi_command() in include/drm/drm_mipi_dbi.h
which claims:
* Returns:
* Zero on success, negative error code on failure.
*/
But no it does not return anything:
#define mipi_dbi_command(dbi, cmd, seq...) \
({ \
const u8 d[] = { seq }; \
mipi_dbi_command_stackbuf(dbi, cmd, d, ARRAY_SIZE(d)); \
})
I'll fix up the include and apply then we can think about
what to do with mipi_dbi_command().
Yours,
Linus Walleij
next prev parent reply other threads:[~2021-06-10 22:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-10 22:05 [PATCH v5] drm/panel: db7430: Add driver for Samsung DB7430 Linus Walleij
2021-06-10 22:30 ` Doug Anderson
2021-06-10 22:38 ` Linus Walleij [this message]
2021-06-10 22:42 ` Doug Anderson
2021-06-10 23:00 ` Linus Walleij
2021-06-10 23:05 ` Doug Anderson
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='CACRpkdZ3=sjxi4VUi35Fa51amoxroOf1GLQP8A2kfZxVgsHwkQ@mail.gmail.com' \
--to=linus.walleij@linaro.org \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=noralf@tronnes.org \
--cc=paul@crapouillou.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).