On Thu, Apr 19, 2018 at 1:58 PM, Felix Kuehling <felix.kuehling at amd.com> wrote: > On 2018-04-19 09:51 AM, Alex Deucher wrote: >> On Wed, Apr 18, 2018 at 8:22 PM, Huang Rui <ray.huang at amd.com> wrote: >>> GFXOFF is the new GPU feature that save power consumption. It used RLC to >>> poweroff the gfx engine dynamicly when there is no workload on gfx pipe and make >>> gfx into "idle" state. >>> 1. Add three additional RLC ucodes, and use psp to load them. >>> 2. Revise RLC save restore list. >>> 3. Enable CGPG (GFX power gating). >>> 4. Enable gfxoff. >>> 5. Revise suspend/resume sequence. >>> >>> Currently, only raven is able to support gfxoff at first. And after CQE do >>> series rounds of testing, and there is no regression that bring by gfxoff >>> feature till now. >>> >>> We support two types of gfxoff, and user is able to build them manually from >>> firmware repo: >>> 1. Real CGPG >>> $ make clean >>> $ make REAL_CGPG=1 >>> 2. Faked CGPG: (by default) >>> $ make clean >>> $ make >>> >>> Then configure to enable gfxoff with ppfeaturemask=0xffffbfff. >> A couple of things we need to take care of before enabling this: >> 1. Need to switch it off when selecting stable pstate or profiling >> mode in powerplay >> 2. Need to check if gfx is on before accessing the RLC_GPU_CLOCK_COUNT >> registers. > > I second that. Access to RLC_GPU_CLOCK_COUNT is used for some ROCm > profiling features. Accessing the register while GFX is OFF can lead to > hangs according to HW engineers. Also, GFX OFF resets the counter to 0, > which would confuse any profiling code using it. > > Would it be possible to control the GFX OFF feature as part of power > profiles? For example we could have the feature disabled in the compute > power profile. Yes, we should be able to do that. Alex > > Regards, > Felix > >> >> Alex >> >>> Thanks, >>> Ray >>> >>> Huang Rui (20): >>> drm/amdgpu: update psp gfx if header >>> drm/amdgpu: add new rlc firmware header format v2.1 >>> drm/amdgpu: add save restore list cntl gpm and srm firmware support >>> drm/amdgpu: enter rlc safe mode before set cgpg >>> drm/amdgpu: cleanup init power gating function >>> drm/amdgpu: revise init_rlc_save_restore_list behavior to support >>> latest register_list_format/register_restore table >>> drm/amdgpu: add setting powergating method for gfx9 >>> drm/amd/powerplay: send CGPG smc message if PG is enabled for raven >>> drm/amdgpu: move PP_FEATURE_MASK to amd_shared header >>> drm/amdgpu: add gfxoff feature mask >>> drm/amdgpu: set gfxoff disabled by default >>> drm/amd/powerplay: add gfx off control function >>> drm/amd/powerplay: enable/disable gfxoff through smu >>> drm/amdgpu: use pp_feature member to store the mask >>> drm/amdgpu: clear gfxoff featue mask if the asic is not raven >>> drm/amd/powerplay: add control gfxoff enabling in late init >>> drm/amdgpu: it should disable gfxoff when system is going to suspend >>> drm/amdgpu: fix to disable powergating in hw_fini >>> drm/amdgpu: set CGPG if gfxoff is enabled for raven >>> drm/amd/powerplay: use the flag to decide whether send gfxoff smc >>> message >>> >>> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 16 ++ >>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 + >>> drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 2 - >>> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- >>> drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 36 ++++ >>> drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 51 ++++- >>> drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 22 ++ >>> drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 2 +- >>> drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 233 +++++++++++++++------- >>> drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 2 +- >>> drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h | 67 +++++-- >>> drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 9 + >>> drivers/gpu/drm/amd/amdgpu/soc15.c | 5 + >>> drivers/gpu/drm/amd/include/amd_shared.h | 19 ++ >>> drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 20 +- >>> drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 6 +- >>> drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 50 ++++- >>> drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 19 +- >>> drivers/gpu/drm/amd/powerplay/inc/rv_ppsmc.h | 1 + >>> include/uapi/drm/amdgpu_drm.h | 6 + >>> 20 files changed, 447 insertions(+), 129 deletions(-) >>> >>> -- >>> 2.7.4 >>> >>> _______________________________________________ >>> amd-gfx mailing list >>> amd-gfx at lists.freedesktop.org >>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx >> _______________________________________________ >> amd-gfx mailing list >> amd-gfx at lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/amd-gfx > > _______________________________________________ > amd-gfx mailing list > amd-gfx at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx