On Thu, Apr 19, 2018 at 09:51:29PM +0800, 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 Got it. We don't support enable/disable gfxoff dynamically yet. It needs more stability testing, you know, feature is disabled by default at current. I will try to find good sequence to make dynamically enable/disable workable smoothly next step. > 2. Need to check if gfx is on before accessing the RLC_GPU_CLOCK_COUNT > registers. > Please check next mail with Felix's comments. Thanks, Ray > 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