]> git.baikalelectronics.ru Git - kernel.git/commit
vfio/gvt: Use mdev_get_type_group_id()
authorJason Gunthorpe <jgg@nvidia.com>
Tue, 6 Apr 2021 19:40:39 +0000 (16:40 -0300)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 12 Apr 2021 16:36:00 +0000 (10:36 -0600)
commit023df646a24ffd3a100f44d7f24094753fb5d23a
tree12377bd6d87875cd70941388554983e27fd1c212
parent1c96138a9e09d76755846c43a8765cceb06d1d3e
vfio/gvt: Use mdev_get_type_group_id()

intel_gvt_init_vgpu_type_groups() makes gvt->types 1:1 with the
supported_type_groups array, so the type_group_id is also the index into
gvt->types. Use it directly and remove the string matching.

Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Message-Id: <16-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com>
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/gpu/drm/i915/gvt/gvt.c
drivers/gpu/drm/i915/gvt/gvt.h
drivers/gpu/drm/i915/gvt/kvmgt.c