aarch64-laptops / build

Build an Linux OS based image
221 stars 47 forks source link

GPU rendering stall on Lenovo Yoga C630 WOS #32

Closed RussianNeuroMancer closed 4 years ago

RussianNeuroMancer commented 4 years ago

Hello!

Today while browsing Steam store in Firefox (with enabled hardware acceleration) on Lenovo Yoga C630 WOS with Linux 5.3.2 (with patches and build config from gpu branch) rendering stop working, i.e. mutter froze, cursor doesn't move, switching to other VT doesn't work.

Relevant part from dmesg:

[15987.071656] WARNING: CPU: 6 PID: 934 at drivers/gpu/drm/msm/msm_gem_vma.c:37 msm_gem_purge_vma+0x60/0x68 [msm]
[15987.071659] Modules linked in: xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp fuse ip6table_mangle ip6table_nat iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv4 ip6table_filter ip6_tables iptable_filter bridge stp llc dm_mod uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 rt2800usb rt2800lib videobuf2_common crc_ccitt rt2x00usb videodev mc rt2x00lib crct10dif_ce msm ath10k_snoc ath10k_core mac80211 hid_multitouch ti_sn65dsi86 reset_qcom_pdc libarc4 ath cfg80211 qcom_q6v5_mss qrtr qcom_q6v5_pas qcom_sysmon qcom_q6v5 qmi_helpers mdt_loader qcom_common qcom_glink_smem remoteproc ip_tables x_tables ipv6 nf_defrag_ipv6 btrfs libcrc32c xor xor_neon zstd_decompress zstd_compress raid6_pq i2c_qcom_geni
[15987.071702] CPU: 6 PID: 934 Comm: kswapd0 Not tainted 5.3.2 #1
[15987.071704] Hardware name: LENOVO 81JL/LNVNB161216, BIOS 9UCN33WW(V2.06) 06/ 4/2019
[15987.071708] pstate: 40c00005 (nZcv daif +PAN +UAO)
[15987.071725] pc : msm_gem_purge_vma+0x60/0x68 [msm]
[15987.071742] lr : msm_gem_purge_vma+0x60/0x68 [msm]
[15987.071744] sp : ffff00001337ba00
[15987.071745] x29: ffff00001337ba00 x28: 000000000000017c 
[15987.071747] x27: ffffca992fec0f00 x26: ffff00001337bbe8 
[15987.071750] x25: ffff00001337bbe8 x24: ffff490287977ac0 
[15987.071752] x23: dead000000000100 x22: dead000000000122 
[15987.071753] x21: ffffca980bd41dc0 x20: ffffca980bd41d10 
[15987.071755] x19: ffffca98a1223b00 x18: 0000000000000010 
[15987.071757] x17: 0000000000000000 x16: ffff4902f0d9678c 
[15987.071758] x15: ffffffffffffffff x14: ffff4902f238b6c8 
[15987.071760] x13: ffff00009337b777 x12: ffff00001337b780 
[15987.071761] x11: ffff4902f23a4000 x10: ffff00001337b700 
[15987.071763] x9 : 00000000ffffffd0 x8 : ffff4902f1281e78 
[15987.071764] x7 : 0000000000000532 x6 : ffffca993b8c21d8 
[15987.071766] x5 : ffffca993b8c21d8 x4 : 0000000000000000 
[15987.071768] x3 : ffffca993b8c9118 x2 : 0f047b1c4af1d100 
[15987.071769] x1 : 0000000000000000 x0 : 0000000000000024 
[15987.071771] Call trace:
[15987.071789]  msm_gem_purge_vma+0x60/0x68 [msm]
[15987.071806]  put_iova+0x74/0xc8 [msm]
[15987.071823]  msm_gem_purge+0x9c/0x158 [msm]
[15987.071839]  msm_gem_shrinker_scan+0x124/0x190 [msm]
[15987.071848]  do_shrink_slab+0x13c/0x248
[15987.071850]  shrink_slab+0xb4/0x2c8
[15987.071852]  shrink_node+0xd8/0x4d0
[15987.071854]  balance_pgdat+0x2c8/0x558
[15987.071856]  kswapd+0x1d4/0x380
[15987.071861]  kthread+0x12c/0x130
[15987.071866]  ret_from_fork+0x10/0x18
[15987.071868] ---[ end trace 9c65bcdece34d055 ]---

Full dmesg

Ubuntu 19.10 with today updates. Firefox 69.0.1 Mesa 19.2.0

P.S. On the bright side, at this moment this issue happened once, which already much, much more stable than Adreno driver for Windows.

RussianNeuroMancer commented 4 years ago

dmesg

Another case of probably same issue, this time just in Gnome Terminal. As this doesn't happen at all with 5.3rc1 and starting to happen when I start using 5.3.2 with patches from gpu branch, this is probably related to same change between rc1 and .2 release

klardotsh commented 4 years ago

On a related note.... do you mind pushing up that kernel tree somewhere? I'd love to try to boot it on my C630 running Void (right now I can somewhat boot 5.3.0-rc6 from mainline-plus-minimal but the screen turns off 30 seconds after booting)

RussianNeuroMancer commented 4 years ago

Just clone linux tree, checkout gpu branch, run git format-patch 5f9e832c137075045d15cd6899ab0505cfb2ca4b and then remove patch number 25 ("drm/msm: stop abusing dma_map/unmap for cache ") as this already should be fixed in upstream: https://github.com/torvalds/linux/commit/0036bc73ccbe7e600a3468bf8e8879b122252274 https://github.com/torvalds/linux/commit/3de433c5b38af49a5fc7602721e2ab5d39f1e69c

Result patchset cleanly apply to stable releases of Linux 5.3.

lag-linaro commented 4 years ago

(right now I can somewhat boot 5.3.0-rc6 from mainline-plus-minimal but the screen turns off 30 seconds after booting)

This is a regulator issue and is fixed in v5.4.

I forget which regulator it is, but if you mark them all as regulator-always-on it will stop happening.

RussianNeuroMancer commented 4 years ago

Title edited as per this comment (issue is not isolated to Firefox usage)

RussianNeuroMancer commented 4 years ago

So far this issue is not reproducible on Linux 5.5.