5.9: etnaviv oops when using external screen
Sometimes when using an external screen the whole graphical session hangs with this in dmesg:
[ 823.123442] Unable to handle kernel paging request at virtual address 0000736b72697589
[ 823.131534] Mem abort info:
[ 823.134470] ESR = 0x96000004
[ 823.137697] EC = 0x25: DABT (current EL), IL = 32 bits
[ 823.143124] SET = 0, FnV = 0
[ 823.146236] EA = 0, S1PTW = 0
[ 823.149544] Data abort info:
[ 823.152527] ISV = 0, ISS = 0x00000004
[ 823.156422] CM = 0, WnR = 0
[ 823.159483] user pgtable: 4k pages, 48-bit VAs, pgdp=00000000de3f9000
[ 823.166049] [0000736b72697589] pgd=0000000000000000, p4d=0000000000000000
[ 823.173027] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[ 823.178602] Modules linked in: hid_magicmouse usbhid aes_ce_ccm rfcomm bnep iptable_mangle xt_CHECKSUM xt_tcpudp iptable_nat xt_comment xt_MASQUERADE nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c bridge stp iptable_filter nf_tables nfnetlink binfmt_misc rsi_sdio rsi_91x mousedev caam_jr caamhash_desc caamalg_desc uas crypto_engine bluetooth hantro_vpu(C) v4l2_h264 videobuf2_dma_contig mac80211 aes_ce_blk v4l2_mem2mem crypto_simd videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 crct10dif_ce ghash_ce videobuf2_common sha2_ce usb_storage videodev sha1_ce snd_soc_simple_card pwm_vibra snd_soc_simple_card_utils mc st_lsm6dsx_spi snd_soc_gtm601 ofpart bq25890_charger cfg80211 spi_nor snd_soc_wm8962 usb_f_eem leds_lm3692x mtd edt_ft5x06 gnss_mtk gnss_serial vcnl4000 st_lsm6dsx_i2c st_lsm6dsx snd_soc_fsl_sai industrialio_triggered_buffer tps6598x imx_pcm_dma leds_lm3560 gnss kfifo_buf typec snd_soc_core caam snd_pcm_dmaengine error snd_pcm snd_timer snd soundcore snvs_pwrkey
[ 823.178706] imx2_wdt imx_sdma watchdog virt_dma ledtrig_timer g_ether usb_f_rndis u_ether libcomposite ledtrig_pattern ip_tables x_tables ipv6 xhci_plat_hcd xhci_hcd usbcore imx_dcss phy_fsl_imx8mq_usb cdns_mhdp_imx cdns_mhdp_drmcore dwc3 ulpi udc_core roles usb_common clk_bd718x7
[ 823.290586] CPU: 0 PID: 666 Comm: phoc Tainted: G C 5.9.0-1-librem5 #1
[ 823.298416] Hardware name: Purism Librem 5r3 (DT)
[ 823.303120] pstate: 60000005 (nZCv daif -PAN -UAO BTYPE=--)
[ 823.308701] pc : etnaviv_iommu_unmap.isra.4+0x60/0xa0
[ 823.313752] lr : etnaviv_iommu_unmap_gem+0xb8/0xd0
[ 823.318540] sp : ffff800013093b50
[ 823.321852] x29: ffff800013093b50 x28: ffff800013093d98
[ 823.327164] x27: 0000000000000000 x26: ffff000060fc77b0
[ 823.332475] x25: dead000000000100 x24: ffff800011e01000
[ 823.337787] x23: ffff0000a414e988 x22: 0000000000000000
[ 823.343100] x21: 00000000fe4f7000 x20: 6f00736b72697571
[ 823.348411] x19: ffff00006529ce00 x18: 0000000000000000
[ 823.353721] x17: 0000000000000000 x16: 0000000000000000
[ 823.359033] x15: 0000000000000000 x14: 0000000000000000
[ 823.364344] x13: 0000000000000000 x12: 0000000000000000
[ 823.369654] x11: 0000000000000040 x10: ffff0000a51c1840
[ 823.374966] x9 : ffff8000107a1038 x8 : ffff000086bda6a8
[ 823.380277] x7 : ffffffffffff7880 x6 : 0000000000000000
[ 823.385588] x5 : ffff8000107675b4 x4 : 0000000000000000
[ 823.390899] x3 : ffff0000a414e988 x2 : 6f00736b72697571
[ 823.396210] x1 : 00000000fe4f7000 x0 : 000000000000006e
[ 823.401523] Call trace:
[ 823.403974] etnaviv_iommu_unmap.isra.4+0x60/0xa0
[ 823.408677] etnaviv_iommu_unmap_gem+0xb8/0xd0
[ 823.413121] etnaviv_gem_free_object+0xb4/0x150
[ 823.417653] drm_gem_object_free+0x44/0x50
[ 823.421752] drm_gem_object_handle_put_unlocked+0xec/0xf0
[ 823.427151] drm_gem_object_release_handle+0x78/0xa8
[ 823.432116] drm_gem_handle_delete+0x70/0xc8
[ 823.436389] drm_gem_close_ioctl+0x3c/0x48
[ 823.440488] drm_ioctl_kernel+0xc8/0x118
[ 823.444410] drm_ioctl+0x24c/0x498
[ 823.447813] __arm64_sys_ioctl+0xb0/0xf0
[ 823.451741] el0_svc_common.constprop.3+0x94/0x178
[ 823.456531] do_el0_svc+0x24/0x30
[ 823.459846] el0_sync_handler+0x148/0x1a8
[ 823.463853] el0_sync+0x158/0x180
[ 823.467171] Code: 110006d6 0b1302b5 6b16001f 54000169 (b9401a93)
[ 823.473269] ---[ end trace 9744b3c26bbaa26a ]---