AMD 近20年老 GPU 获 Linux 视频播放修复

一个新近被接纳、计划随即将发布的 Linux 7.5 版本一同推出的内核补丁,终于修复了 AMD 老旧的 R600 架构上长期存在的硬件视频解码缺陷——此时距离这些显卡首次上架销售已过去近二十年。据 Phoronix 发现,该修复针对 RV610、RV620、RV630、RV635 和 RV670 芯片家族中的统一视频解码器(UVD)引擎,这些芯片构成了 2007 年起发布的 Radeon HD 2000 和 HD 3000 系列。使用这些显卡的 Linux 用户在 GPU 同时处理活跃的 3D 或桌面绘图负载时,会在硬件加速视频播放中遇到画面损坏;这些问题如今应已解决。
我调查了我的老款 iMac7,1(RV610/M74,设备 ID 1002:94c8)上的视频损坏问题。当解码器从系统内存读取压缩视频、同时 GPU 正在绘图时,它会损坏视频帧。把输入移到 VRAM 后,帧就能正确解码。禁用图形绘制也能停止损坏。这里提出一个方案:为这一系列设备将 UVD 缓冲区保留在 VRAM 中,就像驱动已经对某些其他芯片所做的那样。该补丁覆盖 RV610、RV620、RV630、RV635 和 RV670。这些芯片共用 RV6xx 解码路径和传统的 R600 固件,所以我认为它们很可能有相同的硬件要求。持有其他硬件的人需要去验证这一点。我在 Debian 上做了测试。我借助 Codex 协助进行调查、测试和打补丁。
Ted Bullock,首次参与内核贡献的开发者
有趣的是,这一突破并非来自开源图形栈中经验丰富的老将,而是出自一位新手——他借助 OpenAI 的 Codex 来帮助理清遗留驱动路径。问题根源最终被查明是内存放置上的疏忽:驱动未能始终把 UVD 输入缓冲区固定在专用 VRAM 中。当图形绘制调用争抢资源时,帧便无法正常解码。通过强制这些缓冲区留在 VRAM 中——Radeon 内核驱动显然已针对其他多个芯片家族采取了这一做法——视频播放便恢复正常。
人们很容易忘记 R600 这一代对 PC 图形有多关键。2007 年推出的 Radeon HD 2000 系列,是 AMD 在重磅收购加拿大 ATI Technologies Inc. 之后,以 AMD 名义打造的第一条桌面 GPU 产品线,它标志着新成立的 AMD 图形部门在桌面端告别分离的像素与顶点管线——此前该技术已率先在 Xbox 360 上落地。向统一着色器架构的转变与 DirectX 10 和 Windows Vista 一同到来,因此那是一个充满多重转型的时期。
尽管旗舰款 Radeon HD 2900 XT 在原始游戏光栅化和功耗上不敌占据主导地位的 Nvidia GeForce 8800 GTX 而广为人知,但 R600 家族在多媒体方面实力不俗。第一代统一视频解码器(UVD)随主流的 RV610 与 RV630 芯片登场,随后经过改进的 RV670 驱动了备受喜爱的 Radeon HD 3850 和 3870,使得即便是预算有限的 PC 也能把繁重的 H.264 与 VC-1 蓝光解码从 CPU 卸载下来。2007 年,无需让双核处理器满载即可流畅播放 1080p,对许多用户来说是一大卖点,而对组建家庭影院 PC(HTPC)的用户而言更是如此。
当然,到了 2026 年,几乎没有人会把 TeraScale 1 显卡当作日常使用的硬件,尤其是现代集成显卡能以几分之一的功耗轻松碾压它们;提交这些补丁的贡献者是为了他那台基于 Core 2 Duo 的老旧 iMac。不过,开源 Linux 驱动的长寿命还是透着一股不动声色的暖意。HD 2000 和 3000 系列的专有 Windows 支持在十多年前就已终止,而主线 Linux 内核仍在接力前行。再加上近来借助 AI 对 Mesa R600 用户态驱动所做的一系列清理工作,老旧 Radeon 硬件如今的软件状况,可以说比它当年在售时还要好。
译文由英文原文机器翻译,术语按行业惯例统一,可在文末展开原文核对。
查看英文原文(Nearly 20 years after launch, ancient AMD Radeon HD 2000 and 3000 GPUs finally get a Linux fix for corrupted video playback)
A newly accepted kernel patch slated for the upcoming Linux 7.5 release finally resolves a long-standing hardware video decoding bug on AMD's ancient R600 architecture, nearly two decades after the cards first hit store shelves. As spotted by Phoronix, the fix targets the Unified Video Decoder (UVD) engine across the RV610, RV620, RV630, RV635, and RV670 silicon families, making up the Radeon HD 2000 and HD 3000 families released starting in 2007. Linux users running these cards experienced visual corruption during hardware-accelerated video playback whenever the GPU was simultaneously handling active 3D or desktop drawing workloads; those issues should now be resolved.
I investigated video corruption on my older iMac7,1 (RV610/M74,device ID 1002:94c8). When the decoder was reading compressed video from system memory while the GPU was drawing, it would corrupt video frames. Moving the input to VRAM allowed frames to decode correctly. Disabling graphics draws also stopped the corruption.Here is a proposal to keep UVD buffers in VRAM for this family of devices, as the driver already does for some other chips. The patch covers RV610, RV620, RV630, RV635 and RV670. These chips share the RV6xx decoder path and legacy R600 firmware, so I think they are likely to have the same hardware requirements. Someone with the other hardware would need to verify that.I tested this on Debian. I used Codex to help with the investigation, testing and patch.
Ted Bullock, first-time kernel contributor
Interestingly, the breakthrough didn't come from a grizzled veteran of the open-source graphics stack, but from a newcomer utilizing OpenAI's Codex to help untangle the legacy driver path. The culprit turned out to be a memory placement oversight: the driver wasn't consistently keeping UVD input buffers pinned inside dedicated VRAM. When graphics draw calls competed for resources, frames failed to decode properly. By forcing those buffers to stay in VRAM — a behavior the Radeon kernel driver apparently already enforced for several other chip families — video playback cleans right up.
It is easy to forget just how pivotal the R600 generation was for PC graphics. Launching in 2007 as the first desktop GPU lineup built under the AMD banner following that firm's blockbuster acquisition of the Canadian ATI Technologies Inc., the Radeon HD 2000 series marked the new AMD graphics division's transition away from separate pixel and vertex pipelines on the desktop, after implementing the tech first for the Xbox 360. The move to a unified shader architecture arrived alongside DirectX 10 and Windows Vista, so it was a time of many transitions.
While the flagship Radeon HD 2900 XT famously struggled against Nvidia's dominant GeForce 8800 GTX in raw gaming rasterization and power draw, the R600 family brought serious multimedia chops to the table. The introduction of the first-generation Unified Video Decoder (UVD) on the mainstream RV610 and RV630 chips, and later the refined RV670 powering the beloved Radeon HD 3850 and 3870, allowed even budget PCs to offload heavy H.264 and VC-1 Blu-ray decoding from the CPU. In 2007, smooth 1080p playback without maxing out a dual-core processor was a major selling point for many users, but none more so than home theater PC (HTPC) builders.
Of course, almost nobody is daily driving a TeraScale 1 graphics card in 2026, especially when modern integrated graphics run circles around them at a fraction of the wattage; the contributor who submitted the patches wants them for his ancient Core 2 Duo-based iMac. Yet, there is something quietly heartwarming about the longevity of open-source Linux drivers. Whereas proprietary Windows support for the HD 2000 and 3000 series was sunsetted over a decade ago, the mainline Linux kernel continues to carry the torch. Combined with recent AI-assisted cleanup efforts across the Mesa R600 user-space driver, vintage Radeon hardware is arguably in better software shape today than it was during its actual retail lifespan.
正文保留英文原文,标题与摘要由机器翻译。
原文发布于 Tom's Hardware(Nearly 20 years after launch, ancient AMD Radeon HD 2000 and 3000 GPUs finally get a Linux fix for corrupted video playback),标题、摘要与正文由机器翻译,术语按行业惯例统一,未经人工逐句校订。
