mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/dsi: Implement DCS get display mode
@ 2016-04-18  9:22 Vinay Simha BN
  2016-04-18  9:22 ` [PATCH 2/2] drm/dsi: Implement DCS get display self diagnostic Vinay Simha BN
  2016-04-26  4:38 ` [PATCH 1/2] drm/dsi: Implement DCS get display mode Vinay Simha
  0 siblings, 2 replies; 4+ messages in thread
From: Vinay Simha BN @ 2016-04-18  9:22 UTC (permalink / raw)
  Cc: Vinay Simha BN, David Airlie, open list:DRM DRIVERS, open list

Provide a small convenience wrapper that transmits
a DCS get_display_mode command.

Signed-off-by: Vinay Simha BN <simhavcs@gmail.com>
---
 drivers/gpu/drm/drm_mipi_dsi.c | 24 ++++++++++++++++++++++++
 include/drm/drm_mipi_dsi.h     |  1 +
 2 files changed, 25 insertions(+)

diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index f5d8083..2e032ea 100644
--- a/drivers/gpu/drm/drm_mipi_dsi.c
+++ b/drivers/gpu/drm/drm_mipi_dsi.c
@@ -792,6 +792,30 @@ int mipi_dsi_dcs_get_power_mode(struct mipi_dsi_device *dsi, u8 *mode)
 EXPORT_SYMBOL(mipi_dsi_dcs_get_power_mode);
 
 /**
+ * mipi_dsi_dcs_get_display_mode() - query the display module's image mode
+ * @dsi: DSI peripheral device
+ * @mode: return location for the display image mode
+ *
+ * Return: 0 on success or a negative error code on failure.
+ */
+int mipi_dsi_dcs_get_display_mode(struct mipi_dsi_device *dsi, u8 *mode)
+{
+	ssize_t err;
+
+	err = mipi_dsi_dcs_read(dsi, MIPI_DCS_GET_DISPLAY_MODE, mode,
+				sizeof(*mode));
+	if (err <= 0) {
+		if (err == 0)
+			err = -ENODATA;
+
+		return err;
+	}
+
+	return 0;
+}
+EXPORT_SYMBOL(mipi_dsi_dcs_get_display_mode);
+
+/**
  * mipi_dsi_dcs_get_pixel_format() - gets the pixel format for the RGB image
  *    data used by the interface
  * @dsi: DSI peripheral device
diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
index 7a9840f..48fcd65 100644
--- a/include/drm/drm_mipi_dsi.h
+++ b/include/drm/drm_mipi_dsi.h
@@ -254,6 +254,7 @@ ssize_t mipi_dsi_dcs_read(struct mipi_dsi_device *dsi, u8 cmd, void *data,
 int mipi_dsi_dcs_nop(struct mipi_dsi_device *dsi);
 int mipi_dsi_dcs_soft_reset(struct mipi_dsi_device *dsi);
 int mipi_dsi_dcs_get_power_mode(struct mipi_dsi_device *dsi, u8 *mode);
+int mipi_dsi_dcs_get_display_mode(struct mipi_dsi_device *dsi, u8 *mode);
 int mipi_dsi_dcs_get_pixel_format(struct mipi_dsi_device *dsi, u8 *format);
 int mipi_dsi_dcs_enter_sleep_mode(struct mipi_dsi_device *dsi);
 int mipi_dsi_dcs_exit_sleep_mode(struct mipi_dsi_device *dsi);
-- 
2.1.2

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] drm/dsi: Implement DCS get display self diagnostic
  2016-04-18  9:22 [PATCH 1/2] drm/dsi: Implement DCS get display mode Vinay Simha BN
@ 2016-04-18  9:22 ` Vinay Simha BN
  2016-04-26  4:39   ` Vinay Simha
  2016-04-26  4:38 ` [PATCH 1/2] drm/dsi: Implement DCS get display mode Vinay Simha
  1 sibling, 1 reply; 4+ messages in thread
From: Vinay Simha BN @ 2016-04-18  9:22 UTC (permalink / raw)
  Cc: Vinay Simha BN, David Airlie, open list:DRM DRIVERS, open list

Provide a small convenience wrapper that transmits
a DCS get_diagnostic_result command.

Signed-off-by: Vinay Simha BN <simhavcs@gmail.com>
---
 drivers/gpu/drm/drm_mipi_dsi.c | 25 +++++++++++++++++++++++++
 include/drm/drm_mipi_dsi.h     |  1 +
 2 files changed, 26 insertions(+)

diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index 2e032ea..e49b346 100644
--- a/drivers/gpu/drm/drm_mipi_dsi.c
+++ b/drivers/gpu/drm/drm_mipi_dsi.c
@@ -816,6 +816,31 @@ int mipi_dsi_dcs_get_display_mode(struct mipi_dsi_device *dsi, u8 *mode)
 EXPORT_SYMBOL(mipi_dsi_dcs_get_display_mode);
 
 /**
+ * mipi_dsi_dcs_get_diagnostic_result() - query the display module's diagnostic
+ *    result
+ * @dsi: DSI peripheral device
+ * @mode: return location for the display self diagnostic result
+ *
+ * Return: 0 on success or a negative error code on failure.
+ */
+int mipi_dsi_dcs_get_diagnostic_result(struct mipi_dsi_device *dsi, u8 *mode)
+{
+	ssize_t err;
+
+	err = mipi_dsi_dcs_read(dsi, MIPI_DCS_GET_DIAGNOSTIC_RESULT, mode,
+				sizeof(*mode));
+	if (err <= 0) {
+		if (err == 0)
+			err = -ENODATA;
+
+		return err;
+	}
+
+	return 0;
+}
+EXPORT_SYMBOL(mipi_dsi_dcs_get_diagnostic_result);
+
+/**
  * mipi_dsi_dcs_get_pixel_format() - gets the pixel format for the RGB image
  *    data used by the interface
  * @dsi: DSI peripheral device
diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
index 48fcd65..61c375b 100644
--- a/include/drm/drm_mipi_dsi.h
+++ b/include/drm/drm_mipi_dsi.h
@@ -255,6 +255,7 @@ int mipi_dsi_dcs_nop(struct mipi_dsi_device *dsi);
 int mipi_dsi_dcs_soft_reset(struct mipi_dsi_device *dsi);
 int mipi_dsi_dcs_get_power_mode(struct mipi_dsi_device *dsi, u8 *mode);
 int mipi_dsi_dcs_get_display_mode(struct mipi_dsi_device *dsi, u8 *mode);
+int mipi_dsi_dcs_get_diagnostic_result(struct mipi_dsi_device *dsi, u8 *mode);
 int mipi_dsi_dcs_get_pixel_format(struct mipi_dsi_device *dsi, u8 *format);
 int mipi_dsi_dcs_enter_sleep_mode(struct mipi_dsi_device *dsi);
 int mipi_dsi_dcs_exit_sleep_mode(struct mipi_dsi_device *dsi);
-- 
2.1.2

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] drm/dsi: Implement DCS get display mode
  2016-04-18  9:22 [PATCH 1/2] drm/dsi: Implement DCS get display mode Vinay Simha BN
  2016-04-18  9:22 ` [PATCH 2/2] drm/dsi: Implement DCS get display self diagnostic Vinay Simha BN
@ 2016-04-26  4:38 ` Vinay Simha
  1 sibling, 0 replies; 4+ messages in thread
From: Vinay Simha @ 2016-04-26  4:38 UTC (permalink / raw)
  To: Vinay Simha BN
  Cc: David Airlie, open list:DRM DRIVERS, open list, Thierry Reding

HI,

I have not got response from maintainers. Did i miss anything?

On Mon, Apr 18, 2016 at 2:52 PM, Vinay Simha BN <simhavcs@gmail.com> wrote:
> Provide a small convenience wrapper that transmits
> a DCS get_display_mode command.
>
> Signed-off-by: Vinay Simha BN <simhavcs@gmail.com>
> ---
>  drivers/gpu/drm/drm_mipi_dsi.c | 24 ++++++++++++++++++++++++
>  include/drm/drm_mipi_dsi.h     |  1 +
>  2 files changed, 25 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
> index f5d8083..2e032ea 100644
> --- a/drivers/gpu/drm/drm_mipi_dsi.c
> +++ b/drivers/gpu/drm/drm_mipi_dsi.c
> @@ -792,6 +792,30 @@ int mipi_dsi_dcs_get_power_mode(struct mipi_dsi_device *dsi, u8 *mode)
>  EXPORT_SYMBOL(mipi_dsi_dcs_get_power_mode);
>
>  /**
> + * mipi_dsi_dcs_get_display_mode() - query the display module's image mode
> + * @dsi: DSI peripheral device
> + * @mode: return location for the display image mode
> + *
> + * Return: 0 on success or a negative error code on failure.
> + */
> +int mipi_dsi_dcs_get_display_mode(struct mipi_dsi_device *dsi, u8 *mode)
> +{
> +       ssize_t err;
> +
> +       err = mipi_dsi_dcs_read(dsi, MIPI_DCS_GET_DISPLAY_MODE, mode,
> +                               sizeof(*mode));
> +       if (err <= 0) {
> +               if (err == 0)
> +                       err = -ENODATA;
> +
> +               return err;
> +       }
> +
> +       return 0;
> +}
> +EXPORT_SYMBOL(mipi_dsi_dcs_get_display_mode);
> +
> +/**
>   * mipi_dsi_dcs_get_pixel_format() - gets the pixel format for the RGB image
>   *    data used by the interface
>   * @dsi: DSI peripheral device
> diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
> index 7a9840f..48fcd65 100644
> --- a/include/drm/drm_mipi_dsi.h
> +++ b/include/drm/drm_mipi_dsi.h
> @@ -254,6 +254,7 @@ ssize_t mipi_dsi_dcs_read(struct mipi_dsi_device *dsi, u8 cmd, void *data,
>  int mipi_dsi_dcs_nop(struct mipi_dsi_device *dsi);
>  int mipi_dsi_dcs_soft_reset(struct mipi_dsi_device *dsi);
>  int mipi_dsi_dcs_get_power_mode(struct mipi_dsi_device *dsi, u8 *mode);
> +int mipi_dsi_dcs_get_display_mode(struct mipi_dsi_device *dsi, u8 *mode);
>  int mipi_dsi_dcs_get_pixel_format(struct mipi_dsi_device *dsi, u8 *format);
>  int mipi_dsi_dcs_enter_sleep_mode(struct mipi_dsi_device *dsi);
>  int mipi_dsi_dcs_exit_sleep_mode(struct mipi_dsi_device *dsi);
> --
> 2.1.2
>



-- 
Regards,

Vinay Simha.B.N.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] drm/dsi: Implement DCS get display self diagnostic
  2016-04-18  9:22 ` [PATCH 2/2] drm/dsi: Implement DCS get display self diagnostic Vinay Simha BN
@ 2016-04-26  4:39   ` Vinay Simha
  0 siblings, 0 replies; 4+ messages in thread
From: Vinay Simha @ 2016-04-26  4:39 UTC (permalink / raw)
  To: Vinay Simha BN
  Cc: David Airlie, open list:DRM DRIVERS, open list, Thierry Reding

HI,

I have not got response from maintainers. Did i miss anything?

On Mon, Apr 18, 2016 at 2:52 PM, Vinay Simha BN <simhavcs@gmail.com> wrote:
> Provide a small convenience wrapper that transmits
> a DCS get_diagnostic_result command.
>
> Signed-off-by: Vinay Simha BN <simhavcs@gmail.com>
> ---
>  drivers/gpu/drm/drm_mipi_dsi.c | 25 +++++++++++++++++++++++++
>  include/drm/drm_mipi_dsi.h     |  1 +
>  2 files changed, 26 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
> index 2e032ea..e49b346 100644
> --- a/drivers/gpu/drm/drm_mipi_dsi.c
> +++ b/drivers/gpu/drm/drm_mipi_dsi.c
> @@ -816,6 +816,31 @@ int mipi_dsi_dcs_get_display_mode(struct mipi_dsi_device *dsi, u8 *mode)
>  EXPORT_SYMBOL(mipi_dsi_dcs_get_display_mode);
>
>  /**
> + * mipi_dsi_dcs_get_diagnostic_result() - query the display module's diagnostic
> + *    result
> + * @dsi: DSI peripheral device
> + * @mode: return location for the display self diagnostic result
> + *
> + * Return: 0 on success or a negative error code on failure.
> + */
> +int mipi_dsi_dcs_get_diagnostic_result(struct mipi_dsi_device *dsi, u8 *mode)
> +{
> +       ssize_t err;
> +
> +       err = mipi_dsi_dcs_read(dsi, MIPI_DCS_GET_DIAGNOSTIC_RESULT, mode,
> +                               sizeof(*mode));
> +       if (err <= 0) {
> +               if (err == 0)
> +                       err = -ENODATA;
> +
> +               return err;
> +       }
> +
> +       return 0;
> +}
> +EXPORT_SYMBOL(mipi_dsi_dcs_get_diagnostic_result);
> +
> +/**
>   * mipi_dsi_dcs_get_pixel_format() - gets the pixel format for the RGB image
>   *    data used by the interface
>   * @dsi: DSI peripheral device
> diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
> index 48fcd65..61c375b 100644
> --- a/include/drm/drm_mipi_dsi.h
> +++ b/include/drm/drm_mipi_dsi.h
> @@ -255,6 +255,7 @@ int mipi_dsi_dcs_nop(struct mipi_dsi_device *dsi);
>  int mipi_dsi_dcs_soft_reset(struct mipi_dsi_device *dsi);
>  int mipi_dsi_dcs_get_power_mode(struct mipi_dsi_device *dsi, u8 *mode);
>  int mipi_dsi_dcs_get_display_mode(struct mipi_dsi_device *dsi, u8 *mode);
> +int mipi_dsi_dcs_get_diagnostic_result(struct mipi_dsi_device *dsi, u8 *mode);
>  int mipi_dsi_dcs_get_pixel_format(struct mipi_dsi_device *dsi, u8 *format);
>  int mipi_dsi_dcs_enter_sleep_mode(struct mipi_dsi_device *dsi);
>  int mipi_dsi_dcs_exit_sleep_mode(struct mipi_dsi_device *dsi);
> --
> 2.1.2
>



-- 
Regards,

Vinay Simha.B.N.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-26  4:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-18  9:22 [PATCH 1/2] drm/dsi: Implement DCS get display mode Vinay Simha BN
2016-04-18  9:22 ` [PATCH 2/2] drm/dsi: Implement DCS get display self diagnostic Vinay Simha BN
2016-04-26  4:39   ` Vinay Simha
2016-04-26  4:38 ` [PATCH 1/2] drm/dsi: Implement DCS get display mode Vinay Simha

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®