fix(linux/kms): skip NVIDIA cards for VAAPI on hybrid GPU laptops (#4473)

This commit is contained in:
Cole Leavitt 2026-01-25 17:10:11 -07:00 committed by GitHub
commit 38a94b3cfd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -618,6 +618,14 @@ namespace platf {
}
}
// Skip Nvidia cards if we're looking for VAAPI devices
// This is important for hybrid GPU laptops where the display
// may be connected through NVIDIA but rendering happens on Intel
if (mem_type == mem_type_e::vaapi && card.is_nvidia()) {
BOOST_LOG(debug) << file << " is an NVIDIA card, skipping for VAAPI"sv;
continue;
}
auto end = std::end(card);
for (auto plane = std::begin(card); plane != end; ++plane) {
// Skip unused planes
@ -1623,6 +1631,14 @@ namespace platf {
}
}
// Skip Nvidia cards if we're looking for VAAPI devices
// This is important for hybrid GPU laptops where the display
// may be connected through NVIDIA but rendering happens on Intel
if (hwdevice_type == mem_type_e::vaapi && card.is_nvidia()) {
BOOST_LOG(debug) << file << " is an NVIDIA card, skipping for VAAPI"sv;
continue;
}
auto crtc_to_monitor = kms::map_crtc_to_monitor(card.monitors(conn_type_count));
auto end = std::end(card);