hisilicon-opensdk: bump to 2a38a27, so a CMA gk7205v500 can stream - #2535
Merged
Merged
Conversation
OpenIPC/openhisilicon#238. dfc3a81..2a38a27 is exactly one commit. With mmz_allocator=cma, the gk7205v500 default since #2526, a GK7205V510 panicked the kernel as soon as a bound VPSS channel delivered its first frame to VENC. Nothing was printed, because the image keeps the console loglevel at 0, and the board rebooted panic= seconds later, so it looked like a hardware reset. The closed venc object reads its bind descriptors with an unaligned ldr.w (VENC_VpssSend+0x10f). osal's CMA allocator mapped non-cached MMBs strongly-ordered, where that load faults in the VPSS interrupt. The carve-out allocator's ioremap_wc() mapping is Normal non-cacheable, where it is legal. osal now maps them write-combined, and also passes __dma_clear_buffer() the coherent flag the kernel expects.
PR Summary by QodoBump openhisilicon to fix CMA streaming on GK7205V500
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can tweak Display settings with a live preview to see your comment before it ships |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
GK7205V510 (Zenointel SD-2N-4G, MIS2008) on
mmz_allocator=cma, the gk7205v500 default since #2526: majestic loggedTimeout from venc channel 0, and once the sensor delivered frames the board rebooted with nothing on the console.It was a kernel panic, hidden by the image's console loglevel of 0 and followed by a reboot
panic=seconds later. Withprintkraised:The closed venc object reads its VPSS-bind descriptors with an unaligned load. osal's CMA allocator mapped non-cached MMBs strongly-ordered, where that load faults. The carve-out allocator (
ioremap_wc, Normal non-cacheable) never hit it. OpenIPC/openhisilicon#238 maps them write-combined, and also passes__dma_clear_buffer()the coherent flag the 4.9 kernel expects.dfc3a81..2a38a27is exactly that one commit.Hardware tested on
GK7205V510, Zenointel SD-2N-4G, MIS2008:
gk7205v500_ultimateNAND image built from this branch (master 77c0d82 + this commit), flashed withsysupgrade --archive. Bootargs at the image default,mem=128M mmz_allocator=cma mmz=anonymous,0,0x42000000,96M.Video on this board also needs its sensor bring-up: lanes
0|1in the MIS2008 ini, and GPIO50 low, which stock does frominit.sh. Both were applied by hand for the test; neither is part of this PR.Evidence
Before (image at dfc3a81): kernel panic within 1 s of the first bound frame, from majestic and from the vendor SPC020
sample_vio:After (this branch's image,
xm_osal.komd5 8805f719 from the image, no overlay):Image sizes:
uImage: [1909KB/2048KB],fitImage: [1911KB/4096KB],rootfs.ubi: [15104KB/16384KB].Scope
general/package/all-patches/linux/(those go to OpenIPC/linux)general/overlay/or in a sharedload_<vendor>script hardcodes a value specific to my boardLD_PRELOAD, and no binaries that cannot be rebuilt from source