Re: [igt-dev] [PATCH i-g-t 1/6] lib/igt_vmwgfx: Add vmwgfx device

Daniel Vetter
2018-10-11T15:27:21Z

On Thu, Oct 11, 2018 at 03:17:01PM +0000, Deepak Singh Rawat wrote:
> >
> > On Wed, Oct 10, 2018 at 05:20:59PM -0700, Deepak Rawat wrote:
> > > Add DRIVER_VMWGFX to represent vmwgfx device for running igt tests.
> > >
> > > v2: Don't remove second virtio_gpu
> > >
> > > Signed-off-by: Deepak Rawat <drawat@vmware.com>
> > > ---
> > > lib/drmtest.c | 8 ++++++++
> > > lib/drmtest.h | 3 +++
> > > 2 files changed, 11 insertions(+)
> > >
> > > diff --git a/lib/drmtest.c b/lib/drmtest.c
> > > index fee9d33a..9d013a00 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;
> > > @@ -206,6 +211,7 @@ static const struct module {
> > > { DRIVER_VGEM, "vgem" },
> > > { DRIVER_VIRTIO, "virtio-gpu" },
> > > { DRIVER_VIRTIO, "virtio_gpu" },
> > > + { DRIVER_VMWGFX, "vmwgfx" },
> > > {}
> > > };
> > >
> > > @@ -348,6 +354,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)
> >
> > This seems not needed? For pure generic kms tests I think it'd be great if
> > we don't have to sprinkle driver-specific checks all over. Which you seem
> > to achive in your series here.
> >
> > So not clear why this here is needed?
> > -Daniel
>
> Hi Daniel,
>
> Thanks for the review. You are right for kms tests having vmwgfx driver type
> is not needed but I added vmwgfx device type because I plan to add more
> vmwgfx test cases, and since vmwgfx buffer allocation is private ioctl
> having a separate device type might be needed.

Oh, this sounds awesome. And yes, for private ioctl tests vmwgfx is
obviuosly very much welcome!

> I can drop this until I have some vmwgfx specific test cases.

Sounds like a good plan to me.
-Daniel

>
> >
> > > /*
> > > * 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
> > > --
> > > 2.17.1
> > >
> > > _______________________________________________
> > > igt-dev mailing list
> > > igt-dev@lists.freedesktop.org
> > >
> > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.fr
> > eedesktop.org%2Fmailman%2Flistinfo%2Figt-
> > dev&amp;data=02%7C01%7Cdrawat%40vmware.com%7C5486d67be73647b1
> > 1d2708d62f58307d%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C6
> > 36748453147406904&amp;sdata=QcT4VTQth8GuXgjZejCsnFPDsMFbtqrUOW
> > uSDr8zbG8%3D&amp;reserved=0
> >
> > --
> > Daniel Vetter
> > Software Engineer, Intel Corporation
> > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fblog.ff
> > wll.ch&amp;data=02%7C01%7Cdrawat%40vmware.com%7C5486d67be73647
> > b11d2708d62f58307d%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7
> > C636748453147406904&amp;sdata=4SKi8P5PeyCAUsoZh%2BsYFC%2FU2RiEx5
> > qp2gPP7bPr3Bo%3D&amp;reserved=0

--
Daniel Vetter
Software Engineer, Intel Corporation