November 2013

Intel08 Nov 2013 09:47 am

Some Months ago I made a promise here: drm/i915: GPU Power Savings. So it is time to move on with this promise and write a little bit about Panel Self Refresh (PSR) power saving feature that landed on latest Linux kernel (3.12) released this week.

Before explaining the feature itself, how it works, how it contributes to power savings, how to get it working and how to test it, there are important things that you must be aware of:

  1. Not all eDP necessarily support PSR. Actually this is so rare yet nowadays. Almost no eDP panel in the market support PSR. Sad but true. If you are a luck guy with a eDP that supports PSR on your Ultrabook you should see this “Detected EDP PSR Panel. on your dmesg with kernel booted with drm.debug=0xe.
  2. Besides the Panel it also have to be supported by the GPU. In our case it is only supported for Haswell yet. I’m currently working to get it working for Baytrail and Ben already submited support for Broadwell.
  3. Don’t try to enable PSR feature if you use KDE or XDM. Some small writes to scanout cannot be detected by GPU if userspace doesn’t send busy_ioctls at least. So, with this components Haswell doesn’t know something was written to scanout and that screen must be updated. So it doesn’t triger PSR Exit and Remote Frame Buffer update and will won’t see what you typed until you move your mouse. (Mouse cursor updates are tracked by GPU and PSR Exits).

With all this sad restrictions/limitations/known issues said, let’s tell more about PSR.

PSR is an eDP feature specified by VESA’s eDP v1.3. If you need a deep spec about PSR this is the one. I’ll try to explain it in a high level and easy way here.

So, if your eDP panel supports PSR it has a Remote Frame Buffer (RFB) on it. When Hardware/GPU (Source) detects some identical idle frames updates it tells the Panel (Sink) that it can use the minimal energy as possible by letting the static screen on RFB and shutdown any other panel component. This is called PSR Entry state or SRD.

Source is also responsible for detect when a screen update is needed and tell Sink to Exit PSR letting everything on, allowing normal screen updates.

When programming Haswell we just configure idle frames, max sleep time and other things like this, but the hardware itself that does the whole magic of detect identical frames and tell Sink it can switch from PSR Exit state to PSR Entry and vice versa.

Power Savings: the feature alone saves some power, but it saves even more  by allowing Package C States to stay more time in deep states.

How to enable it: Add i915.enable_psr=1 to your Linux Kernel cmdline.

How to check current state: cat /sys/kernel/debug/dri/0/i915/i915_edp_psr_status

How to test it: Intel-gpu-tools testcase under pm_psr. Just run pm_psr.


Intel06 Nov 2013 07:36 am

Kernel 3.12 is already out and will be base of next quarterly release.
So it is time to get intel-gpu-tools released also.

Testsuit infrastructure is in a very good shape and it is so easy to
create any test case nowadays. More about it explained above on
Daniel’s post.


- Some polishing of the test infrastructure, for details see:

- Haswell support for the DPF tool (tools/intel_l3_parity) and other
improvements (Ben).

- Stereo/3D support in testdisplay (Damien).

- Support for gen7 gpu perf counters in tools/intel_perf_counters (Kenneth).

- Improvements to the VBT decoder (Jani).

- New tool to read legacy VGA registers (Ville).

- New helpers in the test library to help deal with debugfs files and the new
display pipe CRC support (Damien).

- Introduction of a proper naming convention for all the testcases, see

- As usual tons of new testcases and improvements and bugfixes to existing ones.

- The testsuite framework itself has gained some regression tests which can be
run at compile-time with “make check”.

- New helpers for the drop_cache kernel interface and use drop_caches(RETIRE) to
really make sure the gpu is idle in testcases (Oscar Mateo).

Ben Widawsky (24):
intel_l3_parity: Fix indentation
intel_l3_parity: Assert all GEN7+ support
intel_l3_parity: Use getopt for the l3 parity tool
intel_l3_parity: Hardware info argument
intel_l3_parity: slice support
intel_l3_parity: Actually support multiple slices
intel_l3_parity: Support error injection
intel_l3_parity: Support a daemonic mode
intel_l3_parity: Make compilation possible without udev require dri2proto for overlay
gem_tiled_blits: Squash memory leak on simulation
gem_tiled_blits: Squash bo leak on simulation
pwrite_pread: use execbuf.batch_len for size
pwrite_pread: Extract batch building
pwrite_pread: Get devid only once
gem_exec_faulting_reloc: use iterator for batchbuffer
gem_linear_blits: Use iterator for blit batch setup
gem_evict_*: Use iterator for blit batch
gem_exec_blt: Use iterator for blit batch setup
gem_pin: Use iterator for blit batch setup
gem_ctx_bad_exec: skip vebox when appropriate
gem_close_race: Fix linker flags
gem_suspend: Skip on simulation
debugfs_pipe_crc: skip on simulation

