Bug 97960 - [BSW] kms_cursor_crc some subcases fail
Summary: [BSW] kms_cursor_crc some subcases fail
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: ReadyForDev
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-28 14:23 UTC by cprigent
Modified: 2017-08-18 19:16 UTC (History)
3 users (show)

See Also:
i915 platform: BSW/CHT
i915 features: display/Other


Attachments
HSW__kms_cursor_crc__output (37.47 KB, text/plain)
2016-09-28 14:23 UTC, cprigent
no flags Details
HSW__kms_cursor_crc__kern.log (1.27 MB, text/plain)
2016-09-28 14:25 UTC, cprigent
no flags Details
relax watermark calculations (1.09 KB, patch)
2017-04-10 14:35 UTC, Maarten Lankhorst
no flags Details | Splinter Review
dmesg log (632.88 KB, text/plain)
2017-07-13 19:58 UTC, Elizabeth
no flags Details
kern log BSW (911.49 KB, text/plain)
2017-07-13 19:59 UTC, Elizabeth
no flags Details
Test Outputs (10.21 KB, text/plain)
2017-07-13 20:01 UTC, Elizabeth
no flags Details

Description cprigent 2016-09-28 14:23:44 UTC
Created attachment 126828 [details]
HSW__kms_cursor_crc__output

Platform: Dell Inc. OptiPlex 9020
CPU: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (Family 6, Model 60, Stepping 3)
Motherboard: 0DNKMN
GPU: Intel® HD Graphics 4600 / Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller

Software
Bios: A07
Linux distribution: Ubuntu 16.04 64 bits
Kernel: 4.8.0-rc8 aab15c2 from http://cgit.freedesktop.org/drm-intel/
   commit aab15c274da587bcab19376d2caa9d6626440335
   Author: Jani Nikula <jani.nikula@intel.com>
   Date:   Mon Sep 26 15:11:53 2016 +0300
   drm-intel-nightly: 2016y-09m-26d-12h-11m-33s UTC integration manifest
libdrm-2.4.70-14 0659558 from git://anongit.freedesktop.org/mesa/drm
mesa: mesa-12.0.0 8b06176 from git://anongit.freedesktop.org/mesa/mesa
cairo 1.15.2 db8a7f1 from git://anongit.freedesktop.org/cairo
xorg-server-1.18.99.901-14 ba199cb from git://git.freedesktop.org/git/xorg/xserver
xf86-video-intel 2.99.917-708 8f33f80 from git://git.freedesktop.org/git/xorg/driver/xf86-video-intel
libva-1.7.2-38 3b7e499 from git://git.freedesktop.org/git/vaapi/libva 
vaapi-intel-driver: 1.7.2-101 302cf63 from git://git.freedesktop.org/git/vaapi/intel-driver
IGT: intel-gpu-tools-1.16-30 32b2021 from http://anongit.freedesktop.org/git/xorg/app/intel-gpu-tools.git
External screen: DELL E1912Hf

Steps:
------
1. Execute test:
# ./kms_cursor_crc

Actual result:
----------------
1. Several subcases are fail:
Timed out: CRC reading
failure function igt_primary_plane_commit_legacy, file igt_kms.c:1962

