public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ser, Simon" <simon.ser@intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
	"daniel.vetter@ffwll.ch" <daniel.vetter@ffwll.ch>
Cc: "liviu.dudau@arm.com" <liviu.dudau@arm.com>,
	"Vetter, Daniel" <daniel.vetter@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] lib: Ditch "DRIVER_* for kms tests" cargo cult
Date: Fri, 12 Jul 2019 10:00:57 +0000	[thread overview]
Message-ID: <e63b04d282fd17a9674e2dc7180ef3bd837c9658.camel@intel.com> (raw)
In-Reply-To: <20190711172135.6398-1-daniel.vetter@ffwll.ch>

On Thu, 2019-07-11 at 19:21 +0200, Daniel Vetter wrote:
> KMS is meant to be a (at least somewhat) generic userspace API. We do
> not want nor need to add a special match function for every driver
> ever written, that doesn't make sense, defeats the point of having
> generic tests for a generic testsuite, and really doesn't scale.
> 
> Also add a comment so people don't try to add ever more of these.
> 
> Also, this means no autoloading for you, but really igt should
> reinvent udev, and mostly this was needed for 2 reasons:
> - CI configuration falling to pieces because tests unloaded a driver,
>   and then died before cleaning up.
> - vgem, which is fake, and needs to be requested explictily.
> 
> We might want to throw that all out again, except for vgem.
> 
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Deepak Rawat <drawat@vmware.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
> Cc: Leo Li <sunpeng.li@amd.com>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Cc: "Ser, Simon" <simon.ser@intel.com>
> Cc: Oleg Vasilev <oleg.vasilev@intel.com>
> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

This is a good idea.

Reviewed-by: Simon Ser <simon.ser@intel.com>

> ---
>  lib/drmtest.c |  9 ---------
>  lib/drmtest.h | 13 +++++++++----
>  2 files changed, 9 insertions(+), 13 deletions(-)
> 
> diff --git a/lib/drmtest.c b/lib/drmtest.c
> index 25f20353023b..c379a7b7974f 100644
> --- a/lib/drmtest.c
> +++ b/lib/drmtest.c
> @@ -187,12 +187,6 @@ 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 */
> @@ -210,7 +204,6 @@ static const struct module {
>  	{ DRIVER_V3D, "v3d" },
>  	{ DRIVER_VC4, "vc4" },
>  	{ DRIVER_VGEM, "vgem" },
> -	{ DRIVER_VIRTIO, "virtio_gpu", modprobe_virtio },
>  	{}
>  };
>  
> @@ -363,8 +356,6 @@ static const char *chipset_to_str(int chipset)
>  		return "vc4";
>  	case DRIVER_VGEM:
>  		return "vgem";
> -	case DRIVER_VIRTIO:
> -		return "virtio";
>  	case DRIVER_AMDGPU:
>  		return "amdgpu";
>  	case DRIVER_PANFROST:
> diff --git a/lib/drmtest.h b/lib/drmtest.h
> index 6c4c3899cb31..614f57e6f7d5 100644
> --- a/lib/drmtest.h
> +++ b/lib/drmtest.h
> @@ -38,13 +38,18 @@
>  
>  #include "igt_core.h"
>  
> +/*
> + * NOTE: Theser are _only_ for testcases exercising driver specific rendering
> + * ioctls and uapi (and a bunch of historical reasons). And KMS testcase should
> + * be build on top of DRIVER_ANY. Do _NOT_ add your driver here for enabling KMS
> + * tests.
> + */
>  #define DRIVER_INTEL	(1 << 0)
>  #define DRIVER_VC4	(1 << 1)
>  #define DRIVER_VGEM	(1 << 2)
> -#define DRIVER_VIRTIO	(1 << 3)
> -#define DRIVER_AMDGPU	(1 << 4)
> -#define DRIVER_V3D	(1 << 5)
> -#define DRIVER_PANFROST	(1 << 6)
> +#define DRIVER_AMDGPU	(1 << 3)
> +#define DRIVER_V3D	(1 << 4)
> +#define DRIVER_PANFROST	(1 << 5)
>  /*
>   * Exclude DRVER_VGEM from DRIVER_ANY since if you run on a system
>   * with vgem as well as a supported driver, you can end up with a
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2019-07-12 10:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-11 17:21 [igt-dev] [PATCH i-g-t] lib: Ditch "DRIVER_* for kms tests" cargo cult Daniel Vetter
2019-07-11 17:40 ` Kazlauskas, Nicholas
2019-07-11 19:33 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-07-12 10:00 ` Ser, Simon [this message]
2019-07-13  0:41 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-07-15  8:10 ` [igt-dev] [PATCH i-g-t] " Arkadiusz Hiler
2019-07-16  8:12   ` Daniel Vetter

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=e63b04d282fd17a9674e2dc7180ef3bd837c9658.camel@intel.com \
    --to=simon.ser@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=liviu.dudau@arm.com \
    /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