Bug 86684 - [BYT/BSW] igt/kms_psr_sink_crc subcases fail after PSR is enabled in kernel
Summary: [BYT/BSW] igt/kms_psr_sink_crc subcases fail after PSR is enabled in kernel
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: Other All
: high enhancement
Assignee: Rodrigo Vivi
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-25 06:27 UTC by wendy.wang
Modified: 2017-07-24 22:50 UTC (History)
5 users (show)

See Also:
i915 platform: BSW/CHT, BYT
i915 features: display/PSR


Attachments
dmesg log file (123.42 KB, text/plain)
2014-11-25 06:27 UTC, wendy.wang
no flags Details

Description wendy.wang 2014-11-25 06:27:24 UTC
Created attachment 109982 [details]
dmesg log file

==System Environment==
--------------------------
BSW RVP FAB2 with B1 CPU
BIOS: V41.0
KSC: 1.05
OS: Ubuntu 14.04

==kernel==
--------------------------
Fail kernel: origin/drm-intel-nightly

BOOT_IMAGE=kernels//nightly_parents/2014_11_25/drm-intel-nightly/ab4b258a6ea5f58b5cb17131aced8f9a8dd64499/bzImage_x86_64 root=/dev/sda3 drm.debug=0xe i915.enable_psr=1 hostname=x-bsw03 modules_path=kernels//nightly_parents/2014_11_25/drm-intel-nightly/ab4b258a6ea5f58b5cb17131aced8f9a8dd64499/modules_x86_64/lib/modules/3.18.0-rc6_drm-intel-nightly_ab4b25_20141125+ acpi_rsdp=0x7b715014 kexec_jump_back_entry=0x71ace358

==Regression==
Regression:No, first time test PSR feature on BSW

==Bug detailed description==
PSR is enabled check from sysdebug file.
root@x-bsw03:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# cat /sys/kernel/debug/dri/0/i915_edp_psr_status
Sink_Support: yes
Source_OK: yes
Enabled: yes
Active: yes
Busy frontbuffer bits: 0x000
Re-enable work scheduled: no
HW Enabled & Active bit: yes pipe A

Run IGT case: ./kms_psr_sink_crc, find below failures:

IGT-Version: 1.8-gd807891 (x86_64) (Linux: 3.18.0-rc5_drm-intel-nightly_0f8cb1_2                                                                                                                     0141124+ x86_64)
Test requirement not met in function get_sink_crc, file kms_psr_sink_crc.c:250:
Test requirement: ret > 0
Last errno: 110, Connection timed out
Subtest primary_page_flip: SKIP (3.784s)
Test requirement not met in function get_sink_crc, file kms_psr_sink_crc.c:250:
Test requirement: ret > 0
Last errno: 110, Connection timed out
Subtest primary_mmap_gtt: SKIP (3.953s)
Test requirement not met in function get_sink_crc, file kms_psr_sink_crc.c:250:
Test requirement: ret > 0
Last errno: 110, Connection timed out
Subtest primary_mmap_gtt_waiting: SKIP (4.694s)
Test requirement not met in function get_sink_crc, file kms_psr_sink_crc.c:250:
Test requirement: ret > 0
Last errno: 110, Connection timed out
Subtest primary_mmap_cpu: SKIP (3.919s)
Test requirement not met in function get_sink_crc, file kms_psr_sink_crc.c:250:
Test requirement: ret > 0
Last errno: 110, Connection timed out
Subtest primary_blt: SKIP (3.955s)
Test requirement not met in function get_sink_crc, file kms_psr_sink_crc.c:250:
Test requirement: ret > 0
Last errno: 110, Connection timed out
Subtest primary_render: SKIP (4.693s)
Test requirement not met in function get_sink_crc, file kms_psr_sink_crc.c:250:
Test requirement: ret > 0
Last errno: 110, Connection timed out
Subtest sprite_mmap_gtt: SKIP (3.314s)
Test requirement not met in function get_sink_crc, file kms_psr_sink_crc.c:250:
Test requirement: ret > 0
Last errno: 110, Connection timed out
Subtest sprite_mmap_gtt_waiting: SKIP (3.905s)
Test requirement not met in function get_sink_crc, file kms_psr_sink_crc.c:250:
Test requirement: ret > 0
Last errno: 110, Connection timed out
Subtest sprite_mmap_cpu: SKIP (4.650s)
Test requirement not met in function get_sink_crc, file kms_psr_sink_crc.c:250:
Test requirement: ret > 0
Last errno: 110, Connection timed out
Subtest sprite_blt: SKIP (4.678s)
Test requirement not met in function get_sink_crc, file kms_psr_sink_crc.c:250:
Test requirement: ret > 0
Last errno: 110, Connection timed out
Subtest sprite_render: SKIP (3.900s)
Test requirement not met in function get_sink_crc, file kms_psr_sink_crc.c:250:
Test requirement: ret > 0
Last errno: 110, Connection timed out
Subtest sprite_plane_move: SKIP (3.939s)
Test requirement not met in function get_sink_crc, file kms_psr_sink_crc.c:250:
Test requirement: ret > 0
Last errno: 110, Connection timed out
Subtest sprite_plane_onoff: SKIP (4.674s)
Test requirement not met in function get_sink_crc, file kms_psr_sink_crc.c:250:
Test requirement: ret > 0
Last errno: 110, Connection timed out
Subtest cursor_mmap_gtt: SKIP (3.903s)
Test requirement not met in function get_sink_crc, file kms_psr_sink_crc.c:250:
Test requirement: ret > 0
Last errno: 110, Connection timed out
Subtest cursor_mmap_gtt_waiting: SKIP (3.940s)
Test requirement not met in function get_sink_crc, file kms_psr_sink_crc.c:250:
Test requirement: ret > 0
Last errno: 110, Connection timed out
Subtest cursor_mmap_cpu: SKIP (4.676s)
Test requirement not met in function get_sink_crc, file kms_psr_sink_crc.c:250:
Test requirement: ret > 0
Last errno: 110, Connection timed out
Subtest cursor_blt: SKIP (3.904s)
Test requirement not met in function get_sink_crc, file kms_psr_sink_crc.c:250:
Test requirement: ret > 0
Last errno: 110, Connection timed out
Subtest cursor_render: SKIP (3.938s)
Test requirement not met in function get_sink_crc, file kms_psr_sink_crc.c:250:
Test requirement: ret > 0
Last errno: 110, Connection timed out
Subtest cursor_plane_move: SKIP (4.678s)
Test requirement not met in function get_sink_crc, file kms_psr_sink_crc.c:250:
Test requirement: ret > 0
Last errno: 110, Connection timed out
Subtest cursor_plane_onoff: SKIP (3.900s)

