All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/exynos: use drm_plane_force_disable
@ 2015-04-09  6:54 Joonyoung Shim
  2015-04-09 20:25 ` Gustavo Padovan
  0 siblings, 1 reply; 4+ messages in thread
From: Joonyoung Shim @ 2015-04-09  6:54 UTC (permalink / raw)
  To: dri-devel; +Cc: gustavo.padovan, sw0312.kim

Don't call directly disable callback of plane helper, we need to
disconnect the plane from the fb and crtc after disable callback.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_crtc.c    | 5 +----
 drivers/gpu/drm/exynos/exynos_drm_encoder.c | 2 +-
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index 519c569..50c830e 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -48,7 +48,6 @@ static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
 {
 	struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
 	struct drm_plane *plane;
-	int ret;
 
 	if (!exynos_crtc->enabled)
 		return;
@@ -69,9 +68,7 @@ static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
 		if (plane->crtc != crtc)
 			continue;
 
-		ret = plane->funcs->disable_plane(plane);
-		if (ret)
-			DRM_ERROR("Failed to disable plane %d\n", ret);
+		drm_plane_force_disable(plane);
 	}
 }
 
diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
index 0648ba4..3ca266d 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
@@ -90,7 +90,7 @@ static void exynos_drm_encoder_disable(struct drm_encoder *encoder)
 	/* all planes connected to this encoder should be also disabled. */
 	drm_for_each_legacy_plane(plane, &dev->mode_config.plane_list) {
 		if (plane->crtc && (plane->crtc == encoder->crtc))
-			plane->funcs->disable_plane(plane);
+			drm_plane_force_disable(plane);
 	}
 }
 
-- 
1.9.1

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

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

* Re: [PATCH] drm/exynos: use drm_plane_force_disable
  2015-04-09  6:54 [PATCH] drm/exynos: use drm_plane_force_disable Joonyoung Shim
@ 2015-04-09 20:25 ` Gustavo Padovan
  2015-04-10  2:16   ` Inki Dae
  0 siblings, 1 reply; 4+ messages in thread
From: Gustavo Padovan @ 2015-04-09 20:25 UTC (permalink / raw)
  To: Joonyoung Shim; +Cc: sw0312.kim, gustavo.padovan, dri-devel

Hi Joonyoung,

2015-04-09 Joonyoung Shim <jy0922.shim@samsung.com>:

> Don't call directly disable callback of plane helper, we need to
> disconnect the plane from the fb and crtc after disable callback.
> 
> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_crtc.c    | 5 +----
>  drivers/gpu/drm/exynos/exynos_drm_encoder.c | 2 +-
>  2 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> index 519c569..50c830e 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> @@ -48,7 +48,6 @@ static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
>  {
>  	struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
>  	struct drm_plane *plane;
> -	int ret;
>  
>  	if (!exynos_crtc->enabled)
>  		return;
> @@ -69,9 +68,7 @@ static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
>  		if (plane->crtc != crtc)
>  			continue;
>  
> -		ret = plane->funcs->disable_plane(plane);
> -		if (ret)
> -			DRM_ERROR("Failed to disable plane %d\n", ret);
> +		drm_plane_force_disable(plane);
>  	}

Which tree did you based this code? I've removed all this code in atomic.
These two pieces of code makes no sense in atomic modesetting, disable would
be called from the drm atomic core there.

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

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

* Re: [PATCH] drm/exynos: use drm_plane_force_disable
  2015-04-09 20:25 ` Gustavo Padovan
@ 2015-04-10  2:16   ` Inki Dae
  2015-04-10 18:59     ` Gustavo Padovan
  0 siblings, 1 reply; 4+ messages in thread
From: Inki Dae @ 2015-04-10  2:16 UTC (permalink / raw)
  To: dri-devel

