All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/exynos: Suspend/resume is unused if !PM
@ 2015-09-24 10:14 Thierry Reding
  2015-09-24 10:14 ` [PATCH 2/3] drm/exynos: fimc: Clock control " Thierry Reding
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Thierry Reding @ 2015-09-24 10:14 UTC (permalink / raw)
  To: Inki Dae; +Cc: Kyungmin Park, linux-samsung-soc, Seung-Woo Kim, dri-devel

From: Thierry Reding <treding@nvidia.com>

Protect the suspend and resume callbacks with an #ifdef CONFIG_PM_SLEEP
guard to avoid "defined but not used" warnings.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index f0a5839bd226..e07a0fe16432 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -304,6 +304,7 @@ int exynos_atomic_commit(struct drm_device *dev, struct drm_atomic_state *state,
 	return 0;
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int exynos_drm_suspend(struct drm_device *dev, pm_message_t state)
 {
 	struct drm_connector *connector;
@@ -340,6 +341,7 @@ static int exynos_drm_resume(struct drm_device *dev)
 
 	return 0;
 }
+#endif
 
 static int exynos_drm_open(struct drm_device *dev, struct drm_file *file)
 {
-- 
2.5.0

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

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

* [PATCH 2/3] drm/exynos: fimc: Clock control is unused if !PM
  2015-09-24 10:14 [PATCH 1/3] drm/exynos: Suspend/resume is unused if !PM Thierry Reding
@ 2015-09-24 10:14 ` Thierry Reding
  2015-09-25  8:41   ` Andrzej Hajda
  2015-09-24 10:14 ` [PATCH 3/3] drm/exynos: rotator: " Thierry Reding
  2015-09-25  8:47 ` [PATCH 1/3] drm/exynos: Suspend/resume " Andrzej Hajda
  2 siblings, 1 reply; 6+ messages in thread
From: Thierry Reding @ 2015-09-24 10:14 UTC (permalink / raw)
  To: Inki Dae
  Cc: Joonyoung Shim, Seung-Woo Kim, Kyungmin Park, dri-devel,
	linux-samsung-soc

From: Thierry Reding <treding@nvidia.com>

Protect the fimc_clk_ctrl() function with an #ifdef CONFIG_PM guard to
avoid "defined but not used" warnings.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/gpu/drm/exynos/exynos_drm_fimc.c | 36 ++++++++++++++++----------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
index 2a652359af64..dd3a5e6d58c8 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
@@ -1206,23 +1206,6 @@ static struct exynos_drm_ipp_ops fimc_dst_ops = {
 	.set_addr = fimc_dst_set_addr,
 };
 
-static int fimc_clk_ctrl(struct fimc_context *ctx, bool enable)
-{
-	DRM_DEBUG_KMS("enable[%d]\n", enable);
-
-	if (enable) {
-		clk_prepare_enable(ctx->clocks[FIMC_CLK_GATE]);
-		clk_prepare_enable(ctx->clocks[FIMC_CLK_WB_A]);
-		ctx->suspended = false;
-	} else {
-		clk_disable_unprepare(ctx->clocks[FIMC_CLK_GATE]);
-		clk_disable_unprepare(ctx->clocks[FIMC_CLK_WB_A]);
-		ctx->suspended = true;
-	}
-
-	return 0;
-}
-
 static irqreturn_t fimc_irq_handler(int irq, void *dev_id)
 {
 	struct fimc_context *ctx = dev_id;
@@ -1780,6 +1763,24 @@ static int fimc_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_PM
+static int fimc_clk_ctrl(struct fimc_context *ctx, bool enable)
+{
+	DRM_DEBUG_KMS("enable[%d]\n", enable);
+
+	if (enable) {
+		clk_prepare_enable(ctx->clocks[FIMC_CLK_GATE]);
+		clk_prepare_enable(ctx->clocks[FIMC_CLK_WB_A]);
+		ctx->suspended = false;
+	} else {
+		clk_disable_unprepare(ctx->clocks[FIMC_CLK_GATE]);
+		clk_disable_unprepare(ctx->clocks[FIMC_CLK_WB_A]);
+		ctx->suspended = true;
+	}
+
+	return 0;
+}
+
 #ifdef CONFIG_PM_SLEEP
 static int fimc_suspend(struct device *dev)
 {
@@ -1806,7 +1807,6 @@ static int fimc_resume(struct device *dev)
 }
 #endif
 
-#ifdef CONFIG_PM
 static int fimc_runtime_suspend(struct device *dev)
 {
 	struct fimc_context *ctx = get_fimc_context(dev);
-- 
2.5.0

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

* [PATCH 3/3] drm/exynos: rotator: Clock control is unused if !PM
  2015-09-24 10:14 [PATCH 1/3] drm/exynos: Suspend/resume is unused if !PM Thierry Reding
  2015-09-24 10:14 ` [PATCH 2/3] drm/exynos: fimc: Clock control " Thierry Reding
