diff options
author | Petri Latvala <petri.latvala@intel.com> | 2019-04-25 13:02:06 +0300 |
---|---|---|
committer | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2019-05-09 14:16:30 +0300 |
commit | cd705a4e5daaaa693b3b528544398be1e43a629f (patch) | |
tree | f3d5cbc295d158f2196daf33bf4817ee553c9828 /lib/drmtest.c | |
parent | ac0fb93ab41bd50b770d03241aaef9c8aa1481b0 (diff) |
drmtest: Properly handle virtio-gpu's naming
Instead of listing virtio-gpu with both spellings in the modules
array, properly use its driver name for opening and module name for
loading.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'lib/drmtest.c')
-rw-r--r-- | lib/drmtest.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/drmtest.c b/lib/drmtest.c index 4a92fb5c..ce3804f9 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -187,6 +187,12 @@ static int modprobe(const char *driver) return igt_kmod_load(driver, ""); } +/* virtio's driver name is virtio_gpu but the module is virtio-gpu.ko */ +static void modprobe_virtio(const char *name) +{ + igt_kmod_load("virtio-gpu", ""); +} + static void modprobe_i915(const char *name) { /* When loading i915, we also want to load snd-hda et al */ @@ -203,8 +209,7 @@ static const struct module { { DRIVER_V3D, "v3d" }, { DRIVER_VC4, "vc4" }, { DRIVER_VGEM, "vgem" }, - { DRIVER_VIRTIO, "virtio-gpu" }, - { DRIVER_VIRTIO, "virtio_gpu" }, + { DRIVER_VIRTIO, "virtio_gpu", modprobe_virtio }, {} }; |