Skip to content

Commit

Permalink
Merge #2433
Browse files Browse the repository at this point in the history
2433: eglstream-kms: Retain DRM device access for whole probe. r=AlanGriffiths a=RAOF

Oops. While fixing up #2426 I changed the scope of `device_holder`, so that
it would almost immediately go out of scope. This broke probing on the VT
console provider, as the VT console provider, and *only* the VT console
provider, drops DRM master when you release the `mir::Device`.

Fixes: #2431.

Co-authored-by: Christopher James Halse Rogers <[email protected]>
  • Loading branch information
2 people authored and AlanGriffiths committed May 23, 2022
1 parent 7f7da78 commit c2aba00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/platforms/eglstream-kms/server/platform_symbols.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,12 @@ auto probe_display_platform(
{
// Check we can acquire the device...
mir::Fd drm_fd;
std::unique_ptr<mir::Device> device_holder;
try
{
auto const devnum = mge::devnum_for_device(device);

auto device_holder = console->acquire_device(
device_holder = console->acquire_device(
major(devnum), minor(devnum),
std::make_unique<mgc::OneShotDeviceObserver>(drm_fd)).get();

Expand Down

0 comments on commit c2aba00

Please sign in to comment.