Re: [PATCH] drm/exynos: remove unnecessary calls to disable_plane()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 04/11/2015 03:57 AM, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@xxxxxxxxxxxxxxx>
> 
> The planes are already disabled by the drm_atomic_helper_commit() code
> so we don't need to disable the in these two places.
> 
> Signed-off-by: Gustavo Padovan <gustavo.padovan@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_crtc.c    | 11 -----------
>  drivers/gpu/drm/exynos/exynos_drm_encoder.c |  8 --------
>  2 files changed, 19 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> index 519c569..9bf25ff 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> @@ -47,8 +47,6 @@ static void exynos_drm_crtc_enable(struct drm_crtc *crtc)
>  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;
> @@ -64,15 +62,6 @@ static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
>  		exynos_crtc->ops->dpms(exynos_crtc, DRM_MODE_DPMS_OFF);
>  
>  	exynos_crtc->enabled = false;
> -
> -	drm_for_each_legacy_plane(plane, &crtc->dev->mode_config.plane_list) {
> -		if (plane->crtc != crtc)
> -			continue;
> -
> -		ret = plane->funcs->disable_plane(plane);
> -		if (ret)
> -			DRM_ERROR("Failed to disable plane %d\n", ret);
> -	}

If remove here disable codes, when crtc is disabled, enabled overlay
planes may not be disabled.

E.g, user can remove fb of crtc via DRM_IOCTL_MODE_RMFB ioctl, then crtc
is disabled but overlay planes no.

Thanks.

>  }
>  
>  static bool
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
> index 0648ba4..7b89fd5 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
> @@ -81,17 +81,9 @@ static void exynos_drm_encoder_disable(struct drm_encoder *encoder)
>  {
>  	struct exynos_drm_encoder *exynos_encoder = to_exynos_encoder(encoder);
>  	struct exynos_drm_display *display = exynos_encoder->display;
> -	struct drm_plane *plane;
> -	struct drm_device *dev = encoder->dev;
>  
>  	if (display->ops->dpms)
>  		display->ops->dpms(display, DRM_MODE_DPMS_OFF);
> -
> -	/* 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);
> -	}
>  }
>  
>  static struct drm_encoder_helper_funcs exynos_encoder_helper_funcs = {
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux