Skip to contentSkip to conversation

drm: Switch to use DEVFREQ_GOV_SIMPLE_ONDEMAND constant

PATCH RESEND Applied Yue Hu 5 participants 5 messages Jul 25, 2019 – Jul 26, 2019 1 message not in the archive

Subsystems (6)
lore
Share & tools
lore

Yue Hu

author
#0 lore raw

PATCH RESEND 1/1 drm: Switch to use DEVFREQ_GOV_SIMPLE_ONDEMAND constant

From: Yue Hu <[email protected]>

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

---
 drivers/gpu/drm/msm/msm_gpu.c               | 3 ++-
 drivers/gpu/drm/panfrost/panfrost_devfreq.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/msm/msm_gpu.c +2 -1
index 4edb874..f7308d6 100644
@@ -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");
drivers/gpu/drm/panfrost/panfrost_devfreq.c +2 -1
index db79853..a7c18bc 100644
@@ -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);
Signature · 6 lines
1.9.1

_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno
Reviewed-by on v1 1/1
#1 lore raw
Quoted 31 lines · Yue Hu

From: Yue Hu <[email protected]>

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

---
 drivers/gpu/drm/msm/msm_gpu.c               | 3 ++-
 drivers/gpu/drm/panfrost/panfrost_devfreq.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/msm/msm_gpu.c +2 -1
index 4edb874..f7308d6 100644
@@ -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");
drivers/gpu/drm/panfrost/panfrost_devfreq.c +0 -0
index db79853..a7c18bc 100644

drivers/gpu/drm/panfrost/panfrost_devfreq.c int panfrost_devfreq_init(struct panfrost_device *pfdev) · line 164

Quoted 9 lines
drivers/gpu/drm/panfrost/panfrost_devfreq.c +2 -1
@@ -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.

Signature · 3 lines
Best Regards,
Chanwoo Choi
Samsung Electronics

A message that is not in the archive (sent off-list or not yet received): 20190725035239.1192-1-zbestahu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

Acked-by
#3 lore raw
Quoted 4 lines · Yue Hu

From: Yue Hu <[email protected]>

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

Quoted 37 lines
---
 drivers/gpu/drm/msm/msm_gpu.c               | 3 ++-
 drivers/gpu/drm/panfrost/panfrost_devfreq.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/msm/msm_gpu.c +2 -1
index 4edb874..f7308d6 100644
@@ -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");
drivers/gpu/drm/panfrost/panfrost_devfreq.c +2 -1
index db79853..a7c18bc 100644
@@ -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);
Signature · 1 line
1.9.1
Signature · 6 lines
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno
Applied
#4 lore raw
In reply to a message not in the archive
Quoted 11 lines · Yue Hu

From: Yue Hu <[email protected]>

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

---
 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
_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno

Acked-by on v1 1/1
#5 lore raw
In reply to Yue Hu
Quoted 6 lines · Yue Hu

From: Yue Hu <[email protected]>

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

Quoted 25 lines
---
  drivers/gpu/drm/msm/msm_gpu.c               | 3 ++-
  drivers/gpu/drm/panfrost/panfrost_devfreq.c | 3 ++-
  2 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/msm/msm_gpu.c +2 -1
index 4edb874..f7308d6 100644
@@ -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");
drivers/gpu/drm/panfrost/panfrost_devfreq.c +0 -0
index db79853..a7c18bc 100644

drivers/gpu/drm/panfrost/panfrost_devfreq.c int panfrost_devfreq_init(struct panfrost_device *pfdev) · line 164

Quoted 9 lines
drivers/gpu/drm/panfrost/panfrost_devfreq.c +2 -1
@@ -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);

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel