Skip to content

fix(linux-mt6858): let the display address 34 bits (r26) - #110

Open
patrickjquinn wants to merge 1 commit into
fix/jolla-alsfrom
fix/jolla-ovl-34bit
Open

patrickjquinn wants to merge 1 commit into
fix/jolla-alsfrom
fix/jolla-ovl-34bit

Conversation

@patrickjquinn

Copy link
Copy Markdown
Owner

Jolla e2e 2026-11-28, P2: mediatek-disp-ovl 14003000.ovl: swiotlb buffer is full (sz: 2097152 bytes), about 700 a boot. Stacked on #105 (r25).

Root cause. The DRM device's DMA device is the first OVL. Mainline used the MT8192 data for it, so it got the default 32-bit mask, while the Jolla's 12 GiB of RAM is nearly all above 4 GiB. Every dma-buf the display imported went through SWIOTLB, which bounces at most 256 KiB at a time, and failed.

Fix. Kernel patch 0292 (jp2601/devfix-ovl34) gives the MT6858 OVL its own data:

  • each layer's upper address bits go to DISP_REG_OVL_ADDR_MSB (0x0f4c + 0x20·n), as MediaTek's driver does on its recent SoCs (is_support_34bits);
  • the DMA mask is 34 bits; the stock JP2601 DT gives each OVL 16 GiB of DMA range.

Physically contiguous buffers anywhere in RAM can be scanned out, and the GEM import's contiguity check refuses scattered ones instead of SWIOTLB.

Not done: putting the OVLs behind the MM IOMMU. It removed the messages but broke the panel's picture (garbled, then black) and hung 2 of 3 warm reboots, so the display stays on physical addresses.

On the phone (test kernel built from this series, as a counted boot entry):

  • The user checked the panel by eye: the splash, PIN pad and shell are normal.
  • 0 swiotlb messages after 8 app launches. On r24: 9 after 2 launches.
  • No display errors, and wake from idle-off works.

checkpatch is clean apart from the series' missing Signed-off-by, and the W=1 build is clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BrjN1gf1Fu2w5MqXBmEowh

The display imported every dma-buf through SWIOTLB ("mediatek-disp-ovl
14003000.ovl: swiotlb buffer is full", about 700 a boot): the DRM
device's DMA device is the first OVL, which mainline gave the default
32-bit mask, while the Jolla's 12 GiB of RAM is nearly all above
4 GiB and SWIOTLB bounces at most 256 KiB at a time.

r26 adds 0292 (jp2601/devfix-ovl34): the MT6858 OVLs get their own
data, which writes each layer's upper address bits to
DISP_REG_OVL_ADDR_MSB, as MediaTek's driver does on its recent SoCs,
and a 34-bit DMA mask (the stock device tree gives the OVLs 16 GiB of
DMA range). Putting the OVLs behind the MM IOMMU instead broke the
panel's picture and warm reboots, so the display stays on physical
addresses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant