Regression related to DSC on JSL Chromebook
We've encountered some regressions (IGT failures, blank screen) on a JSL based Chromebook with a particular panel. After debugging and bisecting, we've found that the regressions start occurring from 265bb1cbe3d69 drm/i915/vdsc: Add function to write in PPS register
.
The change in question looks like it's supposed to be a no-op, but I dumped out the register/value being written to from within intel_dsc_pps_configure
, and found that the register for PPS 16 was (inadvertently?) changed with the refactor.
Before the change, the register written to for PPS16 is defined as:
#define DSCA_PICTURE_PARAMETER_SET_16 _MMIO(0x6B270)
After the change, the register written to for PPS16 is calculated through DSCA_PPS(16)
to 0x0006b240
per:
#define DSCA_PPS(pps) _MMIO(_DSCA_PPS_0 + (pps) * 4)
#define _DSCA_PPS_0 0x6B200
The previous value of 0x6B270
corresponds to DSCA_PPS(0x1c)
so I tried changing the relevant calls to intel_dsc_write_pps_reg
and intel_dsc_read_and_verify_pps_reg
to use 0x1c
instead of 16
, and the tests passed and related drm error logs went away as well.
Is it expected for that change to affect the address of the PPS 16 register?
A few other notes that may be relevant:
- We have multiple JSL Chromebooks, but AFAICT this is the only one that was regressed by this change
- the affected chromebook has a MIPI display
- I haven't been able to run any tests on latest upstream stable due to a bootloop from an unrelated failure, but after booting the device survives long enough that I can verify that related DRM error logs go away after I make the
0x1c
change as referenced above.
Example error message that is correlated to the test failures and display regressions:
[ 4.904064] i915 0000:00:02.0: [drm] *ERROR* [CRTC:98:pipe A] mismatch in dsc.config.slice_chunk_size (expected 1600, found 2176)
[ 4.904074] ------------[ cut here ]------------
[ 4.904076] pipe state doesn't match!
[ 4.904092] WARNING: CPU: 0 PID: 433 at drivers/gpu/drm/i915/display/intel_modeset_verify.c:220 intel_modeset_verify_crtc+0x375/0x3a7
[ 4.904098] Modules linked in: btusb btrtl btintel btmtk btbcm bluetooth ecdh_generic ecc joydev
[ 4.904109] CPU: 0 PID: 433 Comm: frecon Tainted: G U 6.1.74-09529-g9c60ae9d8d01 #1 0454e17af5796fb0926aa5fbcc19b8f2d17c56be
[ 4.904114] Hardware name: Google Bugzzy/Bugzzy, BIOS Google_Bugzzy.13606.533.3 03/21/2023
[ 4.904116] RIP: 0010:intel_modeset_verify_crtc+0x375/0x3a7
[ 4.904121] Code: 8b 11 48 c7 c7 ba 5f d1 b3 48 89 c6 44 89 f1 45 89 e0 e8 51 44 97 ff 0f 0b e9 f4 fe ff ff 48 c7 c7 1e d7 c8 b3 e8 3e 44 97 ff <0f> 0b e9 0b ff ff ff e8 f8 85 57 00 48 c7 c7 ca 71 c9 b3 e8 26 44
[ 4.904124] RSP: 0018:ffff9c9bc198fa50 EFLAGS: 00010246
[ 4.904127] RAX: 3b5ddee7a1883900 RBX: ffff9b888c5dc000 RCX: ffffffffb4460108
[ 4.904129] RDX: 0000000000000000 RSI: 00000000ffffdfff RDI: 0000000000000001
[ 4.904132] RBP: ffff9c9bc198fab0 R08: 0000000000000000 R09: ffff9c9bc198f8b0
[ 4.904134] R10: 00000000ffffdfff R11: ffffffffb44903b0 R12: ffff9b8881b2e000
[ 4.904137] R13: 0000000000000001 R14: ffff9b8881abf000 R15: ffff9b8881ac8000
[ 4.904139] FS: 00007888431bb740(0000) GS:ffff9b88fc000000(0000) knlGS:0000000000000000
[ 4.904142] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 4.904145] CR2: 00005b10321389e8 CR3: 0000000105860000 CR4: 0000000000350ef0
[ 4.904147] Call Trace:
[ 4.904151] <TASK>
[ 4.904155] ? __warn+0xa4/0x155
[ 4.904159] ? intel_modeset_verify_crtc+0x375/0x3a7
[ 4.904162] ? report_bug+0xd5/0x16a
[ 4.904168] ? handle_bug+0x41/0x67
[ 4.904171] ? exc_invalid_op+0x1b/0x4c
[ 4.904174] ? asm_exc_invalid_op+0x16/0x20
[ 4.904178] ? intel_modeset_verify_crtc+0x375/0x3a7
[ 4.904182] intel_atomic_commit_tail+0xd5e/0xedf
[ 4.904187] ? wake_bit_function+0x31/0x31
[ 4.904190] ? wake_bit_function+0x31/0x31
[ 4.904194] intel_atomic_commit+0x312/0x354
[ 4.904197] drm_atomic_commit+0xe8/0x10d
[ 4.904202] ? __drm_printfn_debug_syslog+0x1d/0x1d
[ 4.904205] drm_mode_atomic_ioctl+0x35e/0x482
[ 4.904210] ? drm_atomic_set_property+0x986/0x986
[ 4.904214] drm_ioctl_kernel+0xdd/0x153
[ 4.904218] drm_ioctl+0x29f/0x422
[ 4.904221] ? drm_atomic_set_property+0x986/0x986
[ 4.904225] __se_sys_ioctl+0x78/0xbc
[ 4.904230] do_syscall_64+0x4e/0x9b
[ 4.904234] ? exit_to_user_mode_prepare+0x6c/0x85
[ 4.904237] entry_SYSCALL_64_after_hwframe+0x5e/0xc8
[ 4.904241] RIP: 0033:0x788843371029
[ 4.904245] Code: 04 25 28 00 00 00 48 89 45 c8 31 c0 48 8d 45 10 c7 45 b0 10 00 00 00 48 89 45 b8 48 8d 45 d0 48 89 45 c0 b8 10 00 00 00 0f 05 <41> 89 c0 3d 00 f0 ff ff 77 1d 48 8b 45 c8 64 48 2b 04 25 28 00 00
[ 4.904248] RSP: 002b:00007fff6df64250 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 4.904251] RAX: ffffffffffffffda RBX: 00007fff6df64310 RCX: 0000788843371029
[ 4.904254] RDX: 00007fff6df64310 RSI: 00000000c03864bc RDI: 0000000000000007
[ 4.904256] RBP: 00007fff6df642a0 R08: 0000000000000104 R09: 000059efdb2d1f40
[ 4.904258] R10: 0000000000000000 R11: 0000000000000246 R12: 000059efdb47bbc0
[ 4.904260] R13: 0000000000000000 R14: 00000000c03864bc R15: 0000000000000007
[ 4.904263] </TASK>
[ 4.904265] ---[ end trace 0000000000000000 ]---