@ 2015-09-24 10:14 ` Thierry Reding
  2015-09-25  8:41   ` Andrzej Hajda
  2015-09-25  8:47 ` [PATCH 1/3] drm/exynos: Suspend/resume " Andrzej Hajda
  2 siblings, 1 reply; 6+ messages in thread
From: Thierry Reding @ 2015-09-24 10:14 UTC (permalink / raw)
  To: Inki Dae
  Cc: Joonyoung Shim, Seung-Woo Kim, Kyungmin Park, dri-devel,
	linux-samsung-soc

From: Thierry Reding <treding@nvidia.com>

Protect the rotator_clk_crtl() function with an #ifdef CONFIG_PM guard
to avoid "defined but not used" warnings.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/gpu/drm/exynos/exynos_drm_rotator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
index 425e70625388..2f5c118f4c8e 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
@@ -786,6 +786,7 @@ static int rotator_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_PM
 static int rotator_clk_crtl(struct rot_context *rot, bool enable)
 {
 	if (enable) {
@@ -822,7 +823,6 @@ static int rotator_resume(struct device *dev)
 }
 #endif
 
-#ifdef CONFIG_PM
 static int rotator_runtime_suspend(struct device *dev)
 {
 	struct rot_context *rot = dev_get_drvdata(dev);
-- 
2.5.0

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

* Re: [PATCH 2/3] drm/exynos: fimc: Clock control is unused if !PM
  2015-09-24 10:14 ` [PATCH 2/3] drm/exynos: fimc: Clock control " Thierry Reding
@ 2015-09-25  8:41   ` Andrzej Hajda
  0 siblings, 0 replies; 6+ messages in thread
From: Andrzej Hajda @ 2015-09-25  8:41 UTC (permalink / raw)
  To: Thierry Reding, Inki Dae
  Cc: Kyungmin Park, linux-samsung-soc, Seung-Woo Kim, dri-devel

On 09/24/2015 12:14 PM, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Protect the fimc_clk_ctrl() function with an #ifdef CONFIG_PM guard to
> avoid "defined but not used" warnings.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>

Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>

Regards
Andrzej

> ---
>  drivers/gpu/drm/exynos/exynos_drm_fimc.c | 36 ++++++++++++++++----------------
>  1 file changed, 18 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
> index 2a652359af64..dd3a5e6d58c8 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
> @@ -1206,23 +1206,6 @@ static struct exynos_drm_ipp_ops fimc_dst_ops = {
>  	.set_addr = fimc_dst_set_addr,
>  };
>  
> -static int fimc_clk_ctrl(struct fimc_context *ctx, bool enable)
> -{
> -	DRM_DEBUG_KMS("enable[%d]\n", enable);
> -
> -	if (enable) {
> -		clk_prepare_enable(ctx->clocks[FIMC_CLK_GATE]);
> -		clk_prepare_enable(ctx->clocks[FIMC_CLK_WB_A]);
> -		ctx->suspended = false;
> -	} else {
> -		clk_disable_unprepare(ctx->clocks[FIMC_CLK_GATE]);
> -		clk_disable_unprepare(ctx->clocks[FIMC_CLK_WB_A]);
> -		ctx->suspended = true;
> -	}
> -
> -	return 0;
> -}
> -
>  static irqreturn_t fimc_irq_handler(int irq, void *dev_id)
>  {
>  	struct fimc_context *ctx = dev_id;
> @@ -1780,6 +1763,24 @@ static int fimc_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +#ifdef CONFIG_PM
> +static int fimc_clk_ctrl(struct fimc_context *ctx, bool enable)
> +{
> +	DRM_DEBUG_KMS("enable[%d]\n", enable);
> +
> +	if (enable) {
> +		clk_prepare_enable(ctx->clocks[FIMC_CLK_GATE]);
> +		clk_prepare_enable(ctx->clocks[FIMC_CLK_WB_A]);
> +		ctx->suspended = false;
> +	} else {
> +		clk_disable_unprepare(ctx->clocks[FIMC_CLK_GATE]);
> +		clk_disable_unprepare(ctx->clocks[FIMC_CLK_WB_A]);
> +		ctx->suspended = true;
> +	}
> +
> +	return 0;
> +}
> +
>  #ifdef CONFIG_PM_SLEEP
>  static int fimc_suspend(struct device *dev)
>  {
> @@ -1806,7 +1807,6 @@ static int fimc_resume(struct device *dev)
>  }
>  #endif
>  
> -#ifdef CONFIG_PM
>  static int fimc_runtime_suspend(struct device *dev)
>  {
>  	struct fimc_context *ctx = get_fimc_context(dev);
> 

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

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

* Re: [PATCH 3/3] drm/exynos: rotator: Clock control is unused if !PM
  2015-09-24 10:14 ` [PATCH 3/3] drm/exynos: rotator: " Thierry Reding