On 2015년 04월 10일 05:25, Gustavo Padovan wrote:
> Hi Joonyoung,
> 
> 2015-04-09 Joonyoung Shim <jy0922.shim@samsung.com>:
> 
>> Don't call directly disable callback of plane helper, we need to
>> disconnect the plane from the fb and crtc after disable callback.
>>
>> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
>> ---
>>  drivers/gpu/drm/exynos/exynos_drm_crtc.c    | 5 +----
>>  drivers/gpu/drm/exynos/exynos_drm_encoder.c | 2 +-
>>  2 files changed, 2 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
>> index 519c569..50c830e 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
>> @@ -48,7 +48,6 @@ static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
>>  {
>>  	struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
>>  	struct drm_plane *plane;
>> -	int ret;
>>  
>>  	if (!exynos_crtc->enabled)
>>  		return;
>> @@ -69,9 +68,7 @@ static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
>>  		if (plane->crtc != crtc)
>>  			continue;
>>  
>> -		ret = plane->funcs->disable_plane(plane);
>> -		if (ret)
>> -			DRM_ERROR("Failed to disable plane %d\n", ret);
>> +		drm_plane_force_disable(plane);
>>  	}
> 
> Which tree did you based this code? I've removed all this code in atomic.
> These two pieces of code makes no sense in atomic modesetting, disable would
> be called from the drm atomic core there.

Mr. Gustavo,

Could you check if you have other codes not posted? At least, it seems
that the codes you posted are same as above.

Thanks,
Inki Dae

> 
> 	Gustavo
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

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

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

* Re: [PATCH] drm/exynos: use drm_plane_force_disable
  2015-04-10  2:16   ` Inki Dae
@ 2015-04-10 18:59     ` Gustavo Padovan
  0 siblings, 0 replies; 4+ messages in thread
From: Gustavo Padovan @ 2015-04-10 18:59 UTC (permalink / raw)
  To: Inki Dae; +Cc: dri-devel

Hi Inki,

2015-04-10 Inki Dae <inki.dae@samsung.com>:

> On 2015년 04월 10일 05:25, Gustavo Padovan wrote:
> > Hi Joonyoung,
> > 
> > 2015-04-09 Joonyoung Shim <jy0922.shim@samsung.com>:
> > 
> >> Don't call directly disable callback of plane helper, we need to
> >> disconnect the plane from the fb and crtc after disable callback.
> >>
> >> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
> >> ---
> >>  drivers/gpu/drm/exynos/exynos_drm_crtc.c    | 5 +----
> >>  drivers/gpu/drm/exynos/exynos_drm_encoder.c | 2 +-
> >>  2 files changed, 2 insertions(+), 5 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> >> index 519c569..50c830e 100644
> >> --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> >> +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> >> @@ -48,7 +48,6 @@ static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
> >>  {
> >>  	struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
> >>  	struct drm_plane *plane;
> >> -	int ret;
> >>  
> >>  	if (!exynos_crtc->enabled)
> >>  		return;
> >> @@ -69,9 +68,7 @@ static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
> >>  		if (plane->crtc != crtc)
> >>  			continue;
> >>  
> >> -		ret = plane->funcs->disable_plane(plane);
> >> -		if (ret)
> >> -			DRM_ERROR("Failed to disable plane %d\n", ret);
> >> +		drm_plane_force_disable(plane);
> >>  	}
> > 
> > Which tree did you based this code? I've removed all this code in atomic.
> > These two pieces of code makes no sense in atomic modesetting, disable would
> > be called from the drm atomic core there.
> 
> Mr. Gustavo,
> 
> Could you check if you have other codes not posted? At least, it seems
> that the codes you posted are same as above.

In fact there was one patch not post. In my head it was just a simple clean up
so I've delayed but I've looked to them again and it exactly the patch you may
need here.

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

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

end of thread, other threads:[~2015-04-10 18:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-09  6:54 [PATCH] drm/exynos: use drm_plane_force_disable Joonyoung Shim
2015-04-09 20:25 ` Gustavo Padovan
2015-04-10  2:16   ` Inki Dae
2015-04-10 18:59     ` Gustavo Padovan

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.