From: Vincent ABRIOU <vincent.abriou@st.com>
To: Philippe CORNU <philippe.cornu@st.com>,
Thierry Reding <thierry.reding@gmail.com>,
David Airlie <airlied@linux.ie>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Andrzej Hajda <a.hajda@samsung.com>,
Yannick FERTRE <yannick.fertre@st.com>,
Benjamin Gaignard <benjamin.gaignard@linaro.org>,
Alexandre TORGUE <alexandre.torgue@st.com>
Subject: Re: [PATCH 1/4] drm/panel: otm8009a: fix backlight updates
Date: Mon, 14 May 2018 08:36:43 +0000 [thread overview]
Message-ID: <a33cea9b-d998-be36-dc8c-f13e58db4fde@st.com> (raw)
In-Reply-To: <20180423141054.13128-2-philippe.cornu@st.com>
Hi Philippe,
Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
BR
Vincent
On 04/23/2018 04:10 PM, Philippe Cornu wrote:
> Backlight updates was not working anymore since the good
> implementation of the dsi lpm mode in the dsi host driver.
> After a longer analysis, the backlight updates in dsi video
> mode require the dsi hs mode.
> Note: it is important to keep the dsi lpm mode for the rest
> of the driver as init sequence, sleep in/out... dsi commands
> work in lp mode.
>
> Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
> ---
> drivers/gpu/drm/panel/panel-orisetech-otm8009a.c | 18 ++++++++++++++++--
> 1 file changed, 16 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
> index 90f1ae4af93c..0fd2e0144d2b 100644
> --- a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
> +++ b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
> @@ -98,6 +98,20 @@ static void otm8009a_dcs_write_buf(struct otm8009a *ctx, const void *data,
> DRM_WARN("mipi dsi dcs write buffer failed\n");
> }
>
> +static void otm8009a_dcs_write_buf_hs(struct otm8009a *ctx, const void *data,
> + size_t len)
> +{
> + struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
> +
> + /* data will be sent in dsi hs mode (ie. no lpm) */
> + dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
> +
> + otm8009a_dcs_write_buf(ctx, data, len);
> +
> + /* restore back the dsi lpm mode */
> + dsi->mode_flags |= MIPI_DSI_MODE_LPM;
> +}
> +
> #define dcs_write_seq(ctx, seq...) \
> ({ \
> static const u8 d[] = { seq }; \
> @@ -387,7 +401,7 @@ static int otm8009a_backlight_update_status(struct backlight_device *bd)
> */
> data[0] = MIPI_DCS_SET_DISPLAY_BRIGHTNESS;
> data[1] = bd->props.brightness;
> - otm8009a_dcs_write_buf(ctx, data, ARRAY_SIZE(data));
> + otm8009a_dcs_write_buf_hs(ctx, data, ARRAY_SIZE(data));
>
> /* set Brightness Control & Backlight on */
> data[1] = 0x24;
> @@ -399,7 +413,7 @@ static int otm8009a_backlight_update_status(struct backlight_device *bd)
>
> /* Update Brightness Control & Backlight */
> data[0] = MIPI_DCS_WRITE_CONTROL_DISPLAY;
> - otm8009a_dcs_write_buf(ctx, data, ARRAY_SIZE(data));
> + otm8009a_dcs_write_buf_hs(ctx, data, ARRAY_SIZE(data));
>
> return 0;
> }
>
next prev parent reply other threads:[~2018-05-14 8:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-23 14:10 [PATCH 0/4] drm/panel: otm8009a: backlight fixes & improvements Philippe Cornu
2018-04-23 14:10 ` [PATCH 1/4] drm/panel: otm8009a: fix backlight updates Philippe Cornu
2018-05-14 8:36 ` Vincent ABRIOU [this message]
2018-04-23 14:10 ` [PATCH 2/4] drm/panel: otm8009a: fix glitches by moving backlight enable to otm8009a_enable() Philippe Cornu
2018-05-14 8:37 ` Vincent ABRIOU
2018-04-23 14:10 ` [PATCH 3/4] drm/panel: otm8009a: no message if probe success Philippe Cornu
2018-05-14 8:38 ` Vincent ABRIOU
2018-04-23 14:10 ` [PATCH 4/4] drm/panel: otm8009a: use new backlight api Philippe Cornu
2018-05-14 8:39 ` Vincent ABRIOU
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=a33cea9b-d998-be36-dc8c-f13e58db4fde@st.com \
--to=vincent.abriou@st.com \
--cc=a.hajda@samsung.com \
--cc=airlied@linux.ie \
--cc=alexandre.torgue@st.com \
--cc=benjamin.gaignard@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=philippe.cornu@st.com \
--cc=thierry.reding@gmail.com \
--cc=yannick.fertre@st.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
all inboxes | Powered by JetHome®