On Thu, Jun 11, 2020 at 11:07:11AM +0100, Laurence Tratt wrote: > The recent DRM update has fixed one long-ish-standing bug for me where Xorg > sometimes would get stuck while executing Xsession (I could never work out > why) which is really good! > > However I've now had the following kernel panic several times: > > kernel: page fault trap, code=0 > Stopped at intel_partial_pages+0xf4: moq 0x58,%rsi > > Unfortunately that also seems to take out my keyboard at ddb so I have no > further information beyond my dmesg :/
Try this, the code in question does sg_set_page(sg, NULL, I915_GTT_PAGE_SIZE, 0); sg_dma_address(sg) = i915_gem_object_get_dma_address(obj, src_idx); sg_dma_len(sg) = I915_GTT_PAGE_SIZE; VM_PAGE_TO_PHYS() will attempt to deref NULL. Index: sys/dev/pci/drm/include/linux/scatterlist.h =================================================================== RCS file: /cvs/src/sys/dev/pci/drm/include/linux/scatterlist.h,v retrieving revision 1.2 diff -u -p -r1.2 scatterlist.h --- sys/dev/pci/drm/include/linux/scatterlist.h 8 Jun 2020 04:48:15 -0000 1.2 +++ sys/dev/pci/drm/include/linux/scatterlist.h 11 Jun 2020 10:54:05 -0000 @@ -115,7 +115,8 @@ sg_set_page(struct scatterlist *sgl, str unsigned int length, unsigned int offset) { sgl->__page = page; - sgl->dma_address = VM_PAGE_TO_PHYS(page); + if (page != NULL) + sgl->dma_address = VM_PAGE_TO_PHYS(page); sgl->offset = offset; sgl->length = length; sgl->end = false;