@ 2015-09-25  8:41   ` Andrzej Hajda
  0 siblings, 0 replies; 6+ messages in thread
From: Andrzej Hajda @ 2015-09-25  8:41 UTC (permalink / raw)
  To: Thierry Reding, Inki Dae
  Cc: Joonyoung Shim, Seung-Woo Kim, Kyungmin Park, dri-devel,
	linux-samsung-soc

On 09/24/2015 12:14 PM, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Protect the rotator_clk_crtl() function with an #ifdef CONFIG_PM guard
> to avoid "defined but not used" warnings.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>

Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>


> ---
>  drivers/gpu/drm/exynos/exynos_drm_rotator.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
> index 425e70625388..2f5c118f4c8e 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
> @@ -786,6 +786,7 @@ static int rotator_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +#ifdef CONFIG_PM
>  static int rotator_clk_crtl(struct rot_context *rot, bool enable)
>  {
>  	if (enable) {
> @@ -822,7 +823,6 @@ static int rotator_resume(struct device *dev)
>  }
>  #endif
>  
> -#ifdef CONFIG_PM
>  static int rotator_runtime_suspend(struct device *dev)
>  {
>  	struct rot_context *rot = dev_get_drvdata(dev);
> 

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

* Re: [PATCH 1/3] drm/exynos: Suspend/resume is unused if !PM
  2015-09-24 10:14 [PATCH 1/3] drm/exynos: Suspend/resume is unused if !PM Thierry Reding
  2015-09-24 10:14 ` [PATCH 2/3] drm/exynos: fimc: Clock control " Thierry Reding
  2015-09-24 10:14 ` [PATCH 3/3] drm/exynos: rotator: " Thierry Reding
@ 2015-09-25  8:47 ` Andrzej Hajda
  2 siblings, 0 replies; 6+ messages in thread
From: Andrzej Hajda @ 2015-09-25  8:47 UTC (permalink / raw)
  To: Thierry Reding, Inki Dae
  Cc: Kyungmin Park, linux-samsung-soc, Seung-Woo Kim, dri-devel

On 09/24/2015 12:14 PM, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Protect the suspend and resume callbacks with an #ifdef CONFIG_PM_SLEEP
> guard to avoid "defined but not used" warnings.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>

The best solution would be to merge legacy exynos_drm_(suspend|resume) PM
functions with exynos_drm_sys_(suspend|resume). There is no reason to keep both.
Could you do it, if not I can prepare quick patch.

Regards
Andrzej

> ---
>  drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
> index f0a5839bd226..e07a0fe16432 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
> @@ -304,6 +304,7 @@ int exynos_atomic_commit(struct drm_device *dev, struct drm_atomic_state *state,
>  	return 0;
>  }
>  
> +#ifdef CONFIG_PM_SLEEP
>  static int exynos_drm_suspend(struct drm_device *dev, pm_message_t state)
>  {
>  	struct drm_connector *connector;
> @@ -340,6 +341,7 @@ static int exynos_drm_resume(struct drm_device *dev)
>  
>  	return 0;
>  }
> +#endif
>  
>  static int exynos_drm_open(struct drm_device *dev, struct drm_file *file)
>  {
> 

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

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

end of thread, other threads:[~2015-09-25  8:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-24 10:14 [PATCH 1/3] drm/exynos: Suspend/resume is unused if !PM Thierry Reding
2015-09-24 10:14 ` [PATCH 2/3] drm/exynos: fimc: Clock control " Thierry Reding
2015-09-25  8:41   ` Andrzej Hajda
2015-09-24 10:14 ` [PATCH 3/3] drm/exynos: rotator: " Thierry Reding
2015-09-25  8:41   ` Andrzej Hajda
2015-09-25  8:47 ` [PATCH 1/3] drm/exynos: Suspend/resume " Andrzej Hajda

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.