Bug 110247 - [icl] Cannot fix GPU frequency
Summary: [icl] Cannot fix GPU frequency
Status: RESOLVED WORKSFORME
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: Triaged
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-26 11:47 UTC by Dmitry Ermilov
Modified: 2019-03-29 07:58 UTC (History)
5 users (show)

See Also:
i915 platform: ICL
i915 features:


Attachments

Description Dmitry Ermilov 2019-03-26 11:47:11 UTC
Environment:
* ICL GT2 B4 , graphics id 0x8a52
* 5.1.0-rc2-drm-tip : 79df6ae8e7d6fc94965a14e1fa04898954d40316
* https://github.com/intel/media-driver/ : 8773ef5
* https://github.com/intel/gmmlib : e65dff3 (includes GMM MOCS table fix)
* https://github.com/Intel-Media-SDK/MediaSDK : 2c780ea

We're using the following script to fix CPU/GPU frequency on ICL:
#!/bin/bash
set -ex
cpupower frequency-set --governor performance
cpupower frequency-set --min 1000000
cpupower frequency-set --max 1000000
echo 400 > /sys/class/drm/card0/gt_min_freq_mhz
echo 400 > /sys/class/drm/card0/gt_max_freq_mhz
echo 400 > /sys/class/drm/card0/gt_boost_freq_mhz 

However media workloads produce very different performance from run to run.

perf stat -a -e i915/bcs0-busy/,i915/rcs0-busy/,i915/vcs0-busy/,i915/vecs0-busy/,i915/actual-frequency/,i915/requested-frequency/ ./sample_encode h264 -i input.yuv -qpi 26 -qpp 26 -qpb 26   -async 1 -hw  -w 720 -h 480 -n 300 -r 1 -vaapi -g 100
File output is disabled as -o option isn't specified
libva info: VA-API version 1.5.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_4
libva info: va_openDriver() returns 0
Encoding Sample Version 8.3.26.

Input file format   YUV420
Output video        AVC 
Source picture:
    Resolution  720x480
    Crop X,Y,W,H    0,0,720,480
Destination picture:
    Resolution  720x480
    Crop X,Y,W,H    0,0,720,480
Frame rate  30.00
Bit rate(Kbps)  2503
Gop size    100
Ref dist    1
Ref number  0
Idr Interval    0
Target usage    balanced
Memory type vaapi
Media SDK impl      hw
Media SDK version   1.29

Processing started

Processing finished

 Performance counter stats for 'system wide':

                 0 ns   i915/bcs0-busy/                                             
     4,078,817,486 ns   i915/rcs0-busy/                                             
       748,226,339 ns   i915/vcs0-busy/                                             
                 0 ns   i915/vecs0-busy/                                            
               791 MHz  i915/actual-frequency/                                      
             3,137 MHz  i915/requested-frequency/                                   

       7.912914519 seconds time elapsed

It looks like frequency is not actually fixed while the same approach works fine on SKL.
Comment 1 Francesco Balestrieri 2019-03-26 14:26:34 UTC
Most likely has the same root cause as Bug 108059
Comment 2 Francesco Balestrieri 2019-03-29 07:58:36 UTC
This was a problem with the HW, was proven to work in other machines.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.