From: David Lechner <david@lechnology.com>
To: "Noralf Trønnes" <noralf@tronnes.org>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 4/6] drm/tinydrm/mipi-dbi: Add poweron-reset functions
Date: Mon, 8 Jan 2018 19:40:29 -0600 [thread overview]
Message-ID: <f0cf938a-aed9-6668-1940-072d61d48b76@lechnology.com> (raw)
In-Reply-To: <06c542c7-b114-227d-f77d-3d07bae97ec6@lechnology.com>
On 01/08/2018 07:38 PM, David Lechner wrote:
> On 01/07/2018 11:44 AM, Noralf Trønnes wrote:
>> Split out common poweron-reset functionality.
>>
>> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
>> ---
>> drivers/gpu/drm/tinydrm/mi0283qt.c | 20 ++----------
>> drivers/gpu/drm/tinydrm/mipi-dbi.c | 63 ++++++++++++++++++++++++++++++++++++++
>> drivers/gpu/drm/tinydrm/st7586.c | 9 ++----
>> drivers/gpu/drm/tinydrm/st7735r.c | 8 ++---
>> include/drm/tinydrm/mipi-dbi.h | 2 ++
>> 5 files changed, 73 insertions(+), 29 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/tinydrm/mi0283qt.c b/drivers/gpu/drm/tinydrm/mi0283qt.c
>> index c69a4d958f24..2a78bcd35045 100644
>> --- a/drivers/gpu/drm/tinydrm/mi0283qt.c
>> +++ b/drivers/gpu/drm/tinydrm/mi0283qt.c
>> @@ -49,31 +49,17 @@
>> static int mi0283qt_init(struct mipi_dbi *mipi)
>> {
>> - struct tinydrm_device *tdev = &mipi->tinydrm;
>> - struct device *dev = tdev->drm->dev;
>> u8 addr_mode;
>> int ret;
>> DRM_DEBUG_KMS("\n");
>> - ret = regulator_enable(mipi->regulator);
>> - if (ret) {
>> - DRM_DEV_ERROR(dev, "Failed to enable regulator %d\n", ret);
>> + ret = mipi_dbi_poweron_conditional_reset(mipi);
>> + if (ret < 0)
>> return ret;
>> - }
>> -
>> - /* Avoid flicker by skipping setup if the bootloader has done it */
>> - if (mipi_dbi_display_is_on(mipi))
>> + if (ret > 0)
>> return 0;
>
> If I am reading the patch right, it looks like there are two
>
> if (ret > 0)
> return 0;
>
> in a row with nothing in between when this is applied.
>
I see now that I missed < vs. >. Probably better to say (ret == 1) instead of (ret > 0).
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-01-09 1:40 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-07 17:43 [PATCH v2 0/6] drm/tinydrm: Cleanup Noralf Trønnes
2018-01-07 17:44 ` [PATCH v2 1/6] drm/tinydrm/mi0283qt: Use common include order Noralf Trønnes
2018-01-07 17:44 ` [PATCH v2 2/6] drm/tinydrm/mi0283qt: Remove ili9341.h Noralf Trønnes
2018-01-07 17:44 ` [PATCH v2 3/6] drm/tinydrm/mipi-dbi: Add mipi_dbi_enable_flush() Noralf Trønnes
2018-01-09 1:23 ` David Lechner
2018-01-07 17:44 ` [PATCH v2 4/6] drm/tinydrm/mipi-dbi: Add poweron-reset functions Noralf Trønnes
2018-01-07 20:03 ` Noralf Trønnes
2018-01-09 1:38 ` David Lechner
2018-01-09 1:40 ` David Lechner [this message]
2018-01-09 15:01 ` Noralf Trønnes
2018-01-10 3:04 ` David Lechner
2018-01-07 17:44 ` [PATCH v2 5/6] drm/tinydrm/mi0283qt: Let the display pipe handle power Noralf Trønnes
2018-01-09 1:44 ` David Lechner
2018-01-07 17:44 ` [PATCH v2 6/6] drm/tinydrm: Embed the mode in tinydrm_connector Noralf Trønnes
2018-01-09 1:46 ` David Lechner
2018-01-09 10:08 ` Daniel Vetter
2018-01-09 14:05 ` Noralf Trønnes
2018-01-10 3:09 ` David Lechner
2018-01-10 8:06 ` Daniel Vetter
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=f0cf938a-aed9-6668-1940-072d61d48b76@lechnology.com \
--to=david@lechnology.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=noralf@tronnes.org \
/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