Chris Wilson (7):
overlay: Some very raw usage information
tests: Simulate missed breadcrumb irqs
intel_error_decode: Fix X/Y fence for gen2/3
tests: Add gem_close_race
gem_close_race: Tidy up call to execbuffer
gem_close_race: Bump the workload
gem_close_race: Also test random closing of active fd

Damien Lespiau (47):
testdisplay: Distribute pass.png
testdisplay: Add left/right images of a lovely scene
lib: Dump information about the supported 3D stereo formats
lib: Add a helper to paint a PNG using cairo
lib: Split create_image_surface() out of create_cairo_ctx()
lib: Add a helper to write a png from a struct kmstest_fb
testdisplay: Move the code sanitizing depth into main()
testdisplay: Map the fb inside paint_color_key()
testdisplay: Properly handle the life cycle of framebuffers
testdisplay: Fix CRTS typo
testdisplay: Untangle dump_info() from the main testing loop
testdisplay: Free the array of connectors
testdisplay: Provide a full path when opening pngs
testdisplay: Test the stereo 3D modes
intel_infoframe: Display the VIC in decimal
testdisplay: Remove the timing adjustements now that the kernel does it
testdisplay: Use DRM_MODE_FLAG_3D_MASK
lib: Adjust dump_modes() to the new stereo encoding
testdisplay: Remove printing out the eyes geometry
testdisplay: Respect specified_disp_id in the stereo loop
testdisplay: Remove mode resetting now that we don’t adjust the timings
testdisplay: Make -o and -3 work together
testdisplay: Print the stereo mode being tested
lib: Add a small helper to open debugfs files
lib: Add igt_debugfs_fopen()
lib: Add a igt_assert_cmpint()
lib: Add kmstest_paint_color()
lib: Add a igt_display.h with a few enums and defines from the kernel
lib: Make igt_debugfs_open() take the mode as argument
lib: Add igt_wait_for_vblank() helper
debugfs_pipe_crc: Let’s check CRCs!
tests/debugfs_pipe_crc: Test the read CRCs are not null
lib: Don’t wait for a vblank when enabling the CRCs
rendercopy: Add a way to dump an .aub file with the rendercopy bos
gitignore: Ignore intel_opregion_decode
lib: Add a function to dump a scratch buf into a png
tests/gem_render_copy: Add a simple render copy test
tests/gem_render_copy: Only dump pngs when the -d option is given
tests/gem_render_copy: Add aub dump support
gem_render_linear_blits: Remove aub dump support
lib: Remove stale comment
lib: Close non intel fds in drm_get_card()
lib: Add a drm_open_any_render() that will try to use render nodes
tests/gem_render_copy: Use render nodes
tests: Convert the ctx test to use render nodes when possible
gitignore: Ignore recently introduced tools and tests
lib: Don’t forget to close the pipe ctl fd in igt_pipe_crc_reset()

