From: Bjorn Andersson <bjorn@kryo.se>
To: David Airlie <airlied@linux.ie>
Cc: "dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] drm/dsi: Add support for Turn on/Shutdown peripheral packets
Date: Sat, 21 Nov 2015 17:08:31 -0800 [thread overview]
Message-ID: <CAJAp7OiCicHPE9eC3TyCRmipNT823SkgpufOiWpA2fAirDEp-Q@mail.gmail.com> (raw)
In-Reply-To: <1446251908-2603-1-git-send-email-bjorn@kryo.se>
On Fri, Oct 30, 2015 at 5:38 PM, <bjorn@kryo.se> wrote:
Ping?
> From: Werner Johansson <werner.johansson@sonymobile.com>
>
> The MIPI_DSI_TURN_ON_PERIPHERAL and MIPI_DSI_SHUTDOWN_PERIPHERAL
> packets are required for some panels, one example being the
> Panasonic VVX10F034N00 panel.
>
> Signed-off-by: Werner Johansson <werner.johansson@sonymobile.com>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
> ---
> drivers/gpu/drm/drm_mipi_dsi.c | 47 ++++++++++++++++++++++++++++++++++++++++++
> include/drm/drm_mipi_dsi.h | 3 +++
> 2 files changed, 50 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
> index 2d5ca8ee..13b4a9c 100644
> --- a/drivers/gpu/drm/drm_mipi_dsi.c
> +++ b/drivers/gpu/drm/drm_mipi_dsi.c
> @@ -862,6 +862,53 @@ int mipi_dsi_dcs_set_pixel_format(struct mipi_dsi_device *dsi, u8 format)
> }
> EXPORT_SYMBOL(mipi_dsi_dcs_set_pixel_format);
>
> +/**
> + * mipi_dsi_raw_short_write() - Sends a data-less short DSI packet
> + * @dsi: DSI peripheral device
> + * @type: Data Type of packet to send
> + *
> + * Return: 0 on success or a negative error code on failure.
> + */
> +static ssize_t mipi_dsi_raw_short_write(struct mipi_dsi_device *dsi, u8 type)
> +{
> + u8 dummy[2] = { 0, 0 };
> + struct mipi_dsi_msg msg = {
> + .channel = dsi->channel,
> + .tx_buf = dummy,
> + .tx_len = sizeof(dummy),
> + .type = type
> + };
> +
> + if (mipi_dsi_packet_format_is_short(type))
> + return mipi_dsi_device_transfer(dsi, &msg);
> + else
> + return -1;
> +}
> +
> +/**
> + * mipi_dsi_turn_on_peripheral() - Sends Turn On Peripheral DSI command
> + * @dsi: DSI peripheral device
> + *
> + * Return: 0 on success or a negative error code on failure.
> + */
> +ssize_t mipi_dsi_turn_on_peripheral(struct mipi_dsi_device *dsi)
> +{
> + return mipi_dsi_raw_short_write(dsi, MIPI_DSI_TURN_ON_PERIPHERAL);
> +}
> +EXPORT_SYMBOL(mipi_dsi_turn_on_peripheral);
> +
> +/**
> + * mipi_dsi_shutdown_peripheral() - Sends Shutdown Peripheral DSI command
> + * @dsi: DSI peripheral device
> + *
> + * Return: 0 on success or a negative error code on failure.
> + */
> +ssize_t mipi_dsi_shutdown_peripheral(struct mipi_dsi_device *dsi)
> +{
> + return mipi_dsi_raw_short_write(dsi, MIPI_DSI_SHUTDOWN_PERIPHERAL);
> +}
> +EXPORT_SYMBOL(mipi_dsi_shutdown_peripheral);
> +
> static int mipi_dsi_drv_probe(struct device *dev)
> {
> struct mipi_dsi_driver *drv = to_mipi_dsi_driver(dev->driver);
> diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
> index f1d8d0d..2e0f057 100644
> --- a/include/drm/drm_mipi_dsi.h
> +++ b/include/drm/drm_mipi_dsi.h
> @@ -215,6 +215,9 @@ int mipi_dsi_dcs_set_tear_on(struct mipi_dsi_device *dsi,
> enum mipi_dsi_dcs_tear_mode mode);
> int mipi_dsi_dcs_set_pixel_format(struct mipi_dsi_device *dsi, u8 format);
>
> +ssize_t mipi_dsi_turn_on_peripheral(struct mipi_dsi_device *dsi);
> +ssize_t mipi_dsi_shutdown_peripheral(struct mipi_dsi_device *dsi);
> +
> /**
> * struct mipi_dsi_driver - DSI driver
> * @driver: device driver model driver
> --
> 2.3.2 (Apple Git-55)
>
next prev parent reply other threads:[~2015-11-22 1:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-31 0:38 [PATCH 1/3] drm/dsi: Add support for Turn on/Shutdown peripheral packets bjorn
2015-10-31 0:38 ` [PATCH 2/3] panel/panasonic-vvx10f034n00: Add DT bindings bjorn
2015-11-02 15:59 ` Rob Herring
2015-11-23 11:32 ` Thierry Reding
2015-10-31 0:38 ` [PATCH 3/3] drm/panel: Add Panasonic VVX10F034N00 MIPI DSI panel bjorn
2015-11-22 1:08 ` Bjorn Andersson
2015-11-23 11:33 ` Thierry Reding
2015-11-23 20:46 ` Bjorn Andersson
2015-11-22 1:08 ` Bjorn Andersson [this message]
2015-11-24 9:33 ` [PATCH 1/3] drm/dsi: Add support for Turn on/Shutdown peripheral packets Thierry Reding
2015-11-24 16:02 ` 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=CAJAp7OiCicHPE9eC3TyCRmipNT823SkgpufOiWpA2fAirDEp-Q@mail.gmail.com \
--to=bjorn@kryo.se \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).