Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Rob Clark <robdclark@gmail.com>
Cc: "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Bjorn Andersson <bjorn.andersson@sonymobile.com>
Subject: Re: [PATCH] drm/panel: auo novatek 1080p video mode panel
Date: Mon, 17 Aug 2015 14:07:10 +0200	[thread overview]
Message-ID: <20150817120708.GJ8453@ulmo.nvidia.com> (raw)
In-Reply-To: <CAF6AEGte6f4-yFd6VzaxpQmRprBd=9VZZYJoXxdS18QtcGzBOA@mail.gmail.com>

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

On Fri, Aug 07, 2015 at 12:11:31PM -0400, Rob Clark wrote:
> On Fri, Aug 7, 2015 at 9:19 AM, Thierry Reding <thierry.reding@gmail.com> wrote:
> > On Tue, Jul 21, 2015 at 03:36:02PM -0400, Rob Clark wrote:
[...]
> >> +static int auo_panel_on(struct auo_panel *auo)
> >> +{
> >> +     struct mipi_dsi_device *dsi = auo->dsi;
> >> +     int ret;
> >> +
> >> +     dsi->mode_flags |= MIPI_DSI_MODE_LPM;
> >
> > This is weird.
> >
> >> +     ret = mipi_dsi_dcs_set_display_on(dsi);
> >> +     if (ret < 0)
> >> +             return ret;
> >> +
> >> +     msleep(40);
> >> +
> >> +     return 0;
> >> +}
> >> +
> >> +static int auo_panel_off(struct auo_panel *auo)
> >> +{
> >> +     struct mipi_dsi_device *dsi = auo->dsi;
> >> +     int ret;
> >> +
> >> +     dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
> >
> > And this even more. Doesn't the panel work when you simply send
> > everything in low-power mode?
> 
> I wouldn't expect low power mode to have enough bandwidth for the
> video signal.. but otoh it seems like I need to use lpm for
> power-on/off sequence.  Maybe we should wrap that up in a helper to
> enable/disable lpm?  But that seemed a bit overkill.

I think there's a misunderstanding, which arguable might stem from a
lack of documentation. The intention for MIPI_DSI_MODE_LPM was to be
used in conjunction with "host-driven" command mode.

Perhaps I should elaborate on the vocabulary here: Tegra supports two
types of command mode: "host-driven" and "DC-driven". Host driven
command mode is used to perform panel setup (using DCS and vendor-
specific commands). "DC-driven" command mode is used to update the
framebuffer using write_memory_start and write_memory_continue DCS
commands directly generated by the DSI controller.

In the latter case you'd obviously want to run in high-speed mode to
achieve the throughput necessary to drive you panel at the requested
resolution and framerate. In the former your device should be able to
receive command in both high speed and low power modes. However some
hardware is known not to work with high speed command transmission.
MIPI_DSI_MODE_LPM is targetted at these cases, so that display drivers
know not to attempt high-speed transmission of initial command packets.

Note how MIPI_DSI_MODE_LPM translates to MIPI_DSI_MSG_USE_LPM when
transferring messages (see mipi_dsi_device_transfer()). Looking at the
comment for the MIPI_DSI_MODE_LPM definition I realize that it isn't
very precise, but I have trouble coming up with anything better.
Perhaps:

	/* transmit command messages (non-video data) in low power mode */
	#define MIPI_DSI_MODE_LPM		BIT(11)

Any ideas?

On a semi-related note, some of the other flags are rather badly
documented. I do see that both Exynos and MSM implement most of these
(specifically the MIPI_DSI_MODE_VIDEO_H* ones), perhaps the comments
for all of those should be revisited. Ideally they'd be annotated with a
reference to the spec, like we do for MIPI_DSI_CLOCK_NON_CONTINUOUS.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2015-08-17 12:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-21 19:36 [PATCH] drm/panel: auo novatek 1080p video mode panel Rob Clark
2015-08-07 13:19 ` Thierry Reding
2015-08-07 16:11   ` Rob Clark
2015-08-10 19:54     ` Bjorn Andersson
2015-08-10 21:45       ` Rob Clark
2015-08-17 11:38       ` Thierry Reding
2015-08-17 14:48         ` Rob Clark
2015-08-17 14:57           ` Thierry Reding
2015-08-17 12:07     ` Thierry Reding [this message]
2015-08-17 17:27 ` Bjorn Andersson

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=20150817120708.GJ8453@ulmo.nvidia.com \
    --to=thierry.reding@gmail.com \
    --cc=bjorn.andersson@sonymobile.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=robdclark@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