diff options
author | Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> | 2019-03-15 15:21:51 -0700 |
---|---|---|
committer | Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> | 2019-03-22 12:44:50 -0700 |
commit | f6ed0e75b05b573345e4f3eb9d80e677f98992ac (patch) | |
tree | e66b0bbf8a45dfd6c5d0327ba48c720b3334550e | |
parent | 0049bfac6f538c89b75d23c42d094a883c55b881 (diff) | |
download | obmc-ikvm-f6ed0e75b05b573345e4f3eb9d80e677f98992ac.tar.gz obmc-ikvm-f6ed0e75b05b573345e4f3eb9d80e677f98992ac.zip |
Restart video when mode detection is failed
KVM sometimes stops when video mode is changed. This commit adds
video restarting logic for the case.
Tested:
1. Open BMCWeb -> Server control -> KVM
2. Checked KVM screen update while restarting the host. It
updates all frames even when video mode changes happen.
Change-Id: If986394110986e49a6eaac1ae2859208fa7681f5
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
-rw-r--r-- | ikvm_video.cpp | 1 | ||||
-rw-r--r-- | ikvm_video.hpp | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/ikvm_video.cpp b/ikvm_video.cpp index ed5ed92..0274967 100644 --- a/ikvm_video.cpp +++ b/ikvm_video.cpp @@ -155,6 +155,7 @@ bool Video::needsResize() { log<level::ERR>("Failed to query timings", entry("ERROR=%s", strerror(errno))); + restart(); return false; } diff --git a/ikvm_video.hpp b/ikvm_video.hpp index 0e5f3af..faaa57d 100644 --- a/ikvm_video.hpp +++ b/ikvm_video.hpp @@ -50,6 +50,12 @@ class Video void start(); /* @brief Stops streaming from the video device */ void stop(); + /* @brief Restarts streaming from the video device */ + void restart() + { + stop(); + start(); + } /* * @brief Gets the desired video frame rate in frames per second |