==Dmesg==
dmesg file log attached.
Comment 1 Daniel Vetter 2014-11-25 08:40:57 UTC
Stuff which is disabled still by default is tracked as enhancement per recent discussion with Gordon. If you want this fixed please escalate through PDT.
Comment 2 Gordon Jin 2014-11-25 13:30:40 UTC
(In reply to Daniel Vetter from comment #1)
> Stuff which is disabled still by default is tracked as enhancement per
> recent discussion with Gordon. If you want this fixed please escalate
> through PDT.

but hasn't PSR been enabled since last weekend?
Comment 3 Rodrigo Vivi 2014-11-25 17:56:47 UTC
No, PSR is still disabled by default on all platforms.

Last friday, PSR support for Baytrail and Braswell landed but still need i915.enable_psr=1 to enable it.

It is working well, but the test suite isn't. Whenever psr is in an active state we cannot reliably use sink_crc to validate it. So this bug here is the one that I'm fighting right now. A but on sink_crc that only happens when PSR is enabled on BYT and BSW.
Comment 4 Rodrigo Vivi 2014-11-25 17:57:39 UTC
More info on the issue:

when PSR is active on pipe even before setting DP_TEST_SINK to start test and start calculating CRC, there is already CRC being calculated at panel and count is already bigger than 1.

Another strange thing is that TEST_CRC_COUNT is 1 at the very beginning even when TEST_SINK is 0. Even forcing TEST_SINK to 0 TEST_CRC_COUNT is still 1. DP 1.2 tells TEST_CRC_COUNT reset to 0 when TEST_SINK bit 0 = 0. This logic works pretty well when PSR is disabled. However when PSR is enabled Iā€™m getting this incorrect panel behavior.
Comment 5 Jesse Barnes 2015-04-02 16:36:00 UTC
Any update on this one, Rodrigo?
Comment 6 Rodrigo Vivi 2015-04-02 16:42:20 UTC
No way to get sink CRC working properly on BYT/BSW/SKL and sometimes even on BDW. So I've added a manual way to debug. It didn't get merged yet because there is one patch pending some extra debug on my side. Daniel belive buf->size and buf->stride for render case are wrong and should be fixed before merge.
Comment 7 Rodrigo Vivi 2015-05-13 19:42:12 UTC
Manual test case to workaround this issue has been merged.

However I won't close this yet because I will work a bit more to see if we can get sink crc info on these platforms when psr is on and active.
Comment 8 Rodrigo Vivi 2015-08-20 16:24:06 UTC
This got fixed by a series of 7 patches that are all merged already:


[PATCH 1/7] drm: Fix DP_TEST_COUNT_MASK
[PATCH 2/7] drm/i915: Try to stop sink crc calculation on error.
[PATCH 3/7] drm/i915: Don't return error on sink crc stop.
[PATCH 4/7] drm/i915: Split sink_crc function in start, stop and read.
[PATCH 5/7] drm/i915: Force sink crc stop before start.
[PATCH 6/7] drm/i915: Save latest known sink CRC to compensate delayed counter reset.
[PATCH 7/7] drm/i915: Dont -ETIMEDOUT on identical new and previous (count, crc).


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.