Issue #3498 has been reported by sigttou. ---------------------------------------- Bug #3498: i915: init_phys_status_page() uses page_address() as a kernel address (gen2, i915/i945/i965 chips) http://bugs.dragonflybsd.org/issues/3498
* Author: sigttou * Status: New * Priority: Normal * Target version: 6.6 * Start date: 2026-12-04 ---------------------------------------- @page_address()@ returns the physical address of a page, not a kernel virtual address (@sys/dev/drm/include/linux/mm.h@). Since the update to Linux 4.20, @init_phys_status_page()@ in @sys/dev/drm/i915/intel_engine_cs.c@ stores that value as @status_page.page_addr@, the CPU reads and writes the status page through it, and @ring_setup_phys_status_page()@ in @intel_ringbuffer.c@ runs @virt_to_page()@ and @page_to_pfn()@ on it. On the chips whose hardware status page has to be physical (gen2, i915G/GM, i945G/GM and i965G/GM; G33, Pineview, G45/GM45 and later do not use it) the driver then faults or programs @HWS_PGA@ with a bogus address. That is from reading the code. @alloc_page()@ also ignores @__GFP_DMA32@, which this allocation relied on. Fix: the attached patch is szi's @intel_dmah.patch@ (https://leaf.dragonflybsd.org/~szi/patches/intel_dmah.patch) with a commit message added. It allocates the page with @drm_pci_alloc()@ as before 24ca31b4b3, keeps the handle in @dev_priv->status_page_dmah@, programs @HWS_PGA@ from its bus address and frees it with @drm_pci_free()@. ThinkPad X61 Tablet (965GM): X and video playback work with it. Patch by: @servizig Reporter: @vjkarbo ---Files-------------------------------- 0001-drm-i915-allocate-the-physical-status-page-with-drm_.patch (3.65 KB) -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
