All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH resend] drm/panel: panel-innolux: set display off in innolux_panel_unprepare
@ 2019-01-09  6:59 ` Hsin-Yi, Wang
  0 siblings, 0 replies; 8+ messages in thread
From: Hsin-Yi, Wang @ 2019-01-09  6:59 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Thierry Reding, David Airlie, Daniel Vetter, dri-devel, linux-kernel

Move mipi_dsi_dcs_set_display_off() from innolux_panel_disable()
to innolux_panel_unprepare(), so they are consistent with
innolux_panel_enable() and innolux_panel_prepare().

This also fixes some mode check and irq timeout issue in MTK dsi code.

Since some dsi code (e.g. mtk_dsi) have following call trace:
1. drm_panel_disable(), which calls innolux_panel_disable()
2. switch to cmd mode
3. drm_panel_unprepare(), which calls innolux_panel_unprepare()

However, mtk_dsi needs to be in cmd mode to be able to send commands
(e.g. mipi_dsi_dcs_set_display_off() and mipi_dsi_dcs_enter_sleep_mode()),
so we need these functions to be called after the switch to cmd mode happens,
i.e. in innolux_panel_unprepare.


Signed-off-by: Hsin-Yi, Wang <hsinyi@chromium.org>
---
Resend for review.
---
 drivers/gpu/drm/panel/panel-innolux-p079zca.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
index ca4ae45dd307..8e5724b63f1f 100644
--- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c
+++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
@@ -70,18 +70,12 @@ static inline struct innolux_panel *to_innolux_panel(struct drm_panel *panel)
 static int innolux_panel_disable(struct drm_panel *panel)
 {
 	struct innolux_panel *innolux = to_innolux_panel(panel);
-	int err;
 
 	if (!innolux->enabled)
 		return 0;
 
 	backlight_disable(innolux->backlight);
 
-	err = mipi_dsi_dcs_set_display_off(innolux->link);
-	if (err < 0)
-		DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n",
-			      err);
-
 	innolux->enabled = false;
 
 	return 0;
@@ -95,6 +89,11 @@ static int innolux_panel_unprepare(struct drm_panel *panel)
 	if (!innolux->prepared)
 		return 0;
 
+	err = mipi_dsi_dcs_set_display_off(innolux->link);
+	if (err < 0)
+		DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n",
+			      err);
+
 	err = mipi_dsi_dcs_enter_sleep_mode(innolux->link);
 	if (err < 0) {
 		DRM_DEV_ERROR(panel->dev, "failed to enter sleep mode: %d\n",
-- 
2.18.1


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

* [PATCH resend] drm/panel: panel-innolux: set display off in innolux_panel_unprepare
@ 2019-01-09  6:59 ` Hsin-Yi, Wang
  0 siblings, 0 replies; 8+ messages in thread
From: Hsin-Yi, Wang @ 2019-01-09  6:59 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: David Airlie, Thierry Reding, dri-devel, Daniel Vetter, linux-kernel

Move mipi_dsi_dcs_set_display_off() from innolux_panel_disable()
to innolux_panel_unprepare(), so they are consistent with
innolux_panel_enable() and innolux_panel_prepare().

This also fixes some mode check and irq timeout issue in MTK dsi code.

Since some dsi code (e.g. mtk_dsi) have following call trace:
1. drm_panel_disable(), which calls innolux_panel_disable()
2. switch to cmd mode
3. drm_panel_unprepare(), which calls innolux_panel_unprepare()

However, mtk_dsi needs to be in cmd mode to be able to send commands
(e.g. mipi_dsi_dcs_set_display_off() and mipi_dsi_dcs_enter_sleep_mode()),
so we need these functions to be called after the switch to cmd mode happens,
i.e. in innolux_panel_unprepare.


Signed-off-by: Hsin-Yi, Wang <hsinyi@chromium.org>
---
Resend for review.
---
 drivers/gpu/drm/panel/panel-innolux-p079zca.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