Daniel Vetter (72):
tests/*: scrap get_num_fences
tests/gem_fenced_exec_thrash: New subtests that uses all fences
lib/drmtest: check that igt_exit is called for subtest tests
tests/gem_fenced_exec_thrash: Add interruptible and busy-load subtests
tests/gem_persistent_relocs: Tune down the test a bit
tests/gem_storedw_batches_loop: Add testcase to check secure dispatch
tests/gem_reloc_overflow: Extract reloc_tests
tests/gem_reloc_overflow: New subtest for overflowing buffer_count
tests/gem_stored_batches_loop: use igt_assert more
lib/drmtest: igt_assert|require with format strings
lib/drmtest: Improve printf-like igt_skip_on/require
NEWS: Start with release notes for 1.5
tests: use igt_assert/igt_require more
tests/gem_evict_everything: tune down forked subtests
tests/kms_flip: fail harder
tests/kms_flip: scale test runtime
NEWS: testdisplay now with 3d support!
tests/kms_flip: Check the dpms confusion
tests/kms_flip: use igt_assert in the dpms helpers
NEWS: Mention gen7 perf counters release
tests/kms_flip: check flip count in both directions
tests/kms_flip: use igt_assert more
tests/pc8+: Only skip i2c subtest if i2c /dev interface is unavailable
tests/pc8: Fail harder
tests/kms_flip: Skip if no clone configuration could be found
lib/drmtest: extract rawer __gem_set_tiling
tests: add kms_addfb
tests/module_reload: fail if the module didn’t unload
tests/gem_suspend: test debugfs/sysfs reads while s/r
tests/kms_flip: exit handler needs a fixture
tests/kms_flip: Skip if the kernel doesn’t let y-tiled bo slip through
tests/kms_flip: fix igt_assert
tests/pc8: Readd verbose error message
tests/debugfs_pipe_crc: correctly skip on unsupported platforms
tests/ZZ_missed_irq: Fixup SOURCE_PATH handling
lib/drmtest: Check that helper processes have died correctly
tests/debugfs_pipe_crc: fall back to PIPE source
tests/debugfs_pipe_crc: fix fb leak
tests/debugfs_pipe_crc: test all pipes
tests/debugfs_pipe_crc: test all connectors
lib: fix the assert in igt_stop_helper
tests/debugfs_pipe_crc: new subtest to check CRC frame numbers
tets/kms_flip: disable correlation check
tests/kms_flip: no absolute vblank wait on the first frame
tests/kms_flip: Unconfuse the framenumber step checking
kmstest: don’t pollute stderr for impossible output configs
tests/kms_flip: More leeway for dummy load tests
tests/kms_cursor_crc: Use igt_exit
tests: Use igt_exit for tests with subtest
lib/drmtest: Scream harder when igt_exit isn’t called for subtest tests
lib: fix igt_exit assert when only listing subtests.
lib: add more self-tests around the igt_exit checks.
tests: use “auto” pipe CRC source
tests/debugfs_pipe_crc: set mode before creating CRC helper
tests/kms_cursor_crc: rework to auto-skip connectors
lib: consolidate pipe crc exit handler
lib: make igt_set_vt_graphics_mode never fail
lib: make igt_install_exit_handler never fail
lib: add igt_main macro
tests: Add a test template
tests: Add a Makefile comment about the expected failures in igt_ tests
tests: igt_no_subtest
lib: drop return value from igt_drop_caches
Update .gitignore a bit
tests: Start to document naming conventions
tests: estbalish drv_ prefix
tests: establish pm_ prefix
tests: Use kms_ prefix a bit more
tests: establish core_ prefix
NEWS: Roll in updates.
tests/gem_ctx_bad_exec: Check the errno, too
NEWS: drop_caches improvements

Jani Nikula (7):
README: list some of the dependencies
intel_bios_reader: add size temp variable as a shorthand for finfo.st_size
intel_bios_reader: prepare for dumping all sections
intel_bios_reader: dump all edp device info structs
intel_bios_reader: dump all sections, including unknown ones
intel_opregion_decode: new tool for decoding graphics opregion
intel_opregion_decode: decipher bclm table

Jesse Barnes (1):
quick_dump/vlv: add DPIO_CTL to the dump

Kenneth Graunke (1):
intel_perf_counters: Add support for Gen7 platforms.

Matt Turner (2):
configure: Don’t bail if libdrm_nouveau isn’t available.
Depend on libdrm_intel >= 2.4.47.

Mengdong Lin (3):
intel_audio_dump/hsw: remove misuse of PCH transcoder
configuration register
intel_audio_dump/hsw: align code with tab
intel_audio_dump/hsw: rename some audio configuration registers
for Haswell

Oscar Mateo (5):
tests: Fix “-thrashing” and “-thrash-inactive” distinction
lib: Add igt_drop_caches_set()
prime_self_import: Assure no pending requests before object counting
gem_flink_race: Assure no pending requests before object counting
lib/drmtest: Retire requests via drop caches after gem_quiescent_gpu

Paulo Zanoni (7):
tests/pc8: fix supports_pc8_plus_residencies
intel_reg_dumper: fix “enable” at hsw_debug_lp_wm
tests/pc8: add modeset-lpsp and modeset-non-lpsp
tests/pc8: add modeset -stress-no-wait tests
tests/pc8: clarify modeset_subtest arguments
tests/pc8: remove some printfs
module_reload: remove snd_hda_intel

Rodrigo Vivi (4):
build: Fix small typo that was breaking make distcheck
build: include intel_l3_parity.h to its _SOURCES to fix make distcheck
tests: pm_psr
bump version to 1.5 and add the release date

Thomas Wood (1):
testdisplay: Allow getopt to print error messages

Ville Syrjälä (6):
lib/drmtest: Add kmstest_paint_color_alpha()
lib: Allow pipe_crc_free(NULL)
lib: Check pipe source validity in igt_pipe_crc_new()
kms_cursor_crc: Add a cursor test using CRCs
kms_flip: Add test for -ENOENT
Add VGA register read/write tools

git tag: intel-gpu-tools-1.5
:  6165a9054de2609f5b1bf0ca0d913f31  intel-gpu-tools-1.5.tar.bz2
SHA1: f568dcdcaf238d2a63f5b2a1e26b18b044f45a9e  intel-gpu-tools-1.5.tar.bz2
SHA256: 115475b528c78d67741ae6cbedfbfced1d471b356140e48245cbad8fdfaad1d1
:  e261ee1eb3cb4c53fc30756f7883c305  intel-gpu-tools-1.5.tar.gz
SHA1: 0b89e79c143b1e86bb14a94fd3f43b210590e868  intel-gpu-tools-1.5.tar.gz
SHA256: a1fa6594e7dbeb634c62c8e89695f5dbb0d0c437482cfa1ffe3e4990c52215bc