[PATCH v10 17/17] drm/exynos: split exynos_crtc->dpms in enable() and disable()

2015-06-01 Thread Gustavo Padovan
From: Gustavo Padovan 

To follow more closely the new atomic API we split the dpms()
helper into the enable() and disable() helper to get exactly the
same semantics.

Signed-off-by: Gustavo Padovan 
---
 drivers/gpu/drm/exynos/exynos7_drm_decon.c | 87 ++
 drivers/gpu/drm/exynos/exynos_drm_crtc.c   |  8 +--
 drivers/gpu/drm/exynos/exynos_drm_drv.h|  6 ++-
 drivers/gpu/drm/exynos/exynos_drm_fimd.c   | 69 +---
 drivers/gpu/drm/exynos/exynos_drm_vidi.c   | 53 +++---
 drivers/gpu/drm/exynos/exynos_mixer.c  | 26 +++--
 6 files changed, 62 insertions(+), 187 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c 
b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
index f29e4be..d659ba2 100644
--- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
@@ -603,75 +603,39 @@ static void decon_init(struct decon_context *ctx)
writel(VIDCON1_VCLK_HOLD, ctx->regs + VIDCON1(0));
 }
 
-static int decon_poweron(struct decon_context *ctx)
+static void decon_enable(struct exynos_drm_crtc *crtc)
 {
-   int ret;
+   struct decon_context *ctx = crtc->ctx;
 
if (!ctx->suspended)
-   return 0;
+   return;
 
ctx->suspended = false;
 
pm_runtime_get_sync(ctx->dev);
 
-   ret = clk_prepare_enable(ctx->pclk);
-   if (ret < 0) {
-   DRM_ERROR("Failed to prepare_enable the pclk [%d]\n", ret);
-   goto pclk_err;
-   }
-
-   ret = clk_prepare_enable(ctx->aclk);
-   if (ret < 0) {
-   DRM_ERROR("Failed to prepare_enable the aclk [%d]\n", ret);
-   goto aclk_err;
-   }
-
-   ret = clk_prepare_enable(ctx->eclk);
-   if  (ret < 0) {
-   DRM_ERROR("Failed to prepare_enable the eclk [%d]\n", ret);
-   goto eclk_err;
-   }
-
-   ret = clk_prepare_enable(ctx->vclk);
-   if  (ret < 0) {
-   DRM_ERROR("Failed to prepare_enable the vclk [%d]\n", ret);
-   goto vclk_err;
-   }
+   clk_prepare_enable(ctx->pclk);
+   clk_prepare_enable(ctx->aclk);
+   clk_prepare_enable(ctx->eclk);
+   clk_prepare_enable(ctx->vclk);
 
decon_init(ctx);
 
/* if vblank was enabled status, enable it again. */
-   if (test_and_clear_bit(0, &ctx->irq_flags)) {
-   ret = decon_enable_vblank(ctx->crtc);
-   if (ret) {
-   DRM_ERROR("Failed to re-enable vblank [%d]\n", ret);
-   goto err;
-   }
-   }
+   if (test_and_clear_bit(0, &ctx->irq_flags))
+   decon_enable_vblank(ctx->crtc);
 
decon_window_resume(ctx);
 
decon_apply(ctx);
-
-   return 0;
-
-err:
-   clk_disable_unprepare(ctx->vclk);
-vclk_err:
-   clk_disable_unprepare(ctx->eclk);
-eclk_err:
-   clk_disable_unprepare(ctx->aclk);
-aclk_err:
-   clk_disable_unprepare(ctx->pclk);
-pclk_err:
-   ctx->suspended = true;
-   return ret;
 }
 
