All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/imx: imx-ldb: Disable both channels for split mode in enc->disable()
@ 2020-05-12  7:31 ` Liu Ying
  0 siblings, 0 replies; 8+ messages in thread
From: Liu Ying @ 2020-05-12  7:31 UTC (permalink / raw)
  To: dri-devel; +Cc: p.zabel, s.hauer, kernel, linux-imx, stable

Both of the two LVDS channels should be disabled for split mode
in the encoder's ->disable() callback, because they are enabled
in the encoder's ->enable() callback.

Fixes: 6556f7f82b9c ("drm: imx: Move imx-drm driver out of staging")
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
---
 drivers/gpu/drm/imx/imx-ldb.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c
index 4da22a9..af4d0d8 100644
--- a/drivers/gpu/drm/imx/imx-ldb.c
+++ b/drivers/gpu/drm/imx/imx-ldb.c
@@ -303,18 +303,19 @@ static void imx_ldb_encoder_disable(struct drm_encoder *encoder)
 {
 	struct imx_ldb_channel *imx_ldb_ch = enc_to_imx_ldb_ch(encoder);
 	struct imx_ldb *ldb = imx_ldb_ch->ldb;
+	int dual = ldb->ldb_ctrl & LDB_SPLIT_MODE_EN;
 	int mux, ret;
 
 	drm_panel_disable(imx_ldb_ch->panel);
 
-	if (imx_ldb_ch == &ldb->channel[0])
+	if (imx_ldb_ch == &ldb->channel[0] || dual)
 		ldb->ldb_ctrl &= ~LDB_CH0_MODE_EN_MASK;
-	else if (imx_ldb_ch == &ldb->channel[1])
+	if (imx_ldb_ch == &ldb->channel[1] || dual)
 		ldb->ldb_ctrl &= ~LDB_CH1_MODE_EN_MASK;
 
 	regmap_write(ldb->regmap, IOMUXC_GPR2, ldb->ldb_ctrl);
 
-	if (ldb->ldb_ctrl & LDB_SPLIT_MODE_EN) {
+	if (dual) {
 		clk_disable_unprepare(ldb->clk[0]);
 		clk_disable_unprepare(ldb->clk[1]);
 	}
-- 
2.7.4


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

* [PATCH] drm/imx: imx-ldb: Disable both channels for split mode in enc->disable()
@ 2020-05-12  7:31 ` Liu Ying
  0 siblings, 0 replies; 8+ messages in thread
From: Liu Ying @ 2020-05-12  7:31 UTC (permalink / raw)
  To: dri-devel; +Cc: stable, s.hauer, kernel, linux-imx

Both of the two LVDS channels should be disabled for split mode
in the encoder's ->disable() callback, because they are enabled
in the encoder's ->enable() callback.

Fixes: 6556f7f82b9c ("drm: imx: Move imx-drm driver out of staging")
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
---
 drivers/gpu/drm/imx/imx-ldb.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c
