Fix host video wake up failure issue
Mouse and Keyboard wake up event were being sent only when an
error happens while opening the video dev entry so KVM service
can't wake up the host video. To fix this issue, this commit makes
video::start send the wake up packet always at the beginning of
video streaming.
Change-Id: I1004b7a3cc552d210080a12157e66233b33293bf
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
diff --git a/ikvm_video.cpp b/ikvm_video.cpp
index 0274967..39947c6 100644
--- a/ikvm_video.cpp
+++ b/ikvm_video.cpp
@@ -378,21 +378,17 @@
return;
}
+ input.sendWakeupPacket();
+
fd = open(path.c_str(), O_RDWR);
if (fd < 0)
{
- input.sendWakeupPacket();
-
- fd = open(path.c_str(), O_RDWR);
- if (fd < 0)
- {
- log<level::ERR>("Failed to open video device",
- entry("PATH=%s", path.c_str()),
- entry("ERROR=%s", strerror(errno)));
- elog<Open>(
- xyz::openbmc_project::Common::File::Open::ERRNO(errno),
- xyz::openbmc_project::Common::File::Open::PATH(path.c_str()));
- }
+ log<level::ERR>("Failed to open video device",
+ entry("PATH=%s", path.c_str()),
+ entry("ERROR=%s", strerror(errno)));
+ elog<Open>(
+ xyz::openbmc_project::Common::File::Open::ERRNO(errno),
+ xyz::openbmc_project::Common::File::Open::PATH(path.c_str()));
}
memset(&cap, 0, sizeof(v4l2_capability));