Re: [PATCH 12/23] drm/exynos: don't track enabled state at exynos_crtc

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

 



On 06/24/2015 06:35 AM, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@xxxxxxxxxxxxxxx>
> 
> struct drm_crtc already stores the enabled state of the crtc
> thus we don't need to replicate enabled in exynos_drm_crtc.
> 
> Signed-off-by: Gustavo Padovan <gustavo.padovan@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_crtc.c | 16 ----------------
>  drivers/gpu/drm/exynos/exynos_drm_drv.h  |  1 -
>  2 files changed, 17 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> index e9c291f..88a50b7 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> @@ -26,14 +26,9 @@ static void exynos_drm_crtc_enable(struct drm_crtc *crtc)
>  {
>  	struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
>  
> -	if (exynos_crtc->enabled)
> -		return;
> -
>  	if (exynos_crtc->ops->enable)
>  		exynos_crtc->ops->enable(exynos_crtc);
>  
> -	exynos_crtc->enabled = true;
> -
>  	drm_crtc_vblank_on(crtc);
>  }
>  
> @@ -41,9 +36,6 @@ static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
>  {
>  	struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
>  
> -	if (!exynos_crtc->enabled)
> -		return;
> -
>  	/* wait for the completion of page flip. */
>  	if (!wait_event_timeout(exynos_crtc->pending_flip_queue,
>  				(exynos_crtc->event == NULL), HZ/20))
> @@ -53,8 +45,6 @@ static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
>  
>  	if (exynos_crtc->ops->disable)
>  		exynos_crtc->ops->disable(exynos_crtc);
> -
> -	exynos_crtc->enabled = false;
>  }
>  
>  static bool
> @@ -171,9 +161,6 @@ int exynos_drm_crtc_enable_vblank(struct drm_device *dev, int pipe)
>  	struct exynos_drm_crtc *exynos_crtc =
>  		to_exynos_crtc(private->crtc[pipe]);
>  
> -	if (!exynos_crtc->enabled)
> -		return -EPERM;
> -
>  	if (exynos_crtc->ops->enable_vblank)
>  		exynos_crtc->ops->enable_vblank(exynos_crtc);

Before apply this patch, we should check return value of
exynos_crtc->ops->enable_vblank() and return it.
--
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