index 4da22a9..af4d0d8 100644
--- a/drivers/gpu/drm/imx/imx-ldb.c
+++ b/drivers/gpu/drm/imx/imx-ldb.c
@@ -303,18 +303,19 @@ static void imx_ldb_encoder_disable(struct drm_encoder *encoder)
 {
 	struct imx_ldb_channel *imx_ldb_ch = enc_to_imx_ldb_ch(encoder);
 	struct imx_ldb *ldb = imx_ldb_ch->ldb;
+	int dual = ldb->ldb_ctrl & LDB_SPLIT_MODE_EN;
 	int mux, ret;
 
 	drm_panel_disable(imx_ldb_ch->panel);
 
-	if (imx_ldb_ch == &ldb->channel[0])
+	if (imx_ldb_ch == &ldb->channel[0] || dual)
 		ldb->ldb_ctrl &= ~LDB_CH0_MODE_EN_MASK;
-	else if (imx_ldb_ch == &ldb->channel[1])
+	if (imx_ldb_ch == &ldb->channel[1] || dual)
 		ldb->ldb_ctrl &= ~LDB_CH1_MODE_EN_MASK;
 
 	regmap_write(ldb->regmap, IOMUXC_GPR2, ldb->ldb_ctrl);
 
-	if (ldb->ldb_ctrl & LDB_SPLIT_MODE_EN) {
+	if (dual) {
 		clk_disable_unprepare(ldb->clk[0]);
 		clk_disable_unprepare(ldb->clk[1]);
 	}
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/imx: imx-ldb: Disable both channels for split mode in enc->disable()
  2020-05-12  7:31 ` Liu Ying
@ 2020-05-28  2:58   ` Liu Ying
  -1 siblings, 0 replies; 8+ messages in thread
From: Liu Ying @ 2020-05-28  2:58 UTC (permalink / raw)
  To: dri-devel; +Cc: p.zabel, s.hauer, kernel, linux-imx, stable

Gentle ping...

On Tue, 2020-05-12 at 15:31 +0800, Liu Ying wrote:
> Both of the two LVDS channels should be disabled for split mode
> in the encoder's ->disable() callback, because they are enabled
> in the encoder's ->enable() callback.
> 
> Fixes: 6556f7f82b9c ("drm: imx: Move imx-drm driver out of staging")
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
> Cc: NXP Linux Team <linux-imx@nxp.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Liu Ying <victor.liu@nxp.com>
> ---
>  drivers/gpu/drm/imx/imx-ldb.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-
> ldb.c
> index 4da22a9..af4d0d8 100644
> --- a/drivers/gpu/drm/imx/imx-ldb.c
> +++ b/drivers/gpu/drm/imx/imx-ldb.c
> @@ -303,18 +303,19 @@ static void imx_ldb_encoder_disable(struct
> drm_encoder *encoder)
>  {
>  	struct imx_ldb_channel *imx_ldb_ch =
> enc_to_imx_ldb_ch(encoder);
>  	struct imx_ldb *ldb = imx_ldb_ch->ldb;
> +	int dual = ldb->ldb_ctrl & LDB_SPLIT_MODE_EN;
>  	int mux, ret;
>  
>  	drm_panel_disable(imx_ldb_ch->panel);
>  
> -	if (imx_ldb_ch == &ldb->channel[0])
> +	if (imx_ldb_ch == &ldb->channel[0] || dual)
>  		ldb->ldb_ctrl &= ~LDB_CH0_MODE_EN_MASK;
> -	else if (imx_ldb_ch == &ldb->channel[1])
> +	if (imx_ldb_ch == &ldb->channel[1] || dual)
>  		ldb->ldb_ctrl &= ~LDB_CH1_MODE_EN_MASK;
>  
>  	regmap_write(ldb->regmap, IOMUXC_GPR2, ldb->ldb_ctrl);
>  
> -	if (ldb->ldb_ctrl & LDB_SPLIT_MODE_EN) {
> +	if (dual) {
>  		clk_disable_unprepare(ldb->clk[0]);
>  		clk_disable_unprepare(ldb->clk[1]);
>  	}


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

* Re: [PATCH] drm/imx: imx-ldb: Disable both channels for split mode in enc->disable()
@ 2020-05-28  2:58   ` Liu Ying
  0 siblings, 0 replies; 8+ messages in thread
From: Liu Ying @ 2020-05-28  2:58 UTC (permalink / raw)
  To: dri-devel; +Cc: stable, s.hauer, kernel, linux-imx

Gentle ping...

On Tue, 2020-05-12 at 15:31 +0800, Liu Ying wrote:
> Both of the two LVDS channels should be disabled for split mode
> in the encoder's ->disable() callback, because they are enabled
> in the encoder's ->enable() callback.
> 
> Fixes: 6556f7f82b9c ("drm: imx: Move imx-drm driver out of staging")
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
> Cc: NXP Linux Team <linux-imx@nxp.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Liu Ying <victor.liu@nxp.com>
> ---
>  drivers/gpu/drm/imx/imx-ldb.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-
> ldb.c
> index 4da22a9..af4d0d8 100644
> --- a/drivers/gpu/drm/imx/imx-ldb.c
> +++ b/drivers/gpu/drm/imx/imx-ldb.c
> @@ -303,18 +303,19 @@ static void imx_ldb_encoder_disable(struct
> drm_encoder *encoder)
>  {
>  	struct imx_ldb_channel *imx_ldb_ch =
> enc_to_imx_ldb_ch(encoder);
>  	struct imx_ldb *ldb = imx_ldb_ch->ldb;
> +	int dual = ldb->ldb_ctrl & LDB_SPLIT_MODE_EN;
>  	int mux, ret;
>  
>  	drm_panel_disable(imx_ldb_ch->panel);
>  
> -	if (imx_ldb_ch == &ldb->channel[0])
> +	if (imx_ldb_ch == &ldb->channel[0] || dual)
>  		ldb->ldb_ctrl &= ~LDB_CH0_MODE_EN_MASK;
> -	else if (imx_ldb_ch == &ldb->channel[1])
> +	if (imx_ldb_ch == &ldb->channel[1] || dual)
>  		ldb->ldb_ctrl &= ~LDB_CH1_MODE_EN_MASK;
>  
>  	regmap_write(ldb->regmap, IOMUXC_GPR2, ldb->ldb_ctrl);
>  
> -	if (ldb->ldb_ctrl & LDB_SPLIT_MODE_EN) {
> +	if (dual) {
>  		clk_disable_unprepare(ldb->clk[0]);
>  		clk_disable_unprepare(ldb->clk[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] drm/imx: imx-ldb: Disable both channels for split mode in enc->disable()
  2020-05-28  2:58   ` Liu Ying
@ 2020-05-28  9:31     ` Marco Felsch
  -1 siblings, 0 replies; 8+ messages in thread
From: Marco Felsch @ 2020-05-28  9:31 UTC (permalink / raw)
  To: Liu Ying; +Cc: dri-devel, stable, s.hauer, kernel, linux-imx

Hi Liu

On 20-05-28 10:58, Liu Ying wrote:
> Gentle ping...

Please check my "spring cleanup series" [1] which do the split:

[1] https://www.spinics.net/lists/arm-kernel/msg789309.html

Regards,
  Marco

> On Tue, 2020-05-12 at 15:31 +0800, Liu Ying wrote:
> > Both of the two LVDS channels should be disabled for split mode
> > in the encoder's ->disable() callback, because they are enabled
> > in the encoder's ->enable() callback.
> > 
> > Fixes: 6556f7f82b9c ("drm: imx: Move imx-drm driver out of staging")
> > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > Cc: Sascha Hauer <s.hauer@pengutronix.de>
> > Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
> > Cc: NXP Linux Team <linux-imx@nxp.com>
> > Cc: <stable@vger.kernel.org>
> > Signed-off-by: Liu Ying <victor.liu@nxp.com>
> > ---
> >  drivers/gpu/drm/imx/imx-ldb.c | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-
> > ldb.c
> > index 4da22a9..af4d0d8 100644
> > --- a/drivers/gpu/drm/imx/imx-ldb.c
> > +++ b/drivers/gpu/drm/imx/imx-ldb.c
> > @@ -303,18 +303,19 @@ static void imx_ldb_encoder_disable(struct
> > drm_encoder *encoder)
> >  {
> >  	struct imx_ldb_channel *imx_ldb_ch =
> > enc_to_imx_ldb_ch(encoder);
> >  	struct imx_ldb *ldb = imx_ldb_ch->ldb;
> > +	int dual = ldb->ldb_ctrl & LDB_SPLIT_MODE_EN;
> >  	int mux, ret;
> >  
> >  	drm_panel_disable(imx_ldb_ch->panel);
> >  
> > -	if (imx_ldb_ch == &ldb->channel[0])
> > +	if (imx_ldb_ch == &ldb->channel[0] || dual)
> >  		ldb->ldb_ctrl &= ~LDB_CH0_MODE_EN_MASK;
> > -	else if (imx_ldb_ch == &ldb->channel[1])
> > +	if (imx_ldb_ch == &ldb->channel[1] || dual)
> >  		ldb->ldb_ctrl &= ~LDB_CH1_MODE_EN_MASK;
> >  
> >  	regmap_write(ldb->regmap, IOMUXC_GPR2, ldb->ldb_ctrl);
> >  
> > -	if (ldb->ldb_ctrl & LDB_SPLIT_MODE_EN) {
> > +	if (dual) {
> >  		clk_disable_unprepare(ldb->clk[0]);
> >  		clk_disable_unprepare(ldb->clk[1]);
> >  	}
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH] drm/imx: imx-ldb: Disable both channels for split mode in enc->disable()
@ 2020-05-28  9:31     ` Marco Felsch
  0 siblings, 0 replies; 8+ messages in thread
From: Marco Felsch @ 2020-05-28  9:31 UTC (permalink / raw)
  To: Liu Ying; +Cc: kernel, s.hauer, stable, dri-devel, linux-imx

Hi Liu

On 20-05-28 10:58, Liu Ying wrote:
> Gentle ping...

Please check my "spring cleanup series" [1] which do the split:

[1] https://www.spinics.net/lists/arm-kernel/msg789309.html

Regards,
  Marco

> On Tue, 2020-05-12 at 15:31 +0800, Liu Ying wrote:
> > Both of the two LVDS channels should be disabled for split mode
> > in the encoder's ->disable() callback, because they are enabled
> > in the encoder's ->enable() callback.
> > 
> > Fixes: 6556f7f82b9c ("drm: imx: Move imx-drm driver out of staging")
> > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > Cc: Sascha Hauer <s.hauer@pengutronix.de>
> > Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
> > Cc: NXP Linux Team <linux-imx@nxp.com>
> > Cc: <stable@vger.kernel.org>
> > Signed-off-by: Liu Ying <victor.liu@nxp.com>
> > ---
> >  drivers/gpu/drm/imx/imx-ldb.c | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-
> > ldb.c
> > index 4da22a9..af4d0d8 100644
> > --- a/drivers/gpu/drm/imx/imx-ldb.c
> > +++ b/drivers/gpu/drm/imx/imx-ldb.c
> > @@ -303,18 +303,19 @@ static void imx_ldb_encoder_disable(struct
> > drm_encoder *encoder)
> >  {
> >  	struct imx_ldb_channel *imx_ldb_ch =
> > enc_to_imx_ldb_ch(encoder);
> >  	struct imx_ldb *ldb = imx_ldb_ch->ldb;
> > +	int dual = ldb->ldb_ctrl & LDB_SPLIT_MODE_EN;
> >  	int mux, ret;
> >  
> >  	drm_panel_disable(imx_ldb_ch->panel);
> >  
> > -	if (imx_ldb_ch == &ldb->channel[0])
> > +	if (imx_ldb_ch == &ldb->channel[0] || dual)
> >  		ldb->ldb_ctrl &= ~LDB_CH0_MODE_EN_MASK;
> > -	else if (imx_ldb_ch == &ldb->channel[1])
> > +	if (imx_ldb_ch == &ldb->channel[1] || dual)
> >  		ldb->ldb_ctrl &= ~LDB_CH1_MODE_EN_MASK;
> >  
> >  	regmap_write(ldb->regmap, IOMUXC_GPR2, ldb->ldb_ctrl);
> >  
> > -	if (ldb->ldb_ctrl & LDB_SPLIT_MODE_EN) {
> > +	if (dual) {
> >  		clk_disable_unprepare(ldb->clk[0]);
> >  		clk_disable_unprepare(ldb->clk[1]);
> >  	}
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
_______________________________________________
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] drm/imx: imx-ldb: Disable both channels for split mode in enc->disable()
  2020-05-28  9:31     ` Marco Felsch
@ 2020-05-28 10:02       ` Liu Ying
  -1 siblings, 0 replies; 8+ messages in thread
From: Liu Ying @ 2020-05-28 10:02 UTC (permalink / raw)
  To: Marco Felsch; +Cc: dri-devel, stable, s.hauer, kernel, linux-imx, p.zable

Hi Marco,

On Thu, 2020-05-28 at 11:31 +0200, Marco Felsch wrote:
> Hi Liu
> 
> On 20-05-28 10:58, Liu Ying wrote:
> > Gentle ping...
> 
> Please check my "spring cleanup series" [1] which do the split:

It looks that your series doesn't disable both lvds channels in the
encoder disablement callback for the ldb split mode.
So, I think this patch still stands.

Regards,
Liu Ying

> 
> [1] 
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.spinics.net%2Flists%2Farm-kernel%2Fmsg789309.html&amp;data=02%7C01%7Cvictor.liu%40nxp.com%7Cd177bf874b8f41c404e108d802e9f179%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637262551086663318&amp;sdata=PIMNspESt%2BYqEMV1Vh0eBn5PNjKPfz5GdJ6NrnM2bUw%3D&amp;reserved=0
> 
> Regards,
>   Marco
> 
> > On Tue, 2020-05-12 at 15:31 +0800, Liu Ying wrote:
> > > Both of the two LVDS channels should be disabled for split mode
> > > in the encoder's ->disable() callback, because they are enabled
> > > in the encoder's ->enable() callback.
> > > 
> > > Fixes: 6556f7f82b9c ("drm: imx: Move imx-drm driver out of
> > > staging")
> > > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > > Cc: Sascha Hauer <s.hauer@pengutronix.de>
> > > Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
> > > Cc: NXP Linux Team <linux-imx@nxp.com>
> > > Cc: <stable@vger.kernel.org>
> > > Signed-off-by: Liu Ying <victor.liu@nxp.com>
> > > ---
> > >  drivers/gpu/drm/imx/imx-ldb.c | 7 ++++---
> > >  1 file changed, 4 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/imx/imx-ldb.c
> > > b/drivers/gpu/drm/imx/imx-
> > > ldb.c
> > > index 4da22a9..af4d0d8 100644
> > > --- a/drivers/gpu/drm/imx/imx-ldb.c
> > > +++ b/drivers/gpu/drm/imx/imx-ldb.c
> > > @@ -303,18 +303,19 @@ static void imx_ldb_encoder_disable(struct
> > > drm_encoder *encoder)
> > >  {
> > >  	struct imx_ldb_channel *imx_ldb_ch =
> > > enc_to_imx_ldb_ch(encoder);
> > >  	struct imx_ldb *ldb = imx_ldb_ch->ldb;
> > > +	int dual = ldb->ldb_ctrl & LDB_SPLIT_MODE_EN;
> > >  	int mux, ret;
> > >  
> > >  	drm_panel_disable(imx_ldb_ch->panel);
> > >  
> > > -	if (imx_ldb_ch == &ldb->channel[0])
> > > +	if (imx_ldb_ch == &ldb->channel[0] || dual)
> > >  		ldb->ldb_ctrl &= ~LDB_CH0_MODE_EN_MASK;
> > > -	else if (imx_ldb_ch == &ldb->channel[1])
> > > +	if (imx_ldb_ch == &ldb->channel[1] || dual)
> > >  		ldb->ldb_ctrl &= ~LDB_CH1_MODE_EN_MASK;
> > >  
> > >  	regmap_write(ldb->regmap, IOMUXC_GPR2, ldb->ldb_ctrl);
> > >  
> > > -	if (ldb->ldb_ctrl & LDB_SPLIT_MODE_EN) {
> > > +	if (dual) {
> > >  		clk_disable_unprepare(ldb->clk[0]);
> > >  		clk_disable_unprepare(ldb->clk[1]);
> > >  	}
> > 
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fdri-devel&amp;data=02%7C01%7Cvictor.liu%40nxp.com%7Cd177bf874b8f41c404e108d802e9f179%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637262551086663318&amp;sdata=lNC4lwLUqM0upUxrrBtk1ap423lBIQlAAqDjdHv92LI%3D&amp;reserved=0
> > 


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

* Re: [PATCH] drm/imx: imx-ldb: Disable both channels for split mode in enc->disable()
@ 2020-05-28 10:02       ` Liu Ying
  0 siblings, 0 replies; 8+ messages in thread
From: Liu Ying @ 2020-05-28 10:02 UTC (permalink / raw)
  To: Marco Felsch; +Cc: s.hauer, stable, p.zable, dri-devel, kernel, linux-imx

Hi Marco,

On Thu, 2020-05-28 at 11:31 +0200, Marco Felsch wrote:
> Hi Liu
> 
> On 20-05-28 10:58, Liu Ying wrote:
> > Gentle ping...
> 
> Please check my "spring cleanup series" [1] which do the split:

It looks that your series doesn't disable both lvds channels in the
encoder disablement callback for the ldb split mode.
So, I think this patch still stands.

Regards,
Liu Ying

> 
> [1] 
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.spinics.net%2Flists%2Farm-kernel%2Fmsg789309.html&amp;data=02%7C01%7Cvictor.liu%40nxp.com%7Cd177bf874b8f41c404e108d802e9f179%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637262551086663318&amp;sdata=PIMNspESt%2BYqEMV1Vh0eBn5PNjKPfz5GdJ6NrnM2bUw%3D&amp;reserved=0
> 
> Regards,
>   Marco
> 
> > On Tue, 2020-05-12 at 15:31 +0800, Liu Ying wrote:
> > > Both of the two LVDS channels should be disabled for split mode
> > > in the encoder's ->disable() callback, because they are enabled
> > > in the encoder's ->enable() callback.
> > > 
> > > Fixes: 6556f7f82b9c ("drm: imx: Move imx-drm driver out of
> > > staging")
> > > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > > Cc: Sascha Hauer <s.hauer@pengutronix.de>
> > > Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
> > > Cc: NXP Linux Team <linux-imx@nxp.com>
> > > Cc: <stable@vger.kernel.org>
> > > Signed-off-by: Liu Ying <victor.liu@nxp.com>
> > > ---
> > >  drivers/gpu/drm/imx/imx-ldb.c | 7 ++++---
> > >  1 file changed, 4 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/imx/imx-ldb.c
> > > b/drivers/gpu/drm/imx/imx-
> > > ldb.c
> > > index 4da22a9..af4d0d8 100644
> > > --- a/drivers/gpu/drm/imx/imx-ldb.c
> > > +++ b/drivers/gpu/drm/imx/imx-ldb.c
> > > @@ -303,18 +303,19 @@ static void imx_ldb_encoder_disable(struct
> > > drm_encoder *encoder)
> > >  {
> > >  	struct imx_ldb_channel *imx_ldb_ch =
> > > enc_to_imx_ldb_ch(encoder);
> > >  	struct imx_ldb *ldb = imx_ldb_ch->ldb;
> > > +	int dual = ldb->ldb_ctrl & LDB_SPLIT_MODE_EN;
> > >  	int mux, ret;
> > >  
> > >  	drm_panel_disable(imx_ldb_ch->panel);
> > >  
> > > -	if (imx_ldb_ch == &ldb->channel[0])
> > > +	if (imx_ldb_ch == &ldb->channel[0] || dual)
> > >  		ldb->ldb_ctrl &= ~LDB_CH0_MODE_EN_MASK;
> > > -	else if (imx_ldb_ch == &ldb->channel[1])
> > > +	if (imx_ldb_ch == &ldb->channel[1] || dual)
> > >  		ldb->ldb_ctrl &= ~LDB_CH1_MODE_EN_MASK;
> > >  
> > >  	regmap_write(ldb->regmap, IOMUXC_GPR2, ldb->ldb_ctrl);
> > >  
> > > -	if (ldb->ldb_ctrl & LDB_SPLIT_MODE_EN) {
> > > +	if (dual) {
> > >  		clk_disable_unprepare(ldb->clk[0]);
> > >  		clk_disable_unprepare(ldb->clk[1]);
> > >  	}
> > 
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fdri-devel&amp;data=02%7C01%7Cvictor.liu%40nxp.com%7Cd177bf874b8f41c404e108d802e9f179%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637262551086663318&amp;sdata=lNC4lwLUqM0upUxrrBtk1ap423lBIQlAAqDjdHv92LI%3D&amp;reserved=0
> > 

_______________________________________________
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:[~2020-05-28 22:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-12  7:31 [PATCH] drm/imx: imx-ldb: Disable both channels for split mode in enc->disable() Liu Ying
2020-05-12  7:31 ` Liu Ying
2020-05-28  2:58 ` Liu Ying
2020-05-28  2:58   ` Liu Ying
2020-05-28  9:31   ` Marco Felsch
2020-05-28  9:31     ` Marco Felsch
2020-05-28 10:02     ` Liu Ying
2020-05-28 10:02       ` Liu Ying

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.