linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] drm: Switch to use DEVFREQ_GOV_SIMPLE_ONDEMAND constant
@ 2019-07-25  3:52 ` Yue Hu
  2019-07-25  3:59   ` Chanwoo Choi
                     ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Yue Hu @ 2019-07-25  3:52 UTC (permalink / raw)
  To: airlied, daniel, robdclark, sean, robh, tomeu.vizoso
  Cc: linux-arm-msm, dri-devel, freedreno, cw00.choi, myungjoo.ham,
	huyue2, zhangwen

From: Yue Hu <huyue2@yulong.com>

Since governor name is defined by DEVFREQ framework internally, use the
macro definition instead of using the name directly.

Signed-off-by: Yue Hu <huyue2@yulong.com>
---
 drivers/gpu/drm/msm/msm_gpu.c               | 3 ++-
 drivers/gpu/drm/panfrost/panfrost_devfreq.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
index 4edb874..f7308d6 100644
--- a/drivers/gpu/drm/msm/msm_gpu.c
+++ b/drivers/gpu/drm/msm/msm_gpu.c
@@ -95,7 +95,8 @@ static void msm_devfreq_init(struct msm_gpu *gpu)
 	 */
 
 	gpu->devfreq.devfreq = devm_devfreq_add_device(&gpu->pdev->dev,
-			&msm_devfreq_profile, "simple_ondemand", NULL);
+			&msm_devfreq_profile, DEVFREQ_GOV_SIMPLE_ONDEMAND,
+			NULL);
 
 	if (IS_ERR(gpu->devfreq.devfreq)) {
 		DRM_DEV_ERROR(&gpu->pdev->dev, "Couldn't initialize GPU devfreq\n");
diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
index db79853..a7c18bc 100644
--- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
+++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
@@ -157,7 +157,8 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)
 	dev_pm_opp_put(opp);
 
 	pfdev->devfreq.devfreq = devm_devfreq_add_device(&pfdev->pdev->dev,
-			&panfrost_devfreq_profile, "simple_ondemand", NULL);
+			&panfrost_devfreq_profile, DEVFREQ_GOV_SIMPLE_ONDEMAND,
+			NULL);
 	if (IS_ERR(pfdev->devfreq.devfreq)) {
 		DRM_DEV_ERROR(&pfdev->pdev->dev, "Couldn't initialize GPU devfreq\n");
 		ret = PTR_ERR(pfdev->devfreq.devfreq);
-- 
1.9.1


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

* Re: [PATCH RESEND] drm: Switch to use DEVFREQ_GOV_SIMPLE_ONDEMAND constant
  2019-07-25  3:52 ` [PATCH RESEND] drm: Switch to use DEVFREQ_GOV_SIMPLE_ONDEMAND constant Yue Hu
@ 2019-07-25  3:59   ` Chanwoo Choi
  2019-07-25 16:03   ` Jordan Crouse
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Chanwoo Choi @ 2019-07-25  3:59 UTC (permalink / raw)
  To: Yue Hu, airlied, daniel, robdclark, sean, robh, tomeu.vizoso
  Cc: linux-arm-msm, dri-devel, freedreno, myungjoo.ham, huyue2, zhangwen

On 19. 7. 25. 오후 12:52, Yue Hu wrote:
> From: Yue Hu <huyue2@yulong.com>
> 
> Since governor name is defined by DEVFREQ framework internally, use the
> macro definition instead of using the name directly.
> 
> Signed-off-by: Yue Hu <huyue2@yulong.com>
> ---
>  drivers/gpu/drm/msm/msm_gpu.c               | 3 ++-
>  drivers/gpu/drm/panfrost/panfrost_devfreq.c | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
> index 4edb874..f7308d6 100644
> --- a/drivers/gpu/drm/msm/msm_gpu.c
> +++ b/drivers/gpu/drm/msm/msm_gpu.c
> @@ -95,7 +95,8 @@ static void msm_devfreq_init(struct msm_gpu *gpu)
>  	 */
>  
>  	gpu->devfreq.devfreq = devm_devfreq_add_device(&gpu->pdev->dev,
> -			&msm_devfreq_profile, "simple_ondemand", NULL);
> +			&msm_devfreq_profile, DEVFREQ_GOV_SIMPLE_ONDEMAND,
> +			NULL);
>  
>  	if (IS_ERR(gpu->devfreq.devfreq)) {
>  		DRM_DEV_ERROR(&gpu->pdev->dev, "Couldn't initialize GPU devfreq\n");
> diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> index db79853..a7c18bc 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> @@ -157,7 +157,8 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)
>  	dev_pm_opp_put(opp);
>  
>  	pfdev->devfreq.devfreq = devm_devfreq_add_device(&pfdev->pdev->dev,
> -			&panfrost_devfreq_profile, "simple_ondemand", NULL);
> +			&panfrost_devfreq_profile, DEVFREQ_GOV_SIMPLE_ONDEMAND,
> +			NULL);
>  	if (IS_ERR(pfdev->devfreq.devfreq)) {
>  		DRM_DEV_ERROR(&pfdev->pdev->dev, "Couldn't initialize GPU devfreq\n");
>  		ret = PTR_ERR(pfdev->devfreq.devfreq);
> 

The include/linux/devfreq.h defines the governor name.
It looks good to me.

Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

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

* Re: [PATCH RESEND] drm: Switch to use DEVFREQ_GOV_SIMPLE_ONDEMAND constant
  2019-07-25  3:52 ` [PATCH RESEND] drm: Switch to use DEVFREQ_GOV_SIMPLE_ONDEMAND constant Yue Hu
  2019-07-25  3:59   ` Chanwoo Choi
@ 2019-07-25 16:03   ` Jordan Crouse
  2019-07-26  7:36   ` Tomeu Vizoso
  2019-07-26 13:39   ` Rob Herring
  3 siblings, 0 replies; 5+ messages in thread
From: Jordan Crouse @ 2019-07-25 16:03 UTC (permalink / raw)
  To: Yue Hu
  Cc: airlied, daniel, robdclark, sean, robh, tomeu.vizoso,
	linux-arm-msm, dri-devel, freedreno, cw00.choi, myungjoo.ham,
	huyue2, zhangwen

On Thu, Jul 25, 2019 at 11:52:39AM +0800, Yue Hu wrote:
> From: Yue Hu <huyue2@yulong.com>
> 
> Since governor name is defined by DEVFREQ framework internally, use the
> macro definition instead of using the name directly.

Acked-by: Jordan Crouse <jcrouse@codeaurora.org> for the msm part.

> Signed-off-by: Yue Hu <huyue2@yulong.com>
> ---
>  drivers/gpu/drm/msm/msm_gpu.c               | 3 ++-
>  drivers/gpu/drm/panfrost/panfrost_devfreq.c | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
> index 4edb874..f7308d6 100644
> --- a/drivers/gpu/drm/msm/msm_gpu.c
> +++ b/drivers/gpu/drm/msm/msm_gpu.c
> @@ -95,7 +95,8 @@ static void msm_devfreq_init(struct msm_gpu *gpu)
>  	 */
>  
>  	gpu->devfreq.devfreq = devm_devfreq_add_device(&gpu->pdev->dev,
> -			&msm_devfreq_profile, "simple_ondemand", NULL);
> +			&msm_devfreq_profile, DEVFREQ_GOV_SIMPLE_ONDEMAND,
> +			NULL);
>  
>  	if (IS_ERR(gpu->devfreq.devfreq)) {
>  		DRM_DEV_ERROR(&gpu->pdev->dev, "Couldn't initialize GPU devfreq\n");
> diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> index db79853..a7c18bc 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> @@ -157,7 +157,8 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)
>  	dev_pm_opp_put(opp);
>  
>  	pfdev->devfreq.devfreq = devm_devfreq_add_device(&pfdev->pdev->dev,
> -			&panfrost_devfreq_profile, "simple_ondemand", NULL);
> +			&panfrost_devfreq_profile, DEVFREQ_GOV_SIMPLE_ONDEMAND,
> +			NULL);
>  	if (IS_ERR(pfdev->devfreq.devfreq)) {
>  		DRM_DEV_ERROR(&pfdev->pdev->dev, "Couldn't initialize GPU devfreq\n");
>  		ret = PTR_ERR(pfdev->devfreq.devfreq);
> -- 
> 1.9.1
> 

-- 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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

* Re: [PATCH RESEND] drm: Switch to use DEVFREQ_GOV_SIMPLE_ONDEMAND constant
  2019-07-25  3:52 ` [PATCH RESEND] drm: Switch to use DEVFREQ_GOV_SIMPLE_ONDEMAND constant Yue Hu
  2019-07-25  3:59   ` Chanwoo Choi
  2019-07-25 16:03   ` Jordan Crouse
@ 2019-07-26  7:36   ` Tomeu Vizoso
  2019-07-26 13:39   ` Rob Herring
  3 siblings, 0 replies; 5+ messages in thread
From: Tomeu Vizoso @ 2019-07-26  7:36 UTC (permalink / raw)
  To: Yue Hu, airlied, daniel, robdclark, sean, robh
  Cc: linux-arm-msm, dri-devel, freedreno, cw00.choi, myungjoo.ham,
	huyue2, zhangwen

On 7/25/19 5:52 AM, Yue Hu wrote:
> From: Yue Hu <huyue2@yulong.com>
> 
> Since governor name is defined by DEVFREQ framework internally, use the
> macro definition instead of using the name directly.
> 
> Signed-off-by: Yue Hu <huyue2@yulong.com>

Acked-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>

> ---
>   drivers/gpu/drm/msm/msm_gpu.c               | 3 ++-
>   drivers/gpu/drm/panfrost/panfrost_devfreq.c | 3 ++-
>   2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
> index 4edb874..f7308d6 100644
> --- a/drivers/gpu/drm/msm/msm_gpu.c
> +++ b/drivers/gpu/drm/msm/msm_gpu.c
> @@ -95,7 +95,8 @@ static void msm_devfreq_init(struct msm_gpu *gpu)
>   	 */
>   
>   	gpu->devfreq.devfreq = devm_devfreq_add_device(&gpu->pdev->dev,
> -			&msm_devfreq_profile, "simple_ondemand", NULL);
> +			&msm_devfreq_profile, DEVFREQ_GOV_SIMPLE_ONDEMAND,
> +			NULL);
>   
>   	if (IS_ERR(gpu->devfreq.devfreq)) {
>   		DRM_DEV_ERROR(&gpu->pdev->dev, "Couldn't initialize GPU devfreq\n");
> diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> index db79853..a7c18bc 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> @@ -157,7 +157,8 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)
>   	dev_pm_opp_put(opp);
>   
>   	pfdev->devfreq.devfreq = devm_devfreq_add_device(&pfdev->pdev->dev,
> -			&panfrost_devfreq_profile, "simple_ondemand", NULL);
> +			&panfrost_devfreq_profile, DEVFREQ_GOV_SIMPLE_ONDEMAND,
> +			NULL);
>   	if (IS_ERR(pfdev->devfreq.devfreq)) {
>   		DRM_DEV_ERROR(&pfdev->pdev->dev, "Couldn't initialize GPU devfreq\n");
>   		ret = PTR_ERR(pfdev->devfreq.devfreq);
> 

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

* Re: [PATCH RESEND] drm: Switch to use DEVFREQ_GOV_SIMPLE_ONDEMAND constant
  2019-07-25  3:52 ` [PATCH RESEND] drm: Switch to use DEVFREQ_GOV_SIMPLE_ONDEMAND constant Yue Hu
                     ` (2 preceding siblings ...)
  2019-07-26  7:36   ` Tomeu Vizoso
@ 2019-07-26 13:39   ` Rob Herring
  3 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2019-07-26 13:39 UTC (permalink / raw)
  To: Yue Hu
  Cc: David Airlie, Daniel Vetter, Rob Clark, Sean Paul, Tomeu Vizoso,
	linux-arm-msm, dri-devel, freedreno, Chanwoo Choi, MyungJoo Ham,
	huyue2, zhangwen

On Wed, Jul 24, 2019 at 9:53 PM Yue Hu <zbestahu@gmail.com> wrote:
>
> From: Yue Hu <huyue2@yulong.com>
>
> Since governor name is defined by DEVFREQ framework internally, use the
> macro definition instead of using the name directly.
>
> Signed-off-by: Yue Hu <huyue2@yulong.com>
> ---
>  drivers/gpu/drm/msm/msm_gpu.c               | 3 ++-
>  drivers/gpu/drm/panfrost/panfrost_devfreq.c | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)

I've applied this to drm-misc-next.

Rob

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

end of thread, other threads:[~2019-07-26 13:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20190725035308epcas3p3dbb085335947fc1675773baecbad012e@epcas3p3.samsung.com>
2019-07-25  3:52 ` [PATCH RESEND] drm: Switch to use DEVFREQ_GOV_SIMPLE_ONDEMAND constant Yue Hu
2019-07-25  3:59   ` Chanwoo Choi
2019-07-25 16:03   ` Jordan Crouse
2019-07-26  7:36   ` Tomeu Vizoso
2019-07-26 13:39   ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).