public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Petri Latvala <petri.latvala@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Petri Latvala <petri.latvala@intel.com>
Subject: [igt-dev] [PATCH i-g-t] drmtest: Properly handle virtio-gpu's naming
Date: Thu, 25 Apr 2019 13:02:06 +0300	[thread overview]
Message-ID: <20190425100206.29864-1-petri.latvala@intel.com> (raw)

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>
---
 lib/drmtest.c | 9 +++++++--
 1 file 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 },
 	{}
 };
 
-- 
2.19.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

             reply	other threads:[~2019-04-25 10:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-25 10:02 Petri Latvala [this message]
2019-04-25 11:21 ` [igt-dev] ✓ Fi.CI.BAT: success for drmtest: Properly handle virtio-gpu's naming Patchwork
2019-04-25 20:11 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190425100206.29864-1-petri.latvala@intel.com \
    --to=petri.latvala@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox