From 969f7cf071dda5f1a9392cc2b45e1dc5ef544e42 Mon Sep 17 00:00:00 2001 From: Zhao Yakui Date: Mon, 5 Nov 2018 11:32:59 +0800 Subject: [PATCH] DM:Check the device file of /dev/vbs_ipu to determine IPU mode The /dev/vbs_ipu is used as the backend driver of IPU mediator on SOS kernel. If the file of /dev/vbs_ipu exists, it indicates that IPU works in mediator mode. Other it will fall back to the pass-through mode. Tracked-on: https://github.com/projectacrn/acrn-hypervisor/issues/1373 Signed-off-by: Zhao Yakui Reviewed-by: Binbin Wu --- devicemodel/samples/apl-mrb/launch_uos.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devicemodel/samples/apl-mrb/launch_uos.sh b/devicemodel/samples/apl-mrb/launch_uos.sh index c1d16a234..85d7b46ac 100755 --- a/devicemodel/samples/apl-mrb/launch_uos.sh +++ b/devicemodel/samples/apl-mrb/launch_uos.sh @@ -5,8 +5,8 @@ kernel_version=$(uname -r | awk -F. '{ printf("%d.%d", $1,$2) }') ipu_passthrough=0 -# this is the temporal solution before IPU is ready on 4.19 -if [ "$kernel_version" = "4.19" ]; then +# Check the device file of /dev/vbs_ipu to determine the IPU mode +if [ ! -f "/dev/vbs_ipu" ]; then ipu_passthrough=1 fi