Bug 201991

Summary: amdgpu: clock management is disabled for the 4K resolution with polaris 10
Product: Drivers Reporter: fin4478
Component: Video(DRI - non Intel)Assignee: drivers_video-dri
Status: RESOLVED CODE_FIX    
Severity: enhancement CC: alexdeucher, dofficialgman, nancy154
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 4.18.0,4.20.0-rc6, drm-next-4.21-wip Subsystem:
Regression: No Bisected commit-id:
Attachments: simple app for the amdgpu sys interface

Description fin4478 2018-12-14 14:06:53 UTC
Created attachment 280019 [details]
simple app for the amdgpu sys interface

When the Xfce desktop is visible at 4K and idling, the engine clock is fixed at level 6: 1220MHz and you can not change that. The temperature is 38 C. When the monitor is sleeping, then the engine clock is 300Mhz. The automatic power management works with 2560x1600 and lower resolutions as espected. I tested with my python app and I have latest drivers, including firmware files. My monitor is ASUS VP28UQG and I use the display port.

System:
  Host: ryzenpc Kernel: 4.20.0-rc6 x86_64 bits: 64 Desktop: Xfce 4.12.4 
  Distro: Debian GNU/Linux buster/sid 
Machine:
  Type: Desktop Mobo: ASUSTeK model: PRIME B350M-K v: Rev X.0x 
  serial: <root required> UEFI [Legacy]: American Megatrends v: 4023 
  date: 08/20/2018 
CPU:
  6-Core: AMD Ryzen 5 1600 type: MT MCP speed: 2851 MHz 
Graphics:
  Device-1: AMD Ellesmere [Radeon RX 470/480] driver: amdgpu v: kernel 
  Display: x11 server: X.Org 1.20.3 driver: amdgpu,ati 
  unloaded: fbdev,modesetting,vesa resolution: 3840x2160~60Hz 
  OpenGL: 
  renderer: Radeon RX 570 Series (POLARIS10 DRM 3.27.0 4.20.0-rc6 LLVM 7.0.1) 
  v: 4.5 Mesa 19.0.0-devel (git-9ebc00f 2018-12-13 bionic-oibaf-ppa)
Comment 1 nancy 2018-12-14 18:16:14 UTC
(In reply to fin4478 from comment #0)

> simple app for the amdgpu sys interface



You might consider if you are trying out radeon-profile.

https://github.com/marazmista/radeon-profile
Comment 2 fin4478 2018-12-14 19:03:58 UTC
(In reply to nancy from comment #1)
> (In reply to fin4478 from comment #0)
> 
> > simple app for the amdgpu sys interface
> 
> 
> 
> You might consider if you are trying out radeon-profile.
> 
> https://github.com/marazmista/radeon-profile

That uses the same sysfs api and uses old qt or special  modules (like qtchartview) that are not compatible with latest qt packages. In other words that app is broken on several distributions. When programming simple GUIs, use python gtk that does not break so easily.
Comment 3 fin4478 2018-12-15 12:30:03 UTC
Adding amdgpu.ppfeaturemask=0xffffffff to the kernel command line makes the powerplay feature to work normally at 4K.
uname -r
4.20.0-rc3+
Comment 4 dofficialgman 2022-04-29 03:15:59 UTC
the above kernel command line is still necessary in 2022 with mesa 22.
Why has this not been fixed in source to not need the clock/voltage adjustment parameter for automatic clocks when using 4K monitor output?
Comment 5 Alex Deucher 2022-04-29 13:08:26 UTC
The driver set minimum required clocks to meet the required bandwidth and voltage  for the attached displays.  When you enable overclocking (via the bit in ppfeaturemask), that gets partially disabled to allow the user to manually adjust the clocks at their own risk.