今日重点:✍️ 写作——今天凌晨 linux-media 收到一份少见的 BUG 报告: ASUS Zenbook A16 + Snapdragon X2 Elite 平台上,ffmpeg 的 V4L2 解码器跑一帧就死。 作者 Christian Cortner 开篇就坦白「我不是内核开发者」,靠 AI 助手追出 5 个驱动问题、 写成 5 段短文。6 小时 22 分后,维护者 Bryan O'Donoghue 主动回复: 「把代码贴出来,我们帮你收尾」。这份报告每一段的写法都值得学——它把维护者的判断成本压到了最低。
✍️ 写作:开篇段 · 一段写完环境/症状/路线图
/ section〔10-27 00:09 北京〕· Christian Cortner · linux-media · 原文
On an ASUS Zenbook A16 (UX3607OA, Snapdragon X2 Elite / glymur), ffmpeg's h264_v4l2m2m decoder outputs one corrupted frame and stops, on every stream I tried. GStreamer's V4L2 decoders work. Below are the two driver behaviours behind it (1 and 2), two more that stop ffmpeg at a resolution change in the middle of a stream (3 and 4), and an inconsistent CAPTURE format that ffmpeg happens to avoid (5).
I'm not a kernel developer. I tracked this down with an AI coding assistant (Claude, by Anthropic): it traced the driver, wrote a small V4L2 test client and tried changes to the driver. Everything below was run on this laptop, and each local change described made its problem go away here. I can't review or defend kernel patches myself, so I'm reporting the problems instead of sending fixes, but I'm glad to test patches on this machine.
两段话,不到 200 词,但已经回答了维护者脑海里的全部前置问题:在什么硬件上?什么症状?影响多广?你是谁?数据可信吗?你能帮什么忙?下面把这份报告拆成五个可复用的写作动作。
动作①:Subject 把整条线索塞进一行
/ column★ 标签 + 子系统 + 触发条件 + 症状 + 平台,五件套
[BUG] media: iris: resolution change handling stops ffmpeg's h264_v4l2m2m decoder on glymur [BUG]=这不是补丁,别走 review 流程 | media: iris:=子系统+驱动 | resolution change handling=触发条件 | stops ffmpeg's h264_v4l2m2m decoder=可观察症状(精确到具体客户端的具体组件,不写「broken」)| on glymur=平台代号 🔗 原文
动作②:披露段 · 坦白身份、说清边界、提供帮助
/ column★ 「我不是内核开发者」不但不扣分,反而是加分项
I'm not a kernel developer. ... I can't review or defend kernel patches myself, so I'm reporting the problems instead of sending fixes, but I'm glad to test patches on this machine. Documentation/process/generated-content.rst);第三句划能力边界——「我不能 review 也不能 defend」;第四句提供帮助——「但我可以在这台机器上测补丁」。 🔗 原文
动作③:环境段 · 精确到哈希、版本、补丁栈
/ column★ 不写「最新内核」,写「tree 在哪个 commit」
Setup: the linux-msm laptops tree at 65f4ae7320b8 (v7.3-rc7), ... Firmware: video-firmware 3.6 (aeb98f00ce9f) from the Windows driver package. ffmpeg 8.1.3, GStreamer 1.28.8. 65f4ae7320b8)+ 最近 tag(v7.3-rc7);固件写到版本号 + 固件 blob 的哈希(aeb98f00ce9f);用户空间组件写到小版本(ffmpeg 8.1.3)。还交代了「叠加了哪些补丁」—— Iris 的 5 个前置补丁一一列出。 git rev-parse HEAD 输出 abc123」,可复现性立刻从 0 拉到 1。 🔗 原文
动作④:问题段 · 症状→机制→数字→修法 四拍
/ column★ 每个问题独立成段,一段一个 bug
Setting the OUTPUT format updates the CAPTURE width and height (8aadfd445373) but not bytesperline and sizeimage, which keep their 320x240 defaults on a new instance. For a 640x360 stream, G_FMT(CAPTURE) then reports 640x384 NV12 with a sizeimage of 147456, and iris_vb2_buf_prepare() rejects CAPTURE buffers smaller than 368640 bytes... Recomputing both fields as S_FMT(CAPTURE) does fixed it here. 8aadfd445373)都引上;第 2 拍·数字:640x360 流被报告成 640x384、sizeimage 147456、驱动拒绝小于 368640 的 buffer——具体数字,不是「大小不对」;第 3 拍·谁不受影响:ffmpeg 自己 set 格式所以没事(划范围);第 4 拍·修法:一句话说完本地怎么修的。 🔗 原文
动作⑤:不收尾——问题说完就停
/ column★ 没有 Thanks 段、没有 Looking forward、没有敬语
🔗 原文
📮 6 小时 22 分后,维护者回了什么
/ section〔10-27 06:31 北京〕· Bryan O'Donoghue(bod@kernel.org)· linux-media · 原文
Err thanks for the bug report but, if you have a test-case and a resolution - even of the code sucks and/or you don't understand it, please post the code.
One of us can take up the task of finishing it off.
After all we are burning down the rainforest for this stuff so no sense in wasting the already spent compute time and power.
维护者没有因为「AI 辅助」「非内核开发者」推开这份报告,反而主动让他把代码贴出来——即使代码烂、即使作者不懂。 第二句更直接:One of us can take up the task of finishing it off——「我们中有人会接手把它做完」。 最后一句是个黑色幽默:AI 算力已经烧掉了(烧了雨林),就别浪费已经产出的调试成果。 这是 2026 年内核社区对 AI 辅助贡献的真实态度样本——问题定位做得扎实,社区就愿意接手收尾。
✨ 辅助彩蛋 · 术语卡
/ section★ DRC(Dynamic Resolution Change,动态分辨率切换)
The note in step 3 of the Initialization sequence says: "If the values configured by the client do not match those parsed by the decoder, a Dynamic Resolution Change will be triggered to reconfigure them." dev-decoder.rst)的核心机制。 🔗 原文
✍️ 今日练习
/ column💡 显示答案
Write the bug report you would want to receive — hardware, symptom, roadmap, disclosure, numbers, fix.
素材:lore.kernel.org linux-media · iris glymur BUG 报告(Christian Cortner 〔10-27 00:09 北京〕+ Bryan O'Donoghue 〔06:31 北京〕)· 内核英语 · 每日一篇