Bug 101718

Summary: [CI][IGT] [SNB/IVB] kms_fbcon_fbt: Failed assertion: feature->wait_until_enabled(drm.fd)
Product: DRI Reporter: Armando Antonio <armando.antoniox.mora.reos>
Component: DRM/IntelAssignee: krisman
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium CC: intel-gfx-bugs, krisman
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: GLK, IVB, SNB i915 features: display/FBC
Attachments:
Description Flags
dmesg log
none
kernel log
none
execution output
none
debug patch - no fbc reason
none
Tests Log (IVB)
none
Dmesg.log (IVB)
none
kernel log
none
dmesg log
none
dmesg log-patch
none
kernel log-patch
none
test log-patch none

Description Armando Antonio 2017-07-07 15:26:38 UTC
Created attachment 132494 [details]
dmesg log

The following test fail on IVB with latest configuration

====================================================
Test list
====================================================
igt@kms_fbcon_fbt@fbc


Graphic Stack
====================================================
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
======================================
platform                   : Ivy Bridge
motherboard model          : Inspiron660
motherboard id             : 0XR1GT
form factor                : Desktop
manufacturer               : DellInc.
cpu family                 : Core i5
cpu family id              : 6
cpu information            : Intel(R) Core(TM) i5-3330 CPU @ 3.00GHz
gpu card                   : Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])
memory ram                 : 7.7 GB
max memory ram             : 8 GB
cpu thread                 : 4
cpu core                   : 4
cpu model                  : 58
cpu stepping               : 9
socket                     : Socket BGA1155
signature                  : Type 0, Family 6, Model 58, Stepping 9
hard drive                 : 74GiB (80GB)
current cd clock frequency : 400000 kHz
maximum cd clock frequency : 400000 kHz
displays connected         : VGA-1 HDMI-A-1
Comment 1 Armando Antonio 2017-07-07 15:28:18 UTC
Created attachment 132495 [details]
kernel log
Comment 2 Armando Antonio 2017-07-07 15:29:04 UTC
Created attachment 132496 [details]
execution output
Comment 3 krisman 2017-07-12 19:22:51 UTC
(In reply to Armando Antonio from comment #1)
> Created attachment 132495 [details]
> kernel log

Not sure which assert you hit... Why doesn't it print any Critical messages?  Can you run with --debug?

Also, please check the value of fbc_status in debugfs.
Comment 4 Armando Antonio 2017-07-14 15:37:08 UTC
Hello, this is the assertion:

(kms_fbcon_fbt:8185) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
(kms_fbcon_fbt:8185) CRITICAL: Test assertion failure function subtest, file kms_fbcon_fbt.c:217:
(kms_fbcon_fbt:8185) CRITICAL: Failed assertion: feature->wait_until_enabled(drm.fd)
(kms_fbcon_fbt:8185) CRITICAL: Last errno: 2, No such file or directory
****  END  ****
Subtest fbc: FAIL (10.101s)
(kms_fbcon_fbt:8185) igt-core-DEBUG: Exiting with status code 99
(kms_fbcon_fbt:8185) igt-kms-DEBUG: VT: original mode 0x0 restored
Comment 5 krisman 2017-07-17 18:41:57 UTC
Created attachment 132739 [details] [review]
debug patch - no fbc reason

(In reply to Armando Antonio from comment #4)
> Hello, this is the assertion:
> 
> (kms_fbcon_fbt:8185) igt-debugfs-DEBUG: Opening debugfs directory
> '/sys/kernel/debug/dri/0'
> (kms_fbcon_fbt:8185) CRITICAL: Test assertion failure function subtest, file
> kms_fbcon_fbt.c:217:
> (kms_fbcon_fbt:8185) CRITICAL: Failed assertion:
> feature->wait_until_enabled(drm.fd)

So, looks like fbc is not enabling. Probably because you don't have enough stolen memory.  you can try going to the BIOS and increase it?

Can you also apply the following patch and provide the output, so we can confirm why the fbc is not loading?
Comment 6 Elizabeth 2017-07-18 16:44:16 UTC
Changing priority since it's IGT non-basic Failure and NEEDINFO for comment #5.
Comment 7 Hector Velazquez 2017-07-26 19:47:49 UTC
The following test FAIL on IVB with this commit

Tests List:

igt@kms_fbcon_fbt@fbc


This is my configuration:

====================================================
Graphic Stack
====================================================
Component: drm
    tag: libdrm-2.4.81-33-g3876bc2
    commit: 3876bc246a07070a6043159cd7623d4def9bbd4c

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

Component: intel-gpu-tools
    tag: intel-gpu-tools-1.19-112-g493151b
    commit: 493151b0768aa4ca535cef49cb7efa174a9c3a77

Component: piglit
    tag: piglit-v1
    commit: 973892687cf5c2f8e2dbe1d22998b82736643787
Comment 8 krisman 2017-07-26 19:50:36 UTC
(In reply to Hector Velazquez from comment #7)
> The following test FAIL on IVB with this commit
> 

Yes, it is a patch to collect information, but I need the entire igt log of the execution
Comment 9 Hector Velazquez 2017-07-27 15:34:21 UTC
Created attachment 133076 [details]
Tests Log (IVB)

Test and dmesg logs added of the Comment 7....
Comment 10 Hector Velazquez 2017-07-27 15:34:39 UTC
Created attachment 133077 [details]
Dmesg.log (IVB)
Comment 11 Armando Antonio 2017-07-27 18:49:54 UTC
Created attachment 133081 [details]
kernel log
Comment 12 Armando Antonio 2017-07-27 18:50:11 UTC
Created attachment 133082 [details]
dmesg log
Comment 13 Armando Antonio 2017-07-27 18:50:48 UTC
Attached new info, regards
Comment 14 krisman 2017-08-05 20:29:07 UTC
(In reply to Hector Velazquez from comment #9)
> Created attachment 133076 [details]
> Tests Log (IVB)
> 
> Test and dmesg logs added of the Comment 7....

I don't see the output of my test patch there and I don't see the FBC critical messages like mentioned in Comment 4.  So I suppose we have two crashes, one related to FBC not being enabled, which is "ok", and one that is generating this quite useless trace.   What is the condition that we falsely asserted on in this case:

Stack trace:
  #0 [__igt_fail_assert+0x101]
  #1 [subtest+0x466]

I'm really confused by this output.
Comment 15 Armando Antonio 2017-08-08 16:03:34 UTC
Created attachment 133381 [details]
dmesg log-patch
Comment 16 Armando Antonio 2017-08-08 16:04:19 UTC
Created attachment 133382 [details]
kernel log-patch
Comment 17 Armando Antonio 2017-08-08 16:04:54 UTC
Created attachment 133383 [details]
test log-patch
Comment 18 Armando Antonio 2017-08-08 16:05:19 UTC
Attached new logs with the patch applied. Regards
Comment 20 Elizabeth 2017-10-18 15:21:48 UTC
According to https://intel-gfx-ci.01.org/tree/drm-tip/igt@kms_fbcon_fbt@fbc.html, HSW doesn't fail this test anymore.
Comment 21 Marta Löfstedt 2017-10-20 07:53:28 UTC
CI_DRM_3268 GLK-shards igt@kms_fbcon_fbt@psr-suspend fail:

(kms_fbcon_fbt:1573) CRITICAL: Test assertion failure function subtest, file kms_fbcon_fbt.c:217:
(kms_fbcon_fbt:1573) CRITICAL: Failed assertion: feature->wait_until_enabled(drm.fd)
(kms_fbcon_fbt:1573) CRITICAL: Last errno: 2, No such file or directory
Subtest psr-suspend failed.

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3268/shard-glkb5/igt@kms_fbcon_fbt@psr-suspend.html
Comment 22 Marta Löfstedt 2017-10-20 08:01:48 UTC
Also, CI_DRM_3268 igt@kms_fbcon_fbt@psr fail:

(kms_fbcon_fbt:1534) CRITICAL: Test assertion failure function subtest, file kms_fbcon_fbt.c:217:
(kms_fbcon_fbt:1534) CRITICAL: Failed assertion: feature->wait_until_enabled(drm.fd)
(kms_fbcon_fbt:1534) CRITICAL: Last errno: 2, No such file or directory
Subtest psr failed.

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3268/shard-glkb1/igt@kms_fbcon_fbt@psr.html
Comment 23 krisman 2017-10-20 21:15:43 UTC
(In reply to Marta Löfstedt from comment #22)
> Also, CI_DRM_3268 igt@kms_fbcon_fbt@psr fail:
> 
> (kms_fbcon_fbt:1534) CRITICAL: Test assertion failure function subtest, file
> kms_fbcon_fbt.c:217:
> (kms_fbcon_fbt:1534) CRITICAL: Failed assertion:
> feature->wait_until_enabled(drm.fd)
> (kms_fbcon_fbt:1534) CRITICAL: Last errno: 2, No such file or directory
> Subtest psr failed.
> 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3268/shard-glkb1/
> igt@kms_fbcon_fbt@psr.html

I submitted a patch to get the feature status when this happens.  Hopefully we will have more information to figure it out.
Comment 25 Jani Saarinen 2017-11-07 07:31:54 UTC
please check if resolving good or was this only for getting more info...
Comment 28 Marta Löfstedt 2017-11-07 07:57:50 UTC
The IGT-Version: 1.20-gbde7d72f (x86_64) (Linux: 4.14.0-rc8-CI-CI_DRM_3317+ x86_64) on mentioned runs indicates that we don't have runs yet when the patch is used.
If you are closing a bug because a patch that may solve the issue has been integrated, please provide patchwork results that indicates that the problem is solved before closing.
Comment 29 krisman 2017-11-07 15:38:43 UTC
(In reply to Jani Saarinen from comment #25)
> please check if resolving good or was this only for getting more info...

Hi Jani,

The patch improves the test to provide more information on the fail.  It is not a fix on itself.

Looking forward for the CI results with the patch applied, though.
Comment 31 krisman 2017-11-14 15:56:45 UTC
(In reply to Marta Löfstedt from comment #30)
> Also,
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7096/shard-snb4/
> igt@kms_fbcon_fbt@fbc-suspend.html

Here we go.  The patch output was:

(kms_fbcon_fbt:7815) DEBUG: FBC status: FBC disabled: not enough stolen memory

So, we need someone to verify if the BIOS supports increasing the stolen memory on SNB4.  

Several months ago, I submitted a patch to skip tests on cases like this, but it was rejected on the argument that the user should know better and increase the memory.  So, either the BIOS supports it for these machines, or we will have a good point on reviving that patch.

Setting to NEEDINFO until someone at Intel can verify the BIOS.
Comment 32 Marta Löfstedt 2017-11-15 08:18:32 UTC
(In reply to krisman from comment #31)
> (In reply to Marta Löfstedt from comment #30)
> > Also,
> > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7096/shard-snb4/
> > igt@kms_fbcon_fbt@fbc-suspend.html
> 
> Here we go.  The patch output was:
> 
> (kms_fbcon_fbt:7815) DEBUG: FBC status: FBC disabled: not enough stolen
> memory
> 
> So, we need someone to verify if the BIOS supports increasing the stolen
> memory on SNB4.  
> 
> Several months ago, I submitted a patch to skip tests on cases like this,
> but it was rejected on the argument that the user should know better and
> increase the memory.  So, either the BIOS supports it for these machines, or
> we will have a good point on reviving that patch.
> 
> Setting to NEEDINFO until someone at Intel can verify the BIOS.

krisman, SNB solen memory is handled in bug 103516.
I believe Ville has a patch for that, but I don't know what that is happening to it.
Comment 33 Tomi Sarvela 2017-11-15 09:13:01 UTC
Shard-SNBs have 8GB memory each.

The hardware is Dell XPS 8300 which has very simplistic BIOS, without stolen tuning knobs.
Comment 34 krisman 2017-11-15 17:04:42 UTC
(In reply to Marta Löfstedt from comment #32)

> krisman, SNB solen memory is handled in bug 103516.

Thanks.  Since they are different tests I think we should keep both opened for now.

> I believe Ville has a patch for that, but I don't know what that is
> happening to it.

Ok.  So, next step here is to wait for the following patch to be applied and see if it helps with the issue here:

https://lists.freedesktop.org/archives/intel-gfx/2017-November/145378.html
Comment 36 krisman 2017-11-20 05:46:43 UTC
(In reply to Tomi Sarvela from comment #35)
> Ville's patch has been tested already:
> https://patchwork.freedesktop.org/series/33060/
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6930/shards.html

Since this flip-flops, I think we should get more tries before closing.
Comment 37 Marta Löfstedt 2017-11-21 08:24:32 UTC
I will close this, since VIlles patch fix the:
igt@kms_fbcon_fbt@fbc and igt@kms_fbcon_fbt@fbc-suspend for SNB.

I created bug 103833 for the GLK-shard PSR related issues.

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.