From 309570872cb989d5530d7a7a60ac0d9d5581f056 Mon Sep 17 00:00:00 2001 From: Roman Kovalivskyi Date: Thu, 21 Nov 2019 17:15:02 +0200 Subject: drm_hwcomposer: Remove redundant hotplug call Initial hotplug state is reported back during callback registration, but during VTS tests we've noticed error that is caused by calling hotplug with same display twice. HandleInitialHotplugState calls hotplug function for each connected display, so it covers HWC_DISPLAY_PRIMARY too, therefore first call should be removed, as it is redundant and causes minor error. Signed-off-by: Roman Kovalivskyi --- drmhwctwo.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/drmhwctwo.cpp b/drmhwctwo.cpp index 33ad0fb..2b7f684 100644 --- a/drmhwctwo.cpp +++ b/drmhwctwo.cpp @@ -203,9 +203,6 @@ HWC2::Error DrmHwcTwo::RegisterCallback(int32_t descriptor, switch (callback) { case HWC2::Callback::Hotplug: { - auto hotplug = reinterpret_cast(function); - hotplug(data, HWC_DISPLAY_PRIMARY, - static_cast(HWC2::Connection::Connected)); auto &drmDevices = resource_manager_.getDrmDevices(); for (auto &device : drmDevices) HandleInitialHotplugState(device.get()); -- cgit v1.2.3