-static int decon_poweroff(struct decon_context *ctx)
+static void decon_disable(struct exynos_drm_crtc *crtc)
 {
+   struct decon_context *ctx = crtc->ctx;
+
if (ctx->suspended)
-   return 0;
+   return;
 
/*
 * We need to make sure that all windows are disabled before we
@@ -688,30 +652,11 @@ static int decon_poweroff(struct decon_context *ctx)
pm_runtime_put_sync(ctx->dev);
 
ctx->suspended = true;
-   return 0;
-}
-
-static void decon_dpms(struct exynos_drm_crtc *crtc, int mode)
-{
-   DRM_DEBUG_KMS("%s, %d\n", __FILE__, mode);
-
-   switch (mode) {
-   case DRM_MODE_DPMS_ON:
-   decon_poweron(crtc->ctx);
-   break;
-   case DRM_MODE_DPMS_STANDBY:
-   case DRM_MODE_DPMS_SUSPEND:
-   case DRM_MODE_DPMS_OFF:
-   decon_poweroff(crtc->ctx);
-   break;
-   default:
-   DRM_DEBUG_KMS("unspecified mode %d\n", mode);
-   break;
-   }
 }
 
 static const struct exynos_drm_crtc_ops decon_crtc_ops = {
-   .dpms = decon_dpms,
+   .enable = decon_enable,
+   .disable = decon_disable,
.mode_fixup = decon_mode_fixup,
.commit = decon_commit,
.enable_vblank = decon_enable_vblank,
@@ -796,7 +741,7 @@ static void decon_unbind(struct device *dev, struct device 
*master,
 {
struct decon_context *ctx = dev_get_drvdata(dev);
 
-   decon_dpms(ctx->crtc, DRM_MODE_DPMS_OFF);
+   decon_disable(ctx->crtc);
 
if (ctx->display)
exynos_dpi_remove(ctx->display);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c 
b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index b7c6d51..644b4b7 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -29,8 +29,8 @@ static void exynos_drm_crtc_enable(struct drm_crtc *crtc)
if (

Re: [PATCH v10 17/17] drm/exynos: split exynos_crtc->dpms in enable() and disable()

2015-06-02 Thread Inki Dae
Hi,

On 2015년 06월 02일 00:04, Gustavo Padovan wrote:
> From: Gustavo Padovan 
> 
> To follow more closely the new atomic API we split the dpms()
> helper into the enable() and disable() helper to get exactly the
> same semantics.

Below is the result from checkpatch.pl. Please fix all errors and check
your patch with checkpatch.pl before posting it.

Thanks,
Inki Dae

total: 62 errors, 0 warnings, 410 lines checked


> 
> Signed-off-by: Gustavo Padovan 
> ---
>  drivers/gpu/drm/exynos/exynos7_drm_decon.c | 87 
> ++
>  drivers/gpu/drm/exynos/exynos_drm_crtc.c   |  8 +--
>  drivers/gpu/drm/exynos/exynos_drm_drv.h|  6 ++-
>  drivers/gpu/drm/exynos/exynos_drm_fimd.c   | 69 +---
>  drivers/gpu/drm/exynos/exynos_drm_vidi.c   | 53 +++---
>  drivers/gpu/drm/exynos/exynos_mixer.c  | 26 +++--
>  6 files changed, 62 insertions(+), 187 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c 
> b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
> index f29e4be..d659ba2 100644
> --- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c
> +++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
> @@ -603,75 +603,39 @@ static void decon_init(struct decon_context *ctx)
>   writel(VIDCON1_VCLK_HOLD, ctx->regs + VIDCON1(0));
>  }
>  
> -static int decon_poweron(struct decon_context *ctx)
> +static void decon_enable(struct exynos_drm_crtc *crtc)
>  {
> - int ret;
> + struct decon_context *ctx = crtc->ctx;
>  
>   if (!ctx->suspended)
> - return 0;
> + return;
>  
>   ctx->suspended = false;
>  
>   pm_runtime_get_sync(ctx->dev);
>  
> - ret = clk_prepare_enable(ctx->pclk);
> - if (ret < 0) {
> - DRM_ERROR("Failed to prepare_enable the pclk [%d]\n", ret);
> - goto pclk_err;
> - }
> -
> - ret = clk_prepare_enable(ctx->aclk);
> - if (ret < 0) {
> - DRM_ERROR("Failed to prepare_enable the aclk [%d]\n", ret);
> - goto aclk_err;
> - }
> -
> - ret = clk_prepare_enable(ctx->eclk);
> - if  (ret < 0) {
> - DRM_ERROR("Failed to prepare_enable the eclk [%d]\n", ret);
> - goto eclk_err;
> - }
> -
> - ret = clk_prepare_enable(ctx->vclk);
> - if  (ret < 0) {
> - DRM_ERROR("Failed to prepare_enable the vclk [%d]\n", ret);
> - goto vclk_err;
> - }
> + clk_prepare_enable(ctx->pclk);
> + clk_prepare_enable(ctx->aclk);
> + clk_prepare_enable(ctx->eclk);
> + clk_prepare_enable(ctx->vclk);
>  
>   decon_init(ctx);
>  
>   /* if vblank was enabled status, enable it again. */
> - if (test_and_clear_bit(0, &ctx->irq_flags)) {
> - ret = decon_enable_vblank(ctx->crtc);
> - if (ret) {
> - DRM_ERROR("Failed to re-enable vblank [%d]\n", ret);
> - goto err;
> - }
> - }
> + if (test_and_clear_bit(0, &ctx->irq_flags))
> + decon_enable_vblank(ctx->crtc);
>  
>   decon_window_resume(ctx);
>  
>   decon_apply(ctx);
> -
> - return 0;
> -
> -err:
> - clk_disable_unprepare(ctx->vclk);
> -vclk_err:
> - clk_disable_unprepare(ctx->eclk);
> -eclk_err:
> - clk_disable_unprepare(ctx->aclk);
> -aclk_err:
> - clk_disable_unprepare(ctx->pclk);
> -pclk_err:
> - ctx->suspended = true;
> - return ret;
>  }
>  
> -static int decon_poweroff(struct decon_context *ctx)
> +static void decon_disable(struct exynos_drm_crtc *crtc)
>  {
> + struct decon_context *ctx = crtc->ctx;
> +
>   if (ctx->suspended)
> - return 0;
> + return;
>  
>   /*
>* We need to make sure that all windows are disabled before we
> @@ -688,30 +652,11 @@ static int decon_poweroff(struct decon_context *ctx)
>   pm_runtime_put_sync(ctx->dev);
>  
>   ctx->suspended = true;
> - return 0;
> -}
> -
> -static void decon_dpms(struct exynos_drm_crtc *crtc, int mode)
> -{
> - DRM_DEBUG_KMS("%s, %d\n", __FILE__, mode);
> -
> - switch (mode) {
> - case DRM_MODE_DPMS_ON:
> - decon_poweron(crtc->ctx);
> - break;
> - case DRM_MODE_DPMS_STANDBY:
> - case DRM_MODE_DPMS_SUSPEND:
> - case DRM_MODE_DPMS_OFF:
> - decon_poweroff(crtc->ctx);
> - break;
> - default:
> - DRM_DEBUG_KMS("unspecified mode %d\n", mode);
> - break;
> - }
>  }
>  
>  static const struct exynos_drm_crtc_ops decon_crtc_ops = {
> - .dpms = decon_dpms,
> + .enable = decon_enable,
> + .disable = decon_disable,
>   .mode_fixup = decon_mode_fixup,
>   .commit = decon_commit,
>   .enable_vblank = decon_enable_vblank,
> @@ -796,7 +741,7 @@ static void decon_unbind(struct device *dev, struct 
> device *master,
>  {
>   struct decon_context *ctx = dev_get_drvdata(dev);
>  
> - decon_dpms(ctx->crtc, DRM_MODE_DPMS_OFF);
> + decon_disable(ctx->crtc);
>  
>

Re: [PATCH v10 17/17] drm/exynos: split exynos_crtc->dpms in enable() and disable()

2015-06-02 Thread Gustavo Padovan
Hi Inki,

2015-06-02 Inki Dae :

> Hi,
> 
> On 2015년 06월 02일 00:04, Gustavo Padovan wrote:
> > From: Gustavo Padovan 
> >
> > To follow more closely the new atomic API we split the dpms()
> > helper into the enable() and disable() helper to get exactly the
> > same semantics.
> 
> Below is the result from checkpatch.pl. Please fix all errors and check
> your patch with checkpatch.pl before posting it.
> 
> Thanks,
> Inki Dae
> 
> total: 62 errors, 0 warnings, 410 lines checked

I think you did something wrong when checking, for me it looks like
this:

0016-drm-exynos-split-exynos_crtc-dpms-in-enable-and-disa.patch has no
obvious style problems and is ready for submission.
WARNING: Do not use whitespace before Signed-off-by:
#12: 
Signed-off-by: Gustavo Padovan 

total: 0 errors, 1 warnings, 594 lines checked

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


Re: [PATCH v10 17/17] drm/exynos: split exynos_crtc->dpms in enable() and disable()

2015-06-02 Thread Javier Martinez Canillas
Hello Gustavo,

On Tue, Jun 2, 2015 at 4:06 PM, Gustavo Padovan  wrote:
> Hi Inki,
>
> 2015-06-02 Inki Dae :
>
>> Hi,
>>
>> On 2015년 06월 02일 00:04, Gustavo Padovan wrote:
>> > From: Gustavo Padovan 
>> >
>> > To follow more closely the new atomic API we split the dpms()
>> > helper into the enable() and disable() helper to get exactly the
>> > same semantics.
>>
>> Below is the result from checkpatch.pl. Please fix all errors and check
>> your patch with checkpatch.pl before posting it.
>>
>> Thanks,
>> Inki Dae
>>
>> total: 62 errors, 0 warnings, 410 lines checked
>
> I think you did something wrong when checking, for me it looks like
> this:
>
> 0016-drm-exynos-split-exynos_crtc-dpms-in-enable-and-disa.patch has no
> obvious style problems and is ready for submission.
> WARNING: Do not use whitespace before Signed-off-by:
> #12:
> Signed-off-by: Gustavo Padovan 
>
> total: 0 errors, 1 warnings, 594 lines checked
>

I also don't get any checkpatch.pl error or warnings when testing your patch:

$ pwclient get 6523251
Saved patch to 
v10-17-17-drm-exynos-split-exynos_crtc--dpms-in-enable-and-disable.patch.0

$ ./scripts/checkpatch.pl
v10-17-17-drm-exynos-split-exynos_crtc--dpms-in-enable-and-disable.patch
total: 0 errors, 0 warnings, 410 lines checked

v10-17-17-drm-exynos-split-exynos_crtc--dpms-in-enable-and-disable.patch
has no obvious style problems and is ready for submission.

> Gustavo

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


Re: [PATCH v10 17/17] drm/exynos: split exynos_crtc->dpms in enable() and disable()

2015-06-02 Thread Inki Dae
On 2015년 06월 02일 23:19, Javier Martinez Canillas wrote:
> Hello Gustavo,
> 
> On Tue, Jun 2, 2015 at 4:06 PM, Gustavo Padovan  wrote:
>> Hi Inki,
>>
>> 2015-06-02 Inki Dae :
>>
>>> Hi,
>>>
>>> On 2015년 06월 02일 00:04, Gustavo Padovan wrote:
 From: Gustavo Padovan 

 To follow more closely the new atomic API we split the dpms()
 helper into the enable() and disable() helper to get exactly the
 same semantics.
>>>
>>> Below is the result from checkpatch.pl. Please fix all errors and check
>>> your patch with checkpatch.pl before posting it.
>>>
>>> Thanks,
>>> Inki Dae
>>>
>>> total: 62 errors, 0 warnings, 410 lines checked
>>
>> I think you did something wrong when checking, for me it looks like
>> this:
>>
>> 0016-drm-exynos-split-exynos_crtc-dpms-in-enable-and-disa.patch has no
>> obvious style problems and is ready for submission.
>> WARNING: Do not use whitespace before Signed-off-by:
>> #12:
>> Signed-off-by: Gustavo Padovan 
>>
>> total: 0 errors, 1 warnings, 594 lines checked
>>
> 
> I also don't get any checkpatch.pl error or warnings when testing your patch:
> 
> $ pwclient get 6523251
> Saved patch to 
> v10-17-17-drm-exynos-split-exynos_crtc--dpms-in-enable-and-disable.patch.0
> 
> $ ./scripts/checkpatch.pl
> v10-17-17-drm-exynos-split-exynos_crtc--dpms-in-enable-and-disable.patch
> total: 0 errors, 0 warnings, 410 lines checked
> 
> v10-17-17-drm-exynos-split-exynos_crtc--dpms-in-enable-and-disable.patch
> has no obvious style problems and is ready for submission.

Yes, there was something wrong. While coping this patch series to my PC,
it seems that the text format of this patch file was mutated.

Thanks for checking,
Inki Dae

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

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


Re: [PATCH v10 17/17] drm/exynos: split exynos_crtc->dpms in enable() and disable()

2015-06-03 Thread Inki Dae
Hi,

On 2015년 06월 02일 00:04, Gustavo Padovan wrote:
> From: Gustavo Padovan 
> 
> To follow more closely the new atomic API we split the dpms()
> helper into the enable() and disable() helper to get exactly the
> same semantics.
> 
> Signed-off-by: Gustavo Padovan 
> ---
>  drivers/gpu/drm/exynos/exynos7_drm_decon.c | 87 
> ++
>  drivers/gpu/drm/exynos/exynos_drm_crtc.c   |  8 +--
>  drivers/gpu/drm/exynos/exynos_drm_drv.h|  6 ++-
>  drivers/gpu/drm/exynos/exynos_drm_fimd.c   | 69 +---
>  drivers/gpu/drm/exynos/exynos_drm_vidi.c   | 53 +++---
>  drivers/gpu/drm/exynos/exynos_mixer.c  | 26 +++--
>  6 files changed, 62 insertions(+), 187 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c 
> b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
> index f29e4be..d659ba2 100644
> --- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c
> +++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
> @@ -603,75 +603,39 @@ static void decon_init(struct decon_context *ctx)
>   writel(VIDCON1_VCLK_HOLD, ctx->regs + VIDCON1(0));
>  }
>  
> -static int decon_poweron(struct decon_context *ctx)
> +static void decon_enable(struct exynos_drm_crtc *crtc)
>  {
> - int ret;
> + struct decon_context *ctx = crtc->ctx;
>  
>   if (!ctx->suspended)
> - return 0;
> + return;
>  
>   ctx->suspended = false;
>  
>   pm_runtime_get_sync(ctx->dev);
>  
> - ret = clk_prepare_enable(ctx->pclk);
> - if (ret < 0) {
> - DRM_ERROR("Failed to prepare_enable the pclk [%d]\n", ret);
> - goto pclk_err;
> - }
> -
> - ret = clk_prepare_enable(ctx->aclk);
> - if (ret < 0) {
> - DRM_ERROR("Failed to prepare_enable the aclk [%d]\n", ret);
> - goto aclk_err;
> - }
> -
> - ret = clk_prepare_enable(ctx->eclk);
> - if  (ret < 0) {
> - DRM_ERROR("Failed to prepare_enable the eclk [%d]\n", ret);
> - goto eclk_err;
> - }
> -
> - ret = clk_prepare_enable(ctx->vclk);
> - if  (ret < 0) {
> - DRM_ERROR("Failed to prepare_enable the vclk [%d]\n", ret);
> - goto vclk_err;
> - }
> + clk_prepare_enable(ctx->pclk);
> + clk_prepare_enable(ctx->aclk);
> + clk_prepare_enable(ctx->eclk);
> + clk_prepare_enable(ctx->vclk);

Merged this patch series to exynos-drm-next. However, this patch
especially above codes is required for more clean-up. Even though
decon_enable function never return error number, I think its internal
codes should be considered for some exception cases to check where an
error occurred at. So could you post the clean-up patch?

Thanks,
Inki Dae

>  
>   decon_init(ctx);
>  
>   /* if vblank was enabled status, enable it again. */
> - if (test_and_clear_bit(0, &ctx->irq_flags)) {
> - ret = decon_enable_vblank(ctx->crtc);
> - if (ret) {
> - DRM_ERROR("Failed to re-enable vblank [%d]\n", ret);
> - goto err;
> - }
> - }
> + if (test_and_clear_bit(0, &ctx->irq_flags))
> + decon_enable_vblank(ctx->crtc);
>  
>   decon_window_resume(ctx);
>  
>   decon_apply(ctx);
> -
> - return 0;
> -
> -err:
> - clk_disable_unprepare(ctx->vclk);
> -vclk_err:
> - clk_disable_unprepare(ctx->eclk);
> -eclk_err:
> - clk_disable_unprepare(ctx->aclk);
> -aclk_err:
> - clk_disable_unprepare(ctx->pclk);
> -pclk_err:
> - ctx->suspended = true;
> - return ret;
>  }
>  
> -static int decon_poweroff(struct decon_context *ctx)
> +static void decon_disable(struct exynos_drm_crtc *crtc)
>  {
> + struct decon_context *ctx = crtc->ctx;
> +
>   if (ctx->suspended)
> - return 0;
> + return;
>  
>   /*
>* We need to make sure that all windows are disabled before we
> @@ -688,30 +652,11 @@ static int decon_poweroff(struct decon_context *ctx)
>   pm_runtime_put_sync(ctx->dev);
>  
>   ctx->suspended = true;
> - return 0;
> -}
> -
> -static void decon_dpms(struct exynos_drm_crtc *crtc, int mode)
> -{
> - DRM_DEBUG_KMS("%s, %d\n", __FILE__, mode);
> -
> - switch (mode) {
> - case DRM_MODE_DPMS_ON:
> - decon_poweron(crtc->ctx);
> - break;
> - case DRM_MODE_DPMS_STANDBY:
> - case DRM_MODE_DPMS_SUSPEND:
> - case DRM_MODE_DPMS_OFF:
> - decon_poweroff(crtc->ctx);
> - break;
> - default:
> - DRM_DEBUG_KMS("unspecified mode %d\n", mode);
> - break;
> - }
>  }
>  
>  static const struct exynos_drm_crtc_ops decon_crtc_ops = {
> - .dpms = decon_dpms,
> + .enable = decon_enable,
> + .disable = decon_disable,
>   .mode_fixup = decon_mode_fixup,
>   .commit = decon_commit,
>   .enable_vblank = decon_enable_vblank,
> @@ -796,7 +741,7 @@ static void decon_unbind(struct device *dev, struct 
> device *master,
>  

Re: [PATCH v10 17/17] drm/exynos: split exynos_crtc->dpms in enable() and disable()

2015-06-03 Thread Gustavo Padovan
Hi Inki,

2015-06-03 Inki Dae :

> Hi,
> 
> On 2015년 06월 02일 00:04, Gustavo Padovan wrote:
> > From: Gustavo Padovan 
> > 
> > To follow more closely the new atomic API we split the dpms()
> > helper into the enable() and disable() helper to get exactly the
> > same semantics.
> > 
> > Signed-off-by: Gustavo Padovan 
> > ---
> >  drivers/gpu/drm/exynos/exynos7_drm_decon.c | 87 
> > ++
> >  drivers/gpu/drm/exynos/exynos_drm_crtc.c   |  8 +--
> >  drivers/gpu/drm/exynos/exynos_drm_drv.h|  6 ++-
> >  drivers/gpu/drm/exynos/exynos_drm_fimd.c   | 69 +---
> >  drivers/gpu/drm/exynos/exynos_drm_vidi.c   | 53 +++---
> >  drivers/gpu/drm/exynos/exynos_mixer.c  | 26 +++--
> >  6 files changed, 62 insertions(+), 187 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c 
> > b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
> > index f29e4be..d659ba2 100644
> > --- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c
> > +++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
> > @@ -603,75 +603,39 @@ static void decon_init(struct decon_context *ctx)
> > writel(VIDCON1_VCLK_HOLD, ctx->regs + VIDCON1(0));
> >  }
> >  
> > -static int decon_poweron(struct decon_context *ctx)
> > +static void decon_enable(struct exynos_drm_crtc *crtc)
> >  {
> > -   int ret;
> > +   struct decon_context *ctx = crtc->ctx;
> >  
> > if (!ctx->suspended)
> > -   return 0;
> > +   return;
> >  
> > ctx->suspended = false;
> >  
> > pm_runtime_get_sync(ctx->dev);
> >  
> > -   ret = clk_prepare_enable(ctx->pclk);
> > -   if (ret < 0) {
> > -   DRM_ERROR("Failed to prepare_enable the pclk [%d]\n", ret);
> > -   goto pclk_err;
> > -   }
> > -
> > -   ret = clk_prepare_enable(ctx->aclk);
> > -   if (ret < 0) {
> > -   DRM_ERROR("Failed to prepare_enable the aclk [%d]\n", ret);
> > -   goto aclk_err;
> > -   }
> > -
> > -   ret = clk_prepare_enable(ctx->eclk);
> > -   if  (ret < 0) {
> > -   DRM_ERROR("Failed to prepare_enable the eclk [%d]\n", ret);
> > -   goto eclk_err;
> > -   }
> > -
> > -   ret = clk_prepare_enable(ctx->vclk);
> > -   if  (ret < 0) {
> > -   DRM_ERROR("Failed to prepare_enable the vclk [%d]\n", ret);
> > -   goto vclk_err;
> > -   }
> > +   clk_prepare_enable(ctx->pclk);
> > +   clk_prepare_enable(ctx->aclk);
> > +   clk_prepare_enable(ctx->eclk);
> > +   clk_prepare_enable(ctx->vclk);
> 
> Merged this patch series to exynos-drm-next. However, this patch
> especially above codes is required for more clean-up. Even though
> decon_enable function never return error number, I think its internal
> codes should be considered for some exception cases to check where an
> error occurred at. So could you post the clean-up patch?

Thanks for merging the patches! I will send follow-up patches shortly to
add checks and errors messages back.

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