diff mbox series

[i-g-t,1/5] lib/igt_vmwgfx: Add vmwgfx device

Message ID 20180906000350.2478-2-drawat@vmware.com (mailing list archive)
State New, archived
Headers show
Series vmwgfx as a new driver for igt-gpu-tools | expand

Commit Message

Deepak Singh Rawat Sept. 6, 2018, 12:03 a.m. UTC
Add DRIVER_VMWGFX to represent vmwgfx device for running igt tests.

Signed-off-by: Deepak Rawat <drawat@vmware.com>
---
 lib/drmtest.c | 9 ++++++++-
 lib/drmtest.h | 3 +++
 2 files changed, 11 insertions(+), 1 deletion(-)

Comments

Petri Latvala Sept. 6, 2018, 8:42 a.m. UTC | #1
On Wed, Sep 05, 2018 at 05:03:46PM -0700, Deepak Rawat wrote:
> Add DRIVER_VMWGFX to represent vmwgfx device for running igt tests.
> 
> Signed-off-by: Deepak Rawat <drawat@vmware.com>
> ---
>  lib/drmtest.c | 9 ++++++++-
>  lib/drmtest.h | 3 +++
>  2 files changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/drmtest.c b/lib/drmtest.c
> index bfa2e0f0..563d5b8b 100644
> --- a/lib/drmtest.c
> +++ b/lib/drmtest.c
> @@ -105,6 +105,11 @@ bool is_i915_device(int fd)
>  	return __is_device(fd, "i915");
>  }
>  
> +bool is_vmwgfx_device(int fd)
> +{
> +	return __is_device(fd, "vmwg");
> +}
> +
>  static bool has_known_intel_chipset(int fd)
>  {
>  	struct drm_i915_getparam gp;
> @@ -205,7 +210,7 @@ static const struct module {
>  	{ DRIVER_VC4, "vc4" },
>  	{ DRIVER_VGEM, "vgem" },
>  	{ DRIVER_VIRTIO, "virtio-gpu" },
> -	{ DRIVER_VIRTIO, "virtio_gpu" },
> +	{ DRIVER_VMWGFX, "vmwgfx" },
>  	{}


Don't remove the second virtio-gpu line, there's a reason for it.

.... we should probably add a comment there.
Jani Nikula Sept. 6, 2018, 10:54 a.m. UTC | #2
On Thu, 06 Sep 2018, Petri Latvala <petri.latvala@intel.com> wrote:
> On Wed, Sep 05, 2018 at 05:03:46PM -0700, Deepak Rawat wrote:
>> Add DRIVER_VMWGFX to represent vmwgfx device for running igt tests.
>> 
>> Signed-off-by: Deepak Rawat <drawat@vmware.com>
>> ---
>>  lib/drmtest.c | 9 ++++++++-
>>  lib/drmtest.h | 3 +++
>>  2 files changed, 11 insertions(+), 1 deletion(-)
>> 
>> diff --git a/lib/drmtest.c b/lib/drmtest.c
>> index bfa2e0f0..563d5b8b 100644
>> --- a/lib/drmtest.c
>> +++ b/lib/drmtest.c
>> @@ -105,6 +105,11 @@ bool is_i915_device(int fd)
>>  	return __is_device(fd, "i915");
>>  }
>>  
>> +bool is_vmwgfx_device(int fd)
>> +{
>> +	return __is_device(fd, "vmwg");
>> +}
>> +
>>  static bool has_known_intel_chipset(int fd)
>>  {
>>  	struct drm_i915_getparam gp;
>> @@ -205,7 +210,7 @@ static const struct module {
>>  	{ DRIVER_VC4, "vc4" },
>>  	{ DRIVER_VGEM, "vgem" },
>>  	{ DRIVER_VIRTIO, "virtio-gpu" },
>> -	{ DRIVER_VIRTIO, "virtio_gpu" },
>> +	{ DRIVER_VMWGFX, "vmwgfx" },
>>  	{}
>
>
> Don't remove the second virtio-gpu line, there's a reason for it.
>
> .... we should probably add a comment there.

Don't keep us in suspense!

Jani.
diff mbox series

Patch

diff --git a/lib/drmtest.c b/lib/drmtest.c
index bfa2e0f0..563d5b8b 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -105,6 +105,11 @@  bool is_i915_device(int fd)
 	return __is_device(fd, "i915");
 }
 
+bool is_vmwgfx_device(int fd)
+{
+	return __is_device(fd, "vmwg");
+}
+
 static bool has_known_intel_chipset(int fd)
 {
 	struct drm_i915_getparam gp;
@@ -205,7 +210,7 @@  static const struct module {
 	{ DRIVER_VC4, "vc4" },
 	{ DRIVER_VGEM, "vgem" },
 	{ DRIVER_VIRTIO, "virtio-gpu" },
-	{ DRIVER_VIRTIO, "virtio_gpu" },
+	{ DRIVER_VMWGFX, "vmwgfx" },
 	{}
 };
 
@@ -335,6 +340,8 @@  static const char *chipset_to_str(int chipset)
 		return "virtio";
 	case DRIVER_AMDGPU:
 		return "amdgpu";
+	case DRIVER_VMWGFX:
+		return "vmwgfx";
 	case DRIVER_ANY:
 		return "any";
 	default:
diff --git a/lib/drmtest.h b/lib/drmtest.h
index 949865ee..0213fb51 100644
--- a/lib/drmtest.h
+++ b/lib/drmtest.h
@@ -43,6 +43,7 @@ 
 #define DRIVER_VGEM	(1 << 2)
 #define DRIVER_VIRTIO	(1 << 3)
 #define DRIVER_AMDGPU	(1 << 4)
+#define DRIVER_VMWGFX	(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
@@ -80,6 +81,8 @@  void igt_require_intel(int fd);
 
 bool is_i915_device(int fd);
 
+bool is_vmwgfx_device(int fd);
+
 /**
  * do_or_die:
  * @x: command