Bug 111749 - Display corruption(Sometimes) + multiple traces of mouse + system slow (slow refresh) + display does not show input characters immediately on PSR2 Panel
Summary: Display corruption(Sometimes) + multiple traces of mouse + system slow (slow ...
Status: RESOLVED NOTOURBUG
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: DRI git
Hardware: IA64 (Itanium) Linux (All)
: medium normal
Assignee: Jose Roberto de Souza
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: Triaged, ReadyForDev
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-19 11:59 UTC by gaurav.k.singh
Modified: 2019-10-03 17:17 UTC (History)
4 users (show)

See Also:
i915 platform: CML
i915 features: display/PSR


Attachments
dmesg (160.37 KB, text/plain)
2019-09-19 12:11 UTC, gaurav.k.singh
no flags Details
Patch fixing the issues (2.00 KB, patch)
2019-09-19 12:20 UTC, gaurav.k.singh
no flags Details | Splinter Review
Patch fixing all the issues on AUO PSR2 panel by forcibly enabling PSR1 on it (2.60 KB, patch)
2019-09-22 13:13 UTC, gaurav.k.singh
no flags Details | Splinter Review
Set bits 3:0 of PSR2 control reg to 0 only for AUO panel (3.61 KB, patch)
2019-09-24 15:39 UTC, gaurav.k.singh
no flags Details | Splinter Review
patch for setting bits 31:30 of PSR_DEBUG to force non idle frame exit deep sleep (1.60 KB, patch)
2019-09-25 06:51 UTC, Abhishek Kumar
no flags Details | Splinter Review
Patch to add debugfs required for updating TCON (2.18 KB, patch)
2019-09-27 16:16 UTC, gaurav.k.singh
no flags Details | Splinter Review
Patch to modify drm_dp_dpcd_read to include single read (2.46 KB, patch)
2019-09-27 16:21 UTC, gaurav.k.singh
no flags Details | Splinter Review
Patch to enable required configs in kernel required to update TCON FW on AUO PSR2 panel (1.72 KB, patch)
2019-09-27 16:27 UTC, gaurav.k.singh
no flags Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description gaurav.k.singh 2019-09-19 11:59:27 UTC
Used latest drm-tip on Gen9 chromebooks  and saw many issues on PSR2 panel:

1. Slow refresh (system is slowly responding)
2. Multiple traces of mouse
3. display does not show characters immediately once typed
4. sometimes corruption is also seen


I used drm-tip with top commit listed below:
commit 7ca2b123ae999133223b882e3190955897df8b03
Author: Rodrigo Vivi <rodrigo.vivi@intel.com>
Date:   Wed Sep 18 10:55:02 2019 -0700

    drm-tip: 2019y-09m-18d-17h-54m-20s UTC integration manifest
Comment 1 gaurav.k.singh 2019-09-19 12:02:10 UTC
These issues happen only with AUO PSR2 panel, not with Innolux PSR2 panel on Gen9 chromebooks.

Collected the below data to start with:

localhost ~ # cat /sys/kernel/debug/dri/0/i915_display_info
CRTC info
---------
CRTC 51: pipe: A, active=yes, (size=1920x1080), dither=no, bpp=24
        fb: 133, pos: 0x0, size: 1920x1080
        encoder 94: type: DDI A, connectors:
                connector 95: type: eDP-1, status: connected, mode:
                "1920x1080": 60 141000 1920 1936 1952 2104 1080 1083 1097 1116 0x48 0xa
        cursor visible? no, position (0, 0), size 0x0, addr 0x00000000
        num_scalers=2, scaler_users=0 scaler_id=-1, scalers[0]: use=no, mode=10000000, scalers[1]: use=no, mode=0
        --Plane id 31: type=PRI, crtc_pos=   0x   0, crtc_size=1920x1080, src_pos=0.0000x0.0000, src_size=1920.0000x1080.0000, format=XR24 little-endian (0x34325258), rotation=0 (0x00000001)
        --Plane id 39: type=OVL, crtc_pos=   0x   0, crtc_size=   0x   0, src_pos=0.0000x0.0000, src_size=0.0000x0.0000, format=N/A, rotation=0 (0x00000001)
        --Plane id 47: type=CUR, crtc_pos=   0x   0, crtc_size=   0x   0, src_pos=0.0000x0.0000, src_size=0.0000x0.0000, format=N/A, rotation=0 (0x00000001)
        underrun reporting: cpu=yes pch=yes
CRTC 72: pipe: B, active=no, (size=0x0), dither=no, bpp=0
        underrun reporting: cpu=yes pch=yes
CRTC 93: pipe: C, active=no, (size=0x0), dither=no, bpp=0
        underrun reporting: cpu=yes pch=yes

Connector info
--------------
connector 95: type eDP-1, status: connected
        physical dimensions: 310x170mm
        subpixel order: Unknown
        CEA rev: 0
        DPCD rev: 14
        audio support: no
        fixed mode:
                "1920x1080": 60 141000 1920 1936 1952 2104 1080 1083 1097 1116 0x48 0xa
        DP branch device present: no
        modes:
                "1920x1080": 60 141000 1920 1936 1952 2104 1080 1083 1097 1116 0x48 0xa
                "1920x1080": 48 112800 1920 1936 1952 2104 1080 1083 1097 1116 0x40 0xa
connector 101: type DP-1, status: disconnected
connector 109: type DP-2, status: disconnected


localhost ~ # cat /sys/kernel/debug/dri/0/i915_edp_psr_status
Sink support: yes [0x03]
PSR mode: PSR2 enabled
Source PSR ctl: enabled [0xc0000016]
Source PSR status: SLEEP [0x300b0130]
Busy frontbuffer bits: 0x00000000
Frame:  PSR2 SU blocks:
0       0
1       0
2       0
3       0
4       0
5       0
6       0
7       0


localhost ~ # cat /sys/kernel/debug/dri/0/eDP-1/i915_psr_sink_status
Sink PSR status: 0x2 [active, display from RFB]


localhost ~ # cat /sys/kernel/debug/dri/0/eDP-1/i915_dpcd
0000: 14 0a 82 41 00 00 01 c0 02 00 00 00 0f 09 80
0070: 03 1b
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0100: 00 82 00 00 00 00 00 00 01 08 00
0200: 01 00 00 00 80 01 00 00
0600: 01
0700: 04
0701: fb ff 00 00
0720: 01 03 ff ff 10 0a 10 00 01 00 01 00 00 c0 00 00
0732: 00 14


localhost ~ # cat /sys/kernel/debug/dri/0/eDP-1/i915_panel_timings
Panel power up delay: 200
Panel power down delay: 50
Backlight on delay: 1
Backlight off delay: 200
Comment 2 gaurav.k.singh 2019-09-19 12:03:44 UTC
All the issues goes away if i disable PSR2. Will attach dmesg log as well
Comment 3 gaurav.k.singh 2019-09-19 12:11:51 UTC
Created attachment 145431 [details]
dmesg
Comment 4 gaurav.k.singh 2019-09-19 12:20:52 UTC
Created attachment 145432 [details] [review]
Patch fixing the issues
Comment 5 Lakshmi 2019-09-19 13:46:46 UTC
(In reply to gaurav.k.singh from comment #3)
> Created attachment 145431 [details]
> dmesg

Can you please attach with debug parameters drm.debug=0x1e log_buf_len=4M?
Comment 6 Jose Roberto de Souza 2019-09-19 22:04:28 UTC
I can't find the link but there is a pre-production version of AUO panel that have all kinds of problems with PSR2 and it have the same OUI, dev-ID, HW-rev and SW-rev as the production one.
If I remember correctly the working one have a "v3" sticker, so please make sure if you are using this one.

If so, please give this a try: https://bugs.freedesktop.org/show_bug.cgi?id=111701#c8
Comment 7 gaurav.k.singh 2019-09-20 02:50:38 UTC
Thanks Jose for the patch (attached in comment#6), i will try in sometime and let you know.

Also, i have tried disabling FBC using kernel cmdline parameter as well as hardcoding it in intel_sanitize_fbc_option(), it did not help
Comment 8 gaurav.k.singh 2019-09-20 07:18:30 UTC
Jose, https://bugs.freedesktop.org/show_bug.cgi?id=111701#c8 did not help, all issues still reproducible.
Comment 9 gaurav.k.singh 2019-09-20 09:33:16 UTC
Regarding comment#6, i did not see any "V3" sticker on the AUO panel.
Comment 10 gaurav.k.singh 2019-09-22 13:13:49 UTC
Created attachment 145460 [details] [review]
Patch fixing all the issues on AUO PSR2 panel by forcibly enabling PSR1 on it
Comment 11 gaurav.k.singh 2019-09-22 13:15:57 UTC
Attached a patch in comment#10, where i am forcibly enabling PSR1 on AUO PSR2 panel, then all issues reported in the bug description goes away.
Comment 12 gaurav.k.singh 2019-09-24 15:39:26 UTC
Created attachment 145489 [details] [review]
Set bits 3:0 of PSR2 control reg to 0 only for AUO panel
Comment 13 gaurav.k.singh 2019-09-24 15:40:58 UTC
Setting bits 3:0 of PSR2 control reg to 0

Setting no of idle frames required before entering PSR2
Deep Sleep to 0 helps in resolving issues on AUO PSR2 Panel.

These issues are seen only on AUO PSR2 panel, that's why disabling
only for this panel.

Patch attached in comment#12
Comment 14 Jose Roberto de Souza 2019-09-24 17:25:09 UTC
Setting idles bits to 0 kills 90% of the PSR2 power savings, better fall back to PSR1 then.
Comment 15 Abhishek Kumar 2019-09-24 17:50:25 UTC
Can we set bit 31:30 of PSR_MASK to 11 i.e forcing non idle frame exit deep sleep
Comment 16 Jose Roberto de Souza 2019-09-24 17:56:18 UTC
Bit 31 and 30 controls is PSR2 is enabled and if selective update is enabled.
Disabling selective update is the same as having PSR1 and disabling PSR2 you kill all the power savings and block some package power saving states.
Comment 17 Jose Roberto de Souza 2019-09-24 17:59:38 UTC
Still trying to debug this panel but if you are in hurry, the best solution right now is to fallback to PSR1 but by only checking the panel EDID id, no CML checks or platform name checks.
Comment 18 Abhishek Kumar 2019-09-25 06:51:02 UTC
Created attachment 145509 [details] [review]
patch for setting bits 31:30 of PSR_DEBUG to force non idle frame exit deep sleep
Comment 19 Abhishek Kumar 2019-09-25 06:56:10 UTC
Bit 31:30 of PSR_DEBUG (sorry for confusion in comment#15) to 11 exiting from deep sleep by non idle frames
Comment 20 gaurav.k.singh 2019-09-27 16:10:27 UTC
Hi Jose,

All the above issues are getting resolved after updating the TCON FW on the panel.

Attaching the patches which i have created for updating TCON FW on the AUO Panel. 

Also, listing down the steps for updating the TCON FW on the panel:

Step 1. Build the kernel using the attached patches

Step 2: After that, copy the attached files in the /tmp folder of the DUT

Step 3: Make sure output of below cmd is 'N'
cat /sys/kernel/debug/dri/dpcd_read_once
N

Step 4: Run below command:
echo "Y" > /sys/kernel/debug/dri/dpcd_read_once

Step 5: Run below command
localhost /tmp # python ./tcon_fw_updater.py -v update fw_filename

Step 6: echo "N" > /sys/kernel/debug/dri/dpcd_read_once
Comment 21 gaurav.k.singh 2019-09-27 16:16:38 UTC
Created attachment 145547 [details] [review]
Patch to add debugfs required for updating TCON

Patch to add debugfs required for updating TCON
Comment 22 gaurav.k.singh 2019-09-27 16:21:26 UTC
Created attachment 145548 [details] [review]
Patch to modify drm_dp_dpcd_read to include single read

modify drm_dp_dpcd_read to include single read

Single read is required to satisfy AUX channel sequencing when updating TCON firmware in display panels.
Comment 23 gaurav.k.singh 2019-09-27 16:27:15 UTC
Created attachment 145549 [details] [review]
Patch to enable required configs in kernel required to update TCON FW on AUO PSR2 panel

Enable DRM_KMS_HELPER and DRM_DP_AUX_CHARDEV configs so that
drm_dp_aux nodes are created which will be used for updating the
TCON FW on the panel
Comment 24 gaurav.k.singh 2019-09-27 16:32:18 UTC
Also, I am currently checking the CRC error by running suspend/S0ix stress test, will keep you posted.
Comment 25 Jose Roberto de Souza 2019-09-27 20:49:56 UTC
> Also, I am currently checking the CRC error by running suspend/S0ix stress test, will keep you posted.

If the first block was being ignored the CRC would never match.

Let me know if something is still not properly working after the update.
Comment 26 gaurav.k.singh 2019-10-01 07:25:06 UTC
Jose,

Successfully Completed 2500 iterations of suspend stress tests and S0ix stress tests after updating TCON FW.
Comment 27 Jose Roberto de Souza 2019-10-01 17:01:26 UTC
Awesome, so I'm going to close this issue, okay?
Comment 28 gaurav.k.singh 2019-10-03 17:12:05 UTC
Yes Jose,we can close this issue now. Thanks for your comments.


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.