File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -618,6 +618,14 @@ namespace platf {
618618 }
619619 }
620620
621+ // Skip Nvidia cards if we're looking for VAAPI devices
622+ // This is important for hybrid GPU laptops where the display
623+ // may be connected through NVIDIA but rendering happens on Intel
624+ if (mem_type == mem_type_e::vaapi && card.is_nvidia ()) {
625+ BOOST_LOG (debug) << file << " is an NVIDIA card, skipping for VAAPI" sv;
626+ continue ;
627+ }
628+
621629 auto end = std::end (card);
622630 for (auto plane = std::begin (card); plane != end; ++plane) {
623631 // Skip unused planes
@@ -1623,6 +1631,14 @@ namespace platf {
16231631 }
16241632 }
16251633
1634+ // Skip Nvidia cards if we're looking for VAAPI devices
1635+ // This is important for hybrid GPU laptops where the display
1636+ // may be connected through NVIDIA but rendering happens on Intel
1637+ if (hwdevice_type == mem_type_e::vaapi && card.is_nvidia ()) {
1638+ BOOST_LOG (debug) << file << " is an NVIDIA card, skipping for VAAPI" sv;
1639+ continue ;
1640+ }
1641+
16261642 auto crtc_to_monitor = kms::map_crtc_to_monitor (card.monitors (conn_type_count));
16271643
16281644 auto end = std::end (card);
You can’t perform that action at this time.
0 commit comments