Skip to contentSkip to conversation

drm/amd/pp: Add new asic(vega12) support in pp_psm.c

PATCH In review Rex Zhu 2 participants 2 messages Mar 21, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH 1/1 drm/amd/pp: Add new asic(vega12) support in pp_psm.c

In new asics, no power state management in driver, no need to implement related callback functions. add some ps checks in pp_psm.c

Revert "drm/amd/powerplay: add new pp_psm infrastructure for vega12 (v2)" This reverts commit 7d1a63f3aa331b853e41f92d0e7890ed31de8c13.

Change-Id Ic31d3f475f94399d3136bff8be454f290e3c1e50
---
 drivers/gpu/drm/amd/powerplay/hwmgr/Makefile       |   4 +-
 drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c       | 270 ++++++++++++++++++---
 .../gpu/drm/amd/powerplay/hwmgr/pp_psm_legacy.c    | 262 --------------------
 .../gpu/drm/amd/powerplay/hwmgr/pp_psm_legacy.h    |  40 ---
 drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_new.c   |  76 ------
 drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_new.h   |  40 ---
 6 files changed, 239 insertions(+), 453 deletions(-)
 delete mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_legacy.c
 delete mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_legacy.h
 delete mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_new.c
 delete mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_new.h
drivers/gpu/drm/amd/powerplay/hwmgr/Makefile +2 -2
index 9446dbc475..faf9c88 100644
@@ -31,9 +31,9 @@ HARDWARE_MGR = hwmgr.o processpptables.o \
 		smu7_clockpowergating.o \
 		vega10_processpptables.o vega10_hwmgr.o vega10_powertune.o \
 		vega10_thermal.o smu10_hwmgr.o pp_psm.o\
-		pp_overdriver.o smu_helper.o pp_psm_legacy.o pp_psm_new.o \
 		vega12_processpptables.o vega12_hwmgr.o \
-		vega12_powertune.o vega12_thermal.o
+		vega12_powertune.o vega12_thermal.o \
+		pp_overdriver.o smu_helper.o
 
 AMD_PP_HWMGR = $(addprefix $(AMD_PP_PATH)/hwmgr/,$(HARDWARE_MGR))
 
drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c +237 -33

302 lines not on this page · raw message

drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_legacy.c deleted +0 -262

262 lines not on this page · raw message

drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_legacy.h deleted +0 -40
deleted file mode 100644
index bc99411..0000000
@@ -1,40 +0,0 @@
-/*
- * Copyright 2017 Advanced Micro Devices, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-#ifndef PP_PSM_LEGACY_H
-#define PP_PSM_LEGACY_H
-
-#include "hwmgr.h"
-
-int psm_legacy_init_power_state_table(struct pp_hwmgr *hwmgr);
-int psm_legacy_fini_power_state_table(struct pp_hwmgr *hwmgr);
-int psm_legacy_set_boot_states(struct pp_hwmgr *hwmgr);
-int psm_legacy_set_performance_states(struct pp_hwmgr *hwmgr);
-int psm_legacy_set_user_performance_state(struct pp_hwmgr *hwmgr,
-					enum PP_StateUILabel label_id,
-					struct pp_power_state **state);
-int psm_legacy_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr,
-				bool skip,
-				struct pp_power_state *new_ps);
-
-#endif
drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_new.c deleted +0 -76

76 lines not on this page · raw message

drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_new.h deleted +0 -40
deleted file mode 100644
index 5c4fabc..0000000
@@ -1,40 +0,0 @@
-/*
- * Copyright 2017 Advanced Micro Devices, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-#ifndef PP_PSM_NEW_H
-#define PP_PSM_NEW_H
-
-#include "hwmgr.h"
-
-int psm_new_init_power_state_table(struct pp_hwmgr *hwmgr);
-int psm_new_fini_power_state_table(struct pp_hwmgr *hwmgr);
-int psm_new_set_boot_states(struct pp_hwmgr *hwmgr);
-int psm_new_set_performance_states(struct pp_hwmgr *hwmgr);
-int psm_new_set_user_performance_state(struct pp_hwmgr *hwmgr,
-					enum PP_StateUILabel label_id,
-					struct pp_power_state **state);
-int psm_new_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr,
-				bool skip,
-				struct pp_power_state *new_ps);
-
-#endif
Signature · 6 lines
1.9.1

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

A message that is not in the archive (sent off-list or not yet received): 1521632074-17444-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

#2 lore raw

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Rex Zhu <[email protected]>
Sent: Wednesday, March 21, 2018 7:34:34 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH] drm/amd/pp: Add new asic(vega12) support in pp_psm.c

In new asics, no power state management in driver, no need to implement related callback functions. add some ps checks in pp_psm.c

Revert "drm/amd/powerplay: add new pp_psm infrastructure for vega12 (v2)" This reverts commit 7d1a63f3aa331b853e41f92d0e7890ed31de8c13.

Change-Id Ic31d3f475f94399d3136bff8be454f290e3c1e50
---
 drivers/gpu/drm/amd/powerplay/hwmgr/Makefile       |   4 +-
 drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c       | 270 ++++++++++++++++++---
 .../gpu/drm/amd/powerplay/hwmgr/pp_psm_legacy.c    | 262 --------------------
 .../gpu/drm/amd/powerplay/hwmgr/pp_psm_legacy.h    |  40 ---
 drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_new.c   |  76 ------
 drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_new.h   |  40 ---
 6 files changed, 239 insertions(+), 453 deletions(-)
 delete mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_legacy.c
 delete mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_legacy.h
 delete mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_new.c
 delete mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_new.h
drivers/gpu/drm/amd/powerplay/hwmgr/Makefile +2 -2
index 9446dbc475..faf9c88 100644
@@ -31,9 +31,9 @@ HARDWARE_MGR = hwmgr.o processpptables.o \
                 smu7_clockpowergating.o \
                 vega10_processpptables.o vega10_hwmgr.o vega10_powertune.o \
                 vega10_thermal.o smu10_hwmgr.o pp_psm.o\
-               pp_overdriver.o smu_helper.o pp_psm_legacy.o pp_psm_new.o \
                 vega12_processpptables.o vega12_hwmgr.o \
-               vega12_powertune.o vega12_thermal.o
+               vega12_powertune.o vega12_thermal.o \
+               pp_overdriver.o smu_helper.o
 
 AMD_PP_HWMGR = $(addprefix $(AMD_PP_PATH)/hwmgr/,$(HARDWARE_MGR))
 
drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c +237 -33

302 lines not on this page · raw message

drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_legacy.c deleted +0 -262

262 lines not on this page · raw message

drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_legacy.h deleted +0 -40
deleted file mode 100644
index bc99411..0000000
@@ -1,40 +0,0 @@
-/*
- * Copyright 2017 Advanced Micro Devices, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-#ifndef PP_PSM_LEGACY_H
-#define PP_PSM_LEGACY_H
-
-#include "hwmgr.h"
-
-int psm_legacy_init_power_state_table(struct pp_hwmgr *hwmgr);
-int psm_legacy_fini_power_state_table(struct pp_hwmgr *hwmgr);
-int psm_legacy_set_boot_states(struct pp_hwmgr *hwmgr);
-int psm_legacy_set_performance_states(struct pp_hwmgr *hwmgr);
-int psm_legacy_set_user_performance_state(struct pp_hwmgr *hwmgr,
-                                       enum PP_StateUILabel label_id,
-                                       struct pp_power_state **state);
-int psm_legacy_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr,
-                               bool skip,
-                               struct pp_power_state *new_ps);
-
-#endif
drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_new.c deleted +0 -76

76 lines not on this page · raw message

drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_new.h deleted +0 -40
deleted file mode 100644
index 5c4fabc..0000000
@@ -1,40 +0,0 @@
-/*
- * Copyright 2017 Advanced Micro Devices, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-#ifndef PP_PSM_NEW_H
-#define PP_PSM_NEW_H
-
-#include "hwmgr.h"
-
-int psm_new_init_power_state_table(struct pp_hwmgr *hwmgr);
-int psm_new_fini_power_state_table(struct pp_hwmgr *hwmgr);
-int psm_new_set_boot_states(struct pp_hwmgr *hwmgr);
-int psm_new_set_performance_states(struct pp_hwmgr *hwmgr);
-int psm_new_set_user_performance_state(struct pp_hwmgr *hwmgr,
-                                       enum PP_StateUILabel label_id,
-                                       struct pp_power_state **state);
-int psm_new_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr,
-                               bool skip,
-                               struct pp_power_state *new_ps);
-
-#endif

--
1.9.1

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

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