Expected results:
----------------
1. Tests are Pass
Comment 1 cprigent 2016-09-28 14:25:21 UTC
Created attachment 126829 [details]
HSW__kms_cursor_crc__kern.log
Comment 2 Jari Tahvanainen 2017-03-28 11:18:43 UTC
Still valid for 4.10.0-drm-tip-qa-ww9-commit-7f38bb9+ (HSW-1-D54250WYK)
igt@kms_cursor_crc@cursor-128x128-dpms		Fail
igt@kms_cursor_crc@cursor-128x128-offscreen		Fail
igt@kms_cursor_crc@cursor-128x128-onscreen		Fail
igt@kms_cursor_crc@cursor-128x128-random		Fail
igt@kms_cursor_crc@cursor-128x128-rapid-movement		Fail
igt@kms_cursor_crc@cursor-128x128-sliding		Fail
igt@kms_cursor_crc@cursor-128x128-suspend		Fail
igt@kms_cursor_crc@cursor-256x256-dpms		Fail
igt@kms_cursor_crc@cursor-256x256-offscreen		Fail
igt@kms_cursor_crc@cursor-256x256-onscreen		Fail
igt@kms_cursor_crc@cursor-256x256-random		Fail
igt@kms_cursor_crc@cursor-256x256-rapid-movement		Fail
igt@kms_cursor_crc@cursor-256x256-sliding		Fail
igt@kms_cursor_crc@cursor-256x256-suspend		Fail
igt@kms_cursor_crc@cursor-64x64-dpms		Fail
igt@kms_cursor_crc@cursor-64x64-offscreen		Fail
igt@kms_cursor_crc@cursor-64x64-onscreen		Fail
igt@kms_cursor_crc@cursor-64x64-random		Fail
igt@kms_cursor_crc@cursor-64x64-rapid-movement		Fail
igt@kms_cursor_crc@cursor-64x64-sliding		Fail
igt@kms_cursor_crc@cursor-64x64-suspend		Fail
igt@kms_cursor_crc@cursor-size-change		Fail
Comment 3 Jari Tahvanainen 2017-03-28 11:26:02 UTC
e.g igt@kms_cursor_crc@cursor-256x256-rapid-movement
(kms_cursor_crc:21732) igt-kms-CRITICAL: Test assertion failure function igt_primary_plane_commit_legacy, file igt_kms.c:2229:
(kms_cursor_crc:21732) igt-kms-CRITICAL: Failed assertion: ret == 0
(kms_cursor_crc:21732) igt-kms-CRITICAL: Last errno: 22, Invalid argument
(kms_cursor_crc:21732) igt-kms-CRITICAL: error: -22 != 0
Subtest cursor-256x256-rapid-movement failed.
**** DEBUG ****
(kms_cursor_crc:21732) DEBUG: Test requirement passed: cursor_w <= data->cursor_max_w && cursor_h <= data->cursor_max_h
(kms_cursor_crc:21732) igt-kms-DEBUG: display: HDMI-A-1: set_pipe(A)
(kms_cursor_crc:21732) igt-kms-DEBUG: display: HDMI-A-1: Selecting pipe A
(kms_cursor_crc:21732) igt-kms-DEBUG: display: A.2: plane_set_fb(0)
(kms_cursor_crc:21732) igt-fb-DEBUG: igt_create_fb_with_bo_size(width=1920, height=1080, format=0x34325258, tiling=0x0, size=0)
(kms_cursor_crc:21732) igt-fb-DEBUG: igt_create_fb_with_bo_size(handle=2, pitch=7680)
(kms_cursor_crc:21732) igt-kms-DEBUG: display: A.0: plane_set_fb(127)
(kms_cursor_crc:21732) igt-kms-DEBUG: display: commit {
(kms_cursor_crc:21732) igt-kms-DEBUG: display:     HDMI-A-1: Selecting pipe A
(kms_cursor_crc:21732) igt-kms-DEBUG: display:     HDMI-A-1: SetCrtc pipe A, fb 127, src (0, 0), mode 1920x1080
(kms_cursor_crc:21732) igt-kms-CRITICAL: Test assertion failure function igt_primary_plane_commit_legacy, file igt_kms.c:2229:
(kms_cursor_crc:21732) igt-kms-CRITICAL: Failed assertion: ret == 0
(kms_cursor_crc:21732) igt-kms-CRITICAL: Last errno: 22, Invalid argument
(kms_cursor_crc:21732) igt-kms-CRITICAL: error: -22 != 0

and igt@kms_cursor_crc@cursor-256x256-offscreen
(kms_cursor_crc:21709) igt-kms-CRITICAL: Test assertion failure function igt_primary_plane_commit_legacy, file igt_kms.c:2229:
(kms_cursor_crc:21709) igt-kms-CRITICAL: Failed assertion: ret == 0
(kms_cursor_crc:21709) igt-kms-CRITICAL: Last errno: 22, Invalid argument
(kms_cursor_crc:21709) igt-kms-CRITICAL: error: -22 != 0
Subtest cursor-256x256-offscreen failed.
**** DEBUG ****
(kms_cursor_crc:21709) DEBUG: Test requirement passed: cursor_w <= data->cursor_max_w && cursor_h <= data->cursor_max_h
(kms_cursor_crc:21709) igt-kms-DEBUG: display: HDMI-A-1: set_pipe(A)
(kms_cursor_crc:21709) igt-kms-DEBUG: display: HDMI-A-1: Selecting pipe A
(kms_cursor_crc:21709) igt-kms-DEBUG: display: A.2: plane_set_fb(0)
(kms_cursor_crc:21709) igt-fb-DEBUG: igt_create_fb_with_bo_size(width=1920, height=1080, format=0x34325258, tiling=0x0, size=0)
(kms_cursor_crc:21709) igt-fb-DEBUG: igt_create_fb_with_bo_size(handle=2, pitch=7680)
(kms_cursor_crc:21709) igt-kms-DEBUG: display: A.0: plane_set_fb(127)
(kms_cursor_crc:21709) igt-kms-DEBUG: display: commit {
(kms_cursor_crc:21709) igt-kms-DEBUG: display:     HDMI-A-1: Selecting pipe A
(kms_cursor_crc:21709) igt-kms-DEBUG: display:     HDMI-A-1: SetCrtc pipe A, fb 127, src (0, 0), mode 1920x1080
(kms_cursor_crc:21709) igt-kms-CRITICAL: Test assertion failure function igt_primary_plane_commit_legacy, file igt_kms.c:2229:
(kms_cursor_crc:21709) igt-kms-CRITICAL: Failed assertion: ret == 0
(kms_cursor_crc:21709) igt-kms-CRITICAL: Last errno: 22, Invalid argument
(kms_cursor_crc:21709) igt-kms-CRITICAL: error: -22 != 0
****  END  ****
Comment 4 Maarten Lankhorst 2017-04-10 14:08:57 UTC
This seems to be the culprit:
"[drm:intel_crtc_atomic_check] No valid intermediate pipe watermarks are possible"

So quite likely a watermark issue.
Comment 5 Maarten Lankhorst 2017-04-10 14:35:46 UTC
Created attachment 130778 [details] [review]
relax watermark calculations

Hey,

Could be 2 things, either no intermediate values can be found while we modeset or we're using the wrong watermarks to calculate intermediate values for.

Does the attached patch fix things? If so could you see which of the 2 hunk in it?
Comment 6 Ricardo 2017-05-25 17:29:36 UTC
Luis can you help to test the patch included to see if this fixes the issue...
Comment 7 Humberto Israel Perez Rodriguez 2017-05-31 23:49:30 UTC
(In reply to Maarten Lankhorst from comment #5)
> Created attachment 130778 [details] [review] [review]
> relax watermark calculations
> 
> Hey,
> 
> Could be 2 things, either no intermediate values can be found while we
> modeset or we're using the wrong watermarks to calculate intermediate values
> for.
> 
> Does the attached patch fix things? If so could you see which of the 2 hunk
> in it?

Hi Maarten 

this path is included in the latest drm-tip commits ?
because with the latest commit the following test cases failed on BSW

testlist
======================================
igt@kms_cursor_crc@cursor-64x64-onscreen
igt@kms_cursor_crc@cursor-128x128-random
igt@kms_cursor_crc@cursor-256x256-suspend
igt@kms_cursor_crc@cursor-64x64-suspend
igt@kms_cursor_crc@cursor-128x128-onscreen
igt@kms_cursor_crc@cursor-256x256-onscreen
igt@kms_cursor_crc@cursor-128x128-suspend
igt@kms_cursor_crc@cursor-256x256-random


kernel
===================================================
commit 4aa1d46d3b24bbe545cdf7cbd407c18f5cd5e43d
Author:     Daniel Vetter <daniel.vetter@ffwll.ch>
AuthorDate: Wed May 31 10:59:05 2017 +0200
Commit:     Daniel Vetter <daniel.vetter@ffwll.ch>
CommitDate: Wed May 31 10:59:05 2017 +0200

    drm-tip: 2017y-05m-31d-08h-58m-36s UTC integration manifest
Comment 8 Maarten Lankhorst 2017-06-14 08:19:38 UTC
I've seen a failure on BSW which is really an expected failure. The cursor cannot be used at negative coordinates on pipe C.

Patch for IGT on https://patchwork.freedesktop.org/series/25759/

That should hopefully be enough to fix BSW.
Comment 9 Maarten Lankhorst 2017-07-03 09:47:55 UTC
Should be fixed now for bsw, can you verify?

Also is HSW still affected?

commit 6fcc8e8b247661c7950b998e0b95141ffbd6b833
Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Date:   Wed Jun 14 10:17:31 2017 +0200

    tests/kms_cursor_crc: Fix the cursor tests to work on CHV
Comment 10 Elizabeth 2017-07-06 15:56:01 UTC
(In reply to Maarten Lankhorst from comment #9)
> Should be fixed now for bsw, can you verify?
> 
> Also is HSW still affected?
> 
> commit 6fcc8e8b247661c7950b998e0b95141ffbd6b833
> Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Date:   Wed Jun 14 10:17:31 2017 +0200
> 
>     tests/kms_cursor_crc: Fix the cursor tests to work on CHV

The tests are passed on HSW now with the following configuration:

Software Configuration:
======================================
Component: drm
    tag: libdrm-2.4.81-24-g3095cc8
    commit: 3095cc8eaba1aa87ad38c04ae2b1eabe30f7e16c

Component: cairo
    tag: 1.15.6-2-g57b4050
    commit: 57b40507dda3f58dfc8635548d606b86dc7bcf51

Component: intel-gpu-tools
    tag: intel-gpu-tools-1.19-57-g6fcc8e8
    commit: 6fcc8e8b247661c7950b998e0b95141ffbd6b833

Component: piglit
    tag: piglit-v1
    commit: c8f4fd9eeb298a2ef0855927f22634f794ef3eff

Hardware Configuration:
======================================
platform                   : Haswell
motherboard model          : Haswell
manufacturer               : IntelCorp.
cpu                        : Intel® Core™ i5-4250U Processor
gpu                        : Intel® HD Graphics 5000
max memory ram             : 16 GB
cpu core                   : 2
Comment 11 Elizabeth 2017-07-07 15:56:01 UTC
(In reply to Maarten Lankhorst from comment #9)
> Should be fixed now for bsw, can you verify?
> 
> Also is HSW still affected?
> 
> commit 6fcc8e8b247661c7950b998e0b95141ffbd6b833
> Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Date:   Wed Jun 14 10:17:31 2017 +0200
> 
>     tests/kms_cursor_crc: Fix the cursor tests to work on CHV

There are two tests that keep failing on BSW with the following configuration:

Tests failed
======================================
igt@kms_cursor_crc@cursor-64x64-suspend
igt@kms_cursor_crc@cursor-256x256-suspend

Software Configuration:
======================================
Component: drm
    tag: libdrm-2.4.81-24-g3095cc8
    commit: 3095cc8eaba1aa87ad38c04ae2b1eabe30f7e16c

Component: cairo
    tag: 1.15.6-2-g57b4050
    commit: 57b40507dda3f58dfc8635548d606b86dc7bcf51

Component: intel-gpu-tools
    tag: intel-gpu-tools-1.19-57-g6fcc8e8
    commit: 6fcc8e8b247661c7950b998e0b95141ffbd6b833

Component: piglit
    tag: piglit-v1
    commit: c8f4fd9eeb298a2ef0855927f22634f794ef3eff

Hardware Configuration:
======================================
platform                   : Braswell
motherboard model          : Braswell
manufacturer               : IntelCorp.
cpu                        : Intel® Pentium® Processor N3700
gpu                        : Intel® HD Graphics
max memory ram             : 8 GB
cpu core                   : 4

All the other test had passed.
Comment 12 Maarten Lankhorst 2017-07-13 14:03:40 UTC
What is failing now exactly?
Comment 13 Elizabeth 2017-07-13 19:58:44 UTC
Created attachment 132677 [details]
dmesg log
Comment 14 Elizabeth 2017-07-13 19:59:30 UTC
Created attachment 132678 [details]
kern log BSW
Comment 15 Elizabeth 2017-07-13 20:01:56 UTC
Created attachment 132679 [details]
Test Outputs

Adding the information. Sorry for the delay.
Comment 16 Elizabeth 2017-07-13 21:20:04 UTC
(In reply to Elizabeth from comment #15)
> Created attachment 132679 [details]
> Test Outputs
> 
> Adding the information. Sorry for the delay.

After the last process:
rtcwake: assuming RTC uses UTC ...
rtcwake: wakeup from "mem" using /dev/rtc0 at Thu Jul 13 19:53:42 2017
The BSW lost communication.
Comment 17 Maarten Lankhorst 2017-07-24 07:54:26 UTC
Might be a different cause now if suspend is failing, something for Ville?

What I do see in dmesg is the below:

[  593.079757] [drm:vlv_suspend_complete [i915]] *ERROR* timeout waiting for GT wells to go off
[  593.079770] WARN_ON((I915_READ(VLV_GTLC_WAKE_CTRL) & mask) != mask);
Comment 18 Maarten Lankhorst 2017-08-16 13:38:39 UTC
The original bug is closed, please open a new bug for the CDCLK dmesg error on bsw. :)


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.