From 86661e36e51006afabaff3a224c147a8cd47eb82 Mon Sep 17 00:00:00 2001 From: Jianghua Wang Date: Thu, 15 Mar 2018 08:12:12 +0000 Subject: [PATCH] GPU: define traits for maximum display heads Some virtual GPUs support specific maximum display heads (or called as display outputs). This commit is to define traits for display heads, so that it's able to associate the supported maximum display heads to vGPU resource providers and it can schedule resource providers based on the allowed maximum number of display heads. Change-Id: Ie2b2aca4c00f7b7e01de2eb0455cb180f5e42e3b Reference: http://docs.nvidia.com/grid/5.0/pdf/grid-vgpu-user-guide.pdf --- os_traits/hw/gpu/max_display_heads.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 os_traits/hw/gpu/max_display_heads.py diff --git a/os_traits/hw/gpu/max_display_heads.py b/os_traits/hw/gpu/max_display_heads.py new file mode 100644 index 0000000..97322e6 --- /dev/null +++ b/os_traits/hw/gpu/max_display_heads.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- + +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +TRAITS = [ + # The maximal number of display outputs or heads. + '1', + '2', + '4', + '6', + '8', +]