index ca4ae45dd307..8e5724b63f1f 100644
--- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c
+++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
@@ -70,18 +70,12 @@ static inline struct innolux_panel *to_innolux_panel(struct drm_panel *panel)
 static int innolux_panel_disable(struct drm_panel *panel)
 {
 	struct innolux_panel *innolux = to_innolux_panel(panel);
-	int err;
 
 	if (!innolux->enabled)
 		return 0;
 
 	backlight_disable(innolux->backlight);
 
-	err = mipi_dsi_dcs_set_display_off(innolux->link);
-	if (err < 0)
-		DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n",
-			      err);
-
 	innolux->enabled = false;
 
 	return 0;
@@ -95,6 +89,11 @@ static int innolux_panel_unprepare(struct drm_panel *panel)
 	if (!innolux->prepared)
 		return 0;
 
+	err = mipi_dsi_dcs_set_display_off(innolux->link);
+	if (err < 0)
+		DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n",
+			      err);
+
 	err = mipi_dsi_dcs_enter_sleep_mode(innolux->link);
 	if (err < 0) {
 		DRM_DEV_ERROR(panel->dev, "failed to enter sleep mode: %d\n",
-- 
2.18.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH resend] drm/panel: panel-innolux: set display off in innolux_panel_unprepare
  2019-01-09  6:59 ` Hsin-Yi, Wang
  (?)
@ 2019-01-18 17:58   ` Sean Paul
  -1 siblings, 0 replies; 8+ messages in thread
From: Sean Paul @ 2019-01-18 17:58 UTC (permalink / raw)
  To: Hsin-Yi, Wang
  Cc: Linux ARM Kernel, Thierry Reding, David Airlie, Daniel Vetter,
	dri-devel, Linux Kernel Mailing List

On Wed, Jan 9, 2019 at 1:59 AM Hsin-Yi, Wang <hsinyi@chromium.org> wrote:
>
> Move mipi_dsi_dcs_set_display_off() from innolux_panel_disable()
> to innolux_panel_unprepare(), so they are consistent with
> innolux_panel_enable() and innolux_panel_prepare().
>
> This also fixes some mode check and irq timeout issue in MTK dsi code.
>
> Since some dsi code (e.g. mtk_dsi) have following call trace:
> 1. drm_panel_disable(), which calls innolux_panel_disable()
> 2. switch to cmd mode
> 3. drm_panel_unprepare(), which calls innolux_panel_unprepare()
>
> However, mtk_dsi needs to be in cmd mode to be able to send commands
> (e.g. mipi_dsi_dcs_set_display_off() and mipi_dsi_dcs_enter_sleep_mode()),
> so we need these functions to be called after the switch to cmd mode happens,
> i.e. in innolux_panel_unprepare.
>
>
> Signed-off-by: Hsin-Yi, Wang <hsinyi@chromium.org>

Reviewed-by: Sean Paul <seanpaul@chromium.org>

> ---
> Resend for review.
> ---
>  drivers/gpu/drm/panel/panel-innolux-p079zca.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> index ca4ae45dd307..8e5724b63f1f 100644
> --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> @@ -70,18 +70,12 @@ static inline struct innolux_panel *to_innolux_panel(struct drm_panel *panel)
>  static int innolux_panel_disable(struct drm_panel *panel)
>  {
>         struct innolux_panel *innolux = to_innolux_panel(panel);
> -       int err;
>
>         if (!innolux->enabled)
>                 return 0;
>
>         backlight_disable(innolux->backlight);
>
> -       err = mipi_dsi_dcs_set_display_off(innolux->link);
> -       if (err < 0)
> -               DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n",
> -                             err);
> -
>         innolux->enabled = false;
>
>         return 0;
> @@ -95,6 +89,11 @@ static int innolux_panel_unprepare(struct drm_panel *panel)
>         if (!innolux->prepared)
>                 return 0;
>
> +       err = mipi_dsi_dcs_set_display_off(innolux->link);
> +       if (err < 0)
> +               DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n",
> +                             err);
> +
>         err = mipi_dsi_dcs_enter_sleep_mode(innolux->link);
>         if (err < 0) {
>                 DRM_DEV_ERROR(panel->dev, "failed to enter sleep mode: %d\n",
> --
> 2.18.1
>

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

* Re: [PATCH resend] drm/panel: panel-innolux: set display off in innolux_panel_unprepare
@ 2019-01-18 17:58   ` Sean Paul
  0 siblings, 0 replies; 8+ messages in thread
From: Sean Paul @ 2019-01-18 17:58 UTC (permalink / raw)
  To: Hsin-Yi, Wang
  Cc: David Airlie, Linux Kernel Mailing List, dri-devel,
	Thierry Reding, Daniel Vetter, Linux ARM Kernel

On Wed, Jan 9, 2019 at 1:59 AM Hsin-Yi, Wang <hsinyi@chromium.org> wrote:
>
> Move mipi_dsi_dcs_set_display_off() from innolux_panel_disable()
> to innolux_panel_unprepare(), so they are consistent with
> innolux_panel_enable() and innolux_panel_prepare().
>
> This also fixes some mode check and irq timeout issue in MTK dsi code.
>
> Since some dsi code (e.g. mtk_dsi) have following call trace:
> 1. drm_panel_disable(), which calls innolux_panel_disable()
> 2. switch to cmd mode
> 3. drm_panel_unprepare(), which calls innolux_panel_unprepare()
>
> However, mtk_dsi needs to be in cmd mode to be able to send commands
> (e.g. mipi_dsi_dcs_set_display_off() and mipi_dsi_dcs_enter_sleep_mode()),
> so we need these functions to be called after the switch to cmd mode happens,
> i.e. in innolux_panel_unprepare.
>
>
> Signed-off-by: Hsin-Yi, Wang <hsinyi@chromium.org>

Reviewed-by: Sean Paul <seanpaul@chromium.org>

> ---
> Resend for review.
> ---
>  drivers/gpu/drm/panel/panel-innolux-p079zca.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> index ca4ae45dd307..8e5724b63f1f 100644
> --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> @@ -70,18 +70,12 @@ static inline struct innolux_panel *to_innolux_panel(struct drm_panel *panel)
>  static int innolux_panel_disable(struct drm_panel *panel)
>  {
>         struct innolux_panel *innolux = to_innolux_panel(panel);
> -       int err;
>
>         if (!innolux->enabled)
>                 return 0;
>
>         backlight_disable(innolux->backlight);
>
> -       err = mipi_dsi_dcs_set_display_off(innolux->link);
> -       if (err < 0)
> -               DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n",
> -                             err);
> -
>         innolux->enabled = false;
>
>         return 0;
> @@ -95,6 +89,11 @@ static int innolux_panel_unprepare(struct drm_panel *panel)
>         if (!innolux->prepared)
>                 return 0;
>
> +       err = mipi_dsi_dcs_set_display_off(innolux->link);
> +       if (err < 0)
> +               DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n",
> +                             err);
> +
>         err = mipi_dsi_dcs_enter_sleep_mode(innolux->link);
>         if (err < 0) {
>                 DRM_DEV_ERROR(panel->dev, "failed to enter sleep mode: %d\n",
> --
> 2.18.1
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH resend] drm/panel: panel-innolux: set display off in innolux_panel_unprepare
@ 2019-01-18 17:58   ` Sean Paul
  0 siblings, 0 replies; 8+ messages in thread
From: Sean Paul @ 2019-01-18 17:58 UTC (permalink / raw)
  To: Hsin-Yi, Wang
  Cc: David Airlie, Linux Kernel Mailing List, dri-devel,
	Thierry Reding, Linux ARM Kernel

On Wed, Jan 9, 2019 at 1:59 AM Hsin-Yi, Wang <hsinyi@chromium.org> wrote:
>
> Move mipi_dsi_dcs_set_display_off() from innolux_panel_disable()
> to innolux_panel_unprepare(), so they are consistent with
> innolux_panel_enable() and innolux_panel_prepare().
>
> This also fixes some mode check and irq timeout issue in MTK dsi code.
>
> Since some dsi code (e.g. mtk_dsi) have following call trace:
> 1. drm_panel_disable(), which calls innolux_panel_disable()
> 2. switch to cmd mode
> 3. drm_panel_unprepare(), which calls innolux_panel_unprepare()
>
> However, mtk_dsi needs to be in cmd mode to be able to send commands
> (e.g. mipi_dsi_dcs_set_display_off() and mipi_dsi_dcs_enter_sleep_mode()),
> so we need these functions to be called after the switch to cmd mode happens,
> i.e. in innolux_panel_unprepare.
>
>
> Signed-off-by: Hsin-Yi, Wang <hsinyi@chromium.org>

Reviewed-by: Sean Paul <seanpaul@chromium.org>

> ---
> Resend for review.
> ---
>  drivers/gpu/drm/panel/panel-innolux-p079zca.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> index ca4ae45dd307..8e5724b63f1f 100644
> --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> @@ -70,18 +70,12 @@ static inline struct innolux_panel *to_innolux_panel(struct drm_panel *panel)
>  static int innolux_panel_disable(struct drm_panel *panel)
>  {
>         struct innolux_panel *innolux = to_innolux_panel(panel);
> -       int err;
>
>         if (!innolux->enabled)
>                 return 0;
>
>         backlight_disable(innolux->backlight);
>
> -       err = mipi_dsi_dcs_set_display_off(innolux->link);
> -       if (err < 0)
> -               DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n",
> -                             err);
> -
>         innolux->enabled = false;
>
>         return 0;
> @@ -95,6 +89,11 @@ static int innolux_panel_unprepare(struct drm_panel *panel)
>         if (!innolux->prepared)
>                 return 0;
>
> +       err = mipi_dsi_dcs_set_display_off(innolux->link);
> +       if (err < 0)
> +               DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n",
> +                             err);
> +
>         err = mipi_dsi_dcs_enter_sleep_mode(innolux->link);
>         if (err < 0) {
>                 DRM_DEV_ERROR(panel->dev, "failed to enter sleep mode: %d\n",
> --
> 2.18.1
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH resend] drm/panel: panel-innolux: set display off in innolux_panel_unprepare
  2019-01-18 17:58   ` Sean Paul
  (?)
@ 2019-01-22 21:52     ` Sean Paul
  -1 siblings, 0 replies; 8+ messages in thread
From: Sean Paul @ 2019-01-22 21:52 UTC (permalink / raw)
  To: Sean Paul
  Cc: Hsin-Yi, Wang, David Airlie, Linux Kernel Mailing List,
	dri-devel, Thierry Reding, Linux ARM Kernel

On Fri, Jan 18, 2019 at 12:58:10PM -0500, Sean Paul wrote:
> On Wed, Jan 9, 2019 at 1:59 AM Hsin-Yi, Wang <hsinyi@chromium.org> wrote:
> >
> > Move mipi_dsi_dcs_set_display_off() from innolux_panel_disable()
> > to innolux_panel_unprepare(), so they are consistent with
> > innolux_panel_enable() and innolux_panel_prepare().
> >
> > This also fixes some mode check and irq timeout issue in MTK dsi code.
> >
> > Since some dsi code (e.g. mtk_dsi) have following call trace:
> > 1. drm_panel_disable(), which calls innolux_panel_disable()
> > 2. switch to cmd mode
> > 3. drm_panel_unprepare(), which calls innolux_panel_unprepare()
> >
> > However, mtk_dsi needs to be in cmd mode to be able to send commands
> > (e.g. mipi_dsi_dcs_set_display_off() and mipi_dsi_dcs_enter_sleep_mode()),
> > so we need these functions to be called after the switch to cmd mode happens,
> > i.e. in innolux_panel_unprepare.
> >
> >
> > Signed-off-by: Hsin-Yi, Wang <hsinyi@chromium.org>
> 
> Reviewed-by: Sean Paul <seanpaul@chromium.org>

Applied to drm-misc-next, thanks for your patch.

Sean

> 
> > ---
> > Resend for review.
> > ---
> >  drivers/gpu/drm/panel/panel-innolux-p079zca.c | 11 +++++------
> >  1 file changed, 5 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> > index ca4ae45dd307..8e5724b63f1f 100644
> > --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> > +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> > @@ -70,18 +70,12 @@ static inline struct innolux_panel *to_innolux_panel(struct drm_panel *panel)
> >  static int innolux_panel_disable(struct drm_panel *panel)
> >  {
> >         struct innolux_panel *innolux = to_innolux_panel(panel);
> > -       int err;
> >
> >         if (!innolux->enabled)
> >                 return 0;
> >
> >         backlight_disable(innolux->backlight);
> >
> > -       err = mipi_dsi_dcs_set_display_off(innolux->link);
> > -       if (err < 0)
> > -               DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n",
> > -                             err);
> > -
> >         innolux->enabled = false;
> >
> >         return 0;
> > @@ -95,6 +89,11 @@ static int innolux_panel_unprepare(struct drm_panel *panel)
> >         if (!innolux->prepared)
> >                 return 0;
> >
> > +       err = mipi_dsi_dcs_set_display_off(innolux->link);
> > +       if (err < 0)
> > +               DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n",
> > +                             err);
> > +
> >         err = mipi_dsi_dcs_enter_sleep_mode(innolux->link);
> >         if (err < 0) {
> >                 DRM_DEV_ERROR(panel->dev, "failed to enter sleep mode: %d\n",
> > --
> > 2.18.1
> >
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Sean Paul, Software Engineer, Google / Chromium OS

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

* Re: [PATCH resend] drm/panel: panel-innolux: set display off in innolux_panel_unprepare
@ 2019-01-22 21:52     ` Sean Paul
  0 siblings, 0 replies; 8+ messages in thread
From: Sean Paul @ 2019-01-22 21:52 UTC (permalink / raw)
  To: Sean Paul
  Cc: David Airlie, Linux Kernel Mailing List, dri-devel,
	Thierry Reding, Hsin-Yi, Wang, Linux ARM Kernel

On Fri, Jan 18, 2019 at 12:58:10PM -0500, Sean Paul wrote:
> On Wed, Jan 9, 2019 at 1:59 AM Hsin-Yi, Wang <hsinyi@chromium.org> wrote:
> >
> > Move mipi_dsi_dcs_set_display_off() from innolux_panel_disable()
> > to innolux_panel_unprepare(), so they are consistent with
> > innolux_panel_enable() and innolux_panel_prepare().
> >
> > This also fixes some mode check and irq timeout issue in MTK dsi code.
> >
> > Since some dsi code (e.g. mtk_dsi) have following call trace:
> > 1. drm_panel_disable(), which calls innolux_panel_disable()
> > 2. switch to cmd mode
> > 3. drm_panel_unprepare(), which calls innolux_panel_unprepare()
> >
> > However, mtk_dsi needs to be in cmd mode to be able to send commands
> > (e.g. mipi_dsi_dcs_set_display_off() and mipi_dsi_dcs_enter_sleep_mode()),
> > so we need these functions to be called after the switch to cmd mode happens,
> > i.e. in innolux_panel_unprepare.
> >
> >
> > Signed-off-by: Hsin-Yi, Wang <hsinyi@chromium.org>
> 
> Reviewed-by: Sean Paul <seanpaul@chromium.org>

Applied to drm-misc-next, thanks for your patch.

Sean

> 
> > ---
> > Resend for review.
> > ---
> >  drivers/gpu/drm/panel/panel-innolux-p079zca.c | 11 +++++------
> >  1 file changed, 5 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> > index ca4ae45dd307..8e5724b63f1f 100644
> > --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> > +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> > @@ -70,18 +70,12 @@ static inline struct innolux_panel *to_innolux_panel(struct drm_panel *panel)
> >  static int innolux_panel_disable(struct drm_panel *panel)
> >  {
> >         struct innolux_panel *innolux = to_innolux_panel(panel);
> > -       int err;
> >
> >         if (!innolux->enabled)
> >                 return 0;
> >
> >         backlight_disable(innolux->backlight);
> >
> > -       err = mipi_dsi_dcs_set_display_off(innolux->link);
> > -       if (err < 0)
> > -               DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n",
> > -                             err);
> > -
> >         innolux->enabled = false;
> >
> >         return 0;
> > @@ -95,6 +89,11 @@ static int innolux_panel_unprepare(struct drm_panel *panel)
> >         if (!innolux->prepared)
> >                 return 0;
> >
> > +       err = mipi_dsi_dcs_set_display_off(innolux->link);
> > +       if (err < 0)
> > +               DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n",
> > +                             err);
> > +
> >         err = mipi_dsi_dcs_enter_sleep_mode(innolux->link);
> >         if (err < 0) {
> >                 DRM_DEV_ERROR(panel->dev, "failed to enter sleep mode: %d\n",
> > --
> > 2.18.1
> >
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Sean Paul, Software Engineer, Google / Chromium OS

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH resend] drm/panel: panel-innolux: set display off in innolux_panel_unprepare
@ 2019-01-22 21:52     ` Sean Paul
  0 siblings, 0 replies; 8+ messages in thread
From: Sean Paul @ 2019-01-22 21:52 UTC (permalink / raw)
  To: Sean Paul
  Cc: David Airlie, Linux Kernel Mailing List, dri-devel,
	Thierry Reding, Hsin-Yi, Wang, Linux ARM Kernel

On Fri, Jan 18, 2019 at 12:58:10PM -0500, Sean Paul wrote:
> On Wed, Jan 9, 2019 at 1:59 AM Hsin-Yi, Wang <hsinyi@chromium.org> wrote:
> >
> > Move mipi_dsi_dcs_set_display_off() from innolux_panel_disable()
> > to innolux_panel_unprepare(), so they are consistent with
> > innolux_panel_enable() and innolux_panel_prepare().
> >
> > This also fixes some mode check and irq timeout issue in MTK dsi code.
> >
> > Since some dsi code (e.g. mtk_dsi) have following call trace:
> > 1. drm_panel_disable(), which calls innolux_panel_disable()
> > 2. switch to cmd mode
> > 3. drm_panel_unprepare(), which calls innolux_panel_unprepare()
> >
> > However, mtk_dsi needs to be in cmd mode to be able to send commands
> > (e.g. mipi_dsi_dcs_set_display_off() and mipi_dsi_dcs_enter_sleep_mode()),
> > so we need these functions to be called after the switch to cmd mode happens,
> > i.e. in innolux_panel_unprepare.
> >
> >
> > Signed-off-by: Hsin-Yi, Wang <hsinyi@chromium.org>
> 
> Reviewed-by: Sean Paul <seanpaul@chromium.org>

Applied to drm-misc-next, thanks for your patch.

Sean

> 
> > ---
> > Resend for review.
> > ---
> >  drivers/gpu/drm/panel/panel-innolux-p079zca.c | 11 +++++------
> >  1 file changed, 5 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> > index ca4ae45dd307..8e5724b63f1f 100644
> > --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> > +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> > @@ -70,18 +70,12 @@ static inline struct innolux_panel *to_innolux_panel(struct drm_panel *panel)
> >  static int innolux_panel_disable(struct drm_panel *panel)
> >  {
> >         struct innolux_panel *innolux = to_innolux_panel(panel);
> > -       int err;
> >
> >         if (!innolux->enabled)
> >                 return 0;
> >
> >         backlight_disable(innolux->backlight);
> >
> > -       err = mipi_dsi_dcs_set_display_off(innolux->link);
> > -       if (err < 0)
> > -               DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n",
> > -                             err);
> > -
> >         innolux->enabled = false;
> >
> >         return 0;
> > @@ -95,6 +89,11 @@ static int innolux_panel_unprepare(struct drm_panel *panel)
> >         if (!innolux->prepared)
> >                 return 0;
> >
> > +       err = mipi_dsi_dcs_set_display_off(innolux->link);
> > +       if (err < 0)
> > +               DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n",
> > +                             err);
> > +
> >         err = mipi_dsi_dcs_enter_sleep_mode(innolux->link);
> >         if (err < 0) {
> >                 DRM_DEV_ERROR(panel->dev, "failed to enter sleep mode: %d\n",
> > --
> > 2.18.1
> >
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2019-01-22 21:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-09  6:59 [PATCH resend] drm/panel: panel-innolux: set display off in innolux_panel_unprepare Hsin-Yi, Wang
2019-01-09  6:59 ` Hsin-Yi, Wang
2019-01-18 17:58 ` Sean Paul
2019-01-18 17:58   ` Sean Paul
2019-01-18 17:58   ` Sean Paul
2019-01-22 21:52   ` Sean Paul
2019-01-22 21:52     ` Sean Paul
2019-01-22 21:52     ` Sean Paul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.