Re: [Intel-gfx] [PATCH i-g-t v4] tools: Add intel_dp_compliance for DisplayPort 1.2 compliance automation

2017-01-24 Thread Manasi Navare
On Tue, Jan 24, 2017 at 11:49:48AM +0200, Petri Latvala wrote:
> 
> Just one more nitpick (in two parts) below. With that, you can
> consider this now to be
> 
> Reviewed-by: Petri Latvala 
> 
> This patch can be pushed when the kernel changes that contain "must be
> kept in sync" numbers in intel_dp_compliance.c have landed (and have
> been double-checked to match).
> 
> 
> --
> Petri Latvala
> 
>

Thanks for the review.
The changes that contain "must be kept in sync" have already been double checked
and tested with this tool. These changes are already part of the i915 kernel
defined in drm_dp-helper.h.
So we are good to go!

Regards
Manasi

 
> On Mon, Jan 23, 2017 at 06:48:53PM -0800, Manasi Navare wrote:
> > From: "Navare, Manasi D" 
> > 
> > This is the userspace component of the Displayport Compliance
> > testing software required for compliance testing of the I915
> > Display Port driver. This must be running in order to successfully
> > complete Display Port compliance testing. This app and the kernel
> > code that accompanies it has been written to satify the requirements
> > of the Displayport Link CTS 1.2 rev1.1 specification from VESA.
> > Note that this application does not support eDP compliance testing.
> > This utility has an automation support for the Link training tests
> > (4.3.1.1. - 4.3.2.3), EDID tests (4.2.2.3
> > - 4.2.2.6) and Video Pattern generation tests (4.3.3.1) from CTS
> > specification 1.2 Rev 1.1.
> > 
> > This tool has the support for responding to the hotplug uevents
> > sent by compliance testting unit after each test.
> > 
> > The Linux DUT running this utility must be in text (console) mode
> > and cannot have any other display manager running. Since this uses
> > sysfs nodes for kernel interaction, this utility should be run as
> > Root. Once this user application is up and running, waiting for
> > test requests, the test appliance software on the windows host
> > can now be used to execute the compliance tests.
> > 
> > This app is based on some prior work done in April 2015 (by
> > Todd Previte )
> > 
> > v2:
> > * Add mode unset on hotplug uevent on disconnect (Manasi Navare)
> > 
> > v3:
> > Made capitalization consistent
> > Reduced line lengths
> > Added return value checks
> > Changed how GLib is linked
> > Fixed build warnings
> > 
> > v4:
> > * Conditionally build this tool if UDEV is present (Petri Latvala)
> > * igt_warn and info cleanup to remove \r
> > * Add intel_dp_compliance to tools/.gitignore
> > * Change the year in copyright statements to current (Petri Latvala)
> > 
> > Cc: Petri Latvala 
> > Cc: Marius Vlad 
> > Cc: Daniel Vetter 
> > Signed-off-by: Manasi Navare 
> > Signed-off-by: Dhinakaran Pandiyan 
> > ---
> >  configure.ac|1 +
> >  tools/.gitignore|1 +
> >  tools/Makefile.am   |6 +-
> >  tools/Makefile.sources  |6 +
> >  tools/intel_dp_compliance.c | 1104 
> > +++
> >  tools/intel_dp_compliance.h |   35 ++
> >  tools/intel_dp_compliance_hotplug.c |  124 
> >  7 files changed, 1276 insertions(+), 1 deletion(-)
> >  create mode 100644 tools/intel_dp_compliance.c
> >  create mode 100644 tools/intel_dp_compliance.h
> >  create mode 100644 tools/intel_dp_compliance_hotplug.c
> > 
> > diff --git a/configure.ac b/configure.ac
> > index 411bfab..d268140 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -164,6 +164,7 @@ PKG_CHECK_MODULES(XRANDR, xrandr >= 1.3, 
> > AC_DEFINE(HAVE_XRANDR, 1, [Have libXran
> >  # for testdisplay
> >  PKG_CHECK_MODULES(CAIRO, [cairo >= 1.12.0])
> >  PKG_CHECK_MODULES(LIBUDEV, [libudev], [udev=yes], [udev=no])
> > +AM_CONDITIONAL(HAVE_UDEV, [test "x$udev" = xyes])
> >  if test x"$udev" = xyes; then
> > AC_DEFINE(HAVE_UDEV,1,[Enable udev-based monitor hotplug detection])
> >  fi
> > diff --git a/tools/.gitignore b/tools/.gitignore
> > index 13825a3..9bb889f 100644
> > --- a/tools/.gitignore
> > +++ b/tools/.gitignore
> > @@ -8,6 +8,7 @@ intel_bios_dumper
> >  intel_bios_reader
> >  intel_display_crc
> >  intel_display_poller
> > +intel_dp_compliance
> >  intel_dump_decode
> >  intel_error_decode
> >  intel_firmware_decode
> > diff --git a/tools/Makefile.am b/tools/Makefile.am
> > index 18f86f6..363945d 100644
> > --- a/tools/Makefile.am
> > +++ b/tools/Makefile.am
> > @@ -7,6 +7,11 @@ bin_PROGRAMS += $(LIBDRM_INTEL_BIN)
> >  intel_error_decode_LDFLAGS = -lz
> >  endif
> >  
> > +if HAVE_UDEV
> > +bin_PROGRAMS += intel_dp_compliance
> > +intel_dp_compliance_LDADD = $(top_builddir)/lib/libintel_tools.la 
> > $(GLIB_LIBS)
> > +endif
> > +
> >  SUBDIRS = null_state_gen registers
> >  
> >  AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib
> > @@ -16,7 +21,6 @@ AM_CFLAGS = 

Re: [Intel-gfx] [PATCH i-g-t v4] tools: Add intel_dp_compliance for DisplayPort 1.2 compliance automation

2017-01-24 Thread Petri Latvala

Just one more nitpick (in two parts) below. With that, you can
consider this now to be

Reviewed-by: Petri Latvala 

This patch can be pushed when the kernel changes that contain "must be
kept in sync" numbers in intel_dp_compliance.c have landed (and have
been double-checked to match).


--
Petri Latvala


On Mon, Jan 23, 2017 at 06:48:53PM -0800, Manasi Navare wrote:
> From: "Navare, Manasi D" 
> 
> This is the userspace component of the Displayport Compliance
> testing software required for compliance testing of the I915
> Display Port driver. This must be running in order to successfully
> complete Display Port compliance testing. This app and the kernel
> code that accompanies it has been written to satify the requirements
> of the Displayport Link CTS 1.2 rev1.1 specification from VESA.
> Note that this application does not support eDP compliance testing.
> This utility has an automation support for the Link training tests
> (4.3.1.1. - 4.3.2.3), EDID tests (4.2.2.3
> - 4.2.2.6) and Video Pattern generation tests (4.3.3.1) from CTS
> specification 1.2 Rev 1.1.
> 
> This tool has the support for responding to the hotplug uevents
> sent by compliance testting unit after each test.
> 
> The Linux DUT running this utility must be in text (console) mode
> and cannot have any other display manager running. Since this uses
> sysfs nodes for kernel interaction, this utility should be run as
> Root. Once this user application is up and running, waiting for
> test requests, the test appliance software on the windows host
> can now be used to execute the compliance tests.
> 
> This app is based on some prior work done in April 2015 (by
> Todd Previte )
> 
> v2:
> * Add mode unset on hotplug uevent on disconnect (Manasi Navare)
> 
> v3:
> Made capitalization consistent
> Reduced line lengths
> Added return value checks
> Changed how GLib is linked
> Fixed build warnings
> 
> v4:
> * Conditionally build this tool if UDEV is present (Petri Latvala)
> * igt_warn and info cleanup to remove \r
> * Add intel_dp_compliance to tools/.gitignore
> * Change the year in copyright statements to current (Petri Latvala)
> 
> Cc: Petri Latvala 
> Cc: Marius Vlad 
> Cc: Daniel Vetter 
> Signed-off-by: Manasi Navare 
> Signed-off-by: Dhinakaran Pandiyan 
> ---
>  configure.ac|1 +
>  tools/.gitignore|1 +
>  tools/Makefile.am   |6 +-
>  tools/Makefile.sources  |6 +
>  tools/intel_dp_compliance.c | 1104 
> +++
>  tools/intel_dp_compliance.h |   35 ++
>  tools/intel_dp_compliance_hotplug.c |  124 
>  7 files changed, 1276 insertions(+), 1 deletion(-)
>  create mode 100644 tools/intel_dp_compliance.c
>  create mode 100644 tools/intel_dp_compliance.h
>  create mode 100644 tools/intel_dp_compliance_hotplug.c
> 
> diff --git a/configure.ac b/configure.ac
> index 411bfab..d268140 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -164,6 +164,7 @@ PKG_CHECK_MODULES(XRANDR, xrandr >= 1.3, 
> AC_DEFINE(HAVE_XRANDR, 1, [Have libXran
>  # for testdisplay
>  PKG_CHECK_MODULES(CAIRO, [cairo >= 1.12.0])
>  PKG_CHECK_MODULES(LIBUDEV, [libudev], [udev=yes], [udev=no])
> +AM_CONDITIONAL(HAVE_UDEV, [test "x$udev" = xyes])
>  if test x"$udev" = xyes; then
>   AC_DEFINE(HAVE_UDEV,1,[Enable udev-based monitor hotplug detection])
>  fi
> diff --git a/tools/.gitignore b/tools/.gitignore
> index 13825a3..9bb889f 100644
> --- a/tools/.gitignore
> +++ b/tools/.gitignore
> @@ -8,6 +8,7 @@ intel_bios_dumper
>  intel_bios_reader
>  intel_display_crc
>  intel_display_poller
> +intel_dp_compliance
>  intel_dump_decode
>  intel_error_decode
>  intel_firmware_decode
> diff --git a/tools/Makefile.am b/tools/Makefile.am
> index 18f86f6..363945d 100644
> --- a/tools/Makefile.am
> +++ b/tools/Makefile.am
> @@ -7,6 +7,11 @@ bin_PROGRAMS += $(LIBDRM_INTEL_BIN)
>  intel_error_decode_LDFLAGS = -lz
>  endif
>  
> +if HAVE_UDEV
> +bin_PROGRAMS += intel_dp_compliance
> +intel_dp_compliance_LDADD = $(top_builddir)/lib/libintel_tools.la 
> $(GLIB_LIBS)
> +endif
> +
>  SUBDIRS = null_state_gen registers
>  
>  AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib
> @@ -16,7 +21,6 @@ AM_CFLAGS = $(DEBUG_CFLAGS) $(DRM_CFLAGS) 
> $(PCIACCESS_CFLAGS) $(CWARNFLAGS) \
>  LDADD = $(top_builddir)/lib/libintel_tools.la
>  AM_LDFLAGS = -Wl,--as-needed
>  
> -
>  # aubdumper
>  
>  module_LTLIBRARIES = intel_aubdump.la
> diff --git a/tools/Makefile.sources b/tools/Makefile.sources
> index e2451ea..34c7a74 100644
> --- a/tools/Makefile.sources
> +++ b/tools/Makefile.sources
> @@ -56,3 +56,9 @@ intel_l3_parity_SOURCES =   \
>   intel_l3_parity.h   \
>   intel_l3_udev_listener.c
>  
> +intel_dp_compliance_SOURCES = \
> +

[Intel-gfx] [PATCH i-g-t v4] tools: Add intel_dp_compliance for DisplayPort 1.2 compliance automation

2017-01-23 Thread Manasi Navare
From: "Navare, Manasi D" 

This is the userspace component of the Displayport Compliance
testing software required for compliance testing of the I915
Display Port driver. This must be running in order to successfully
complete Display Port compliance testing. This app and the kernel
code that accompanies it has been written to satify the requirements
of the Displayport Link CTS 1.2 rev1.1 specification from VESA.
Note that this application does not support eDP compliance testing.
This utility has an automation support for the Link training tests
(4.3.1.1. - 4.3.2.3), EDID tests (4.2.2.3
- 4.2.2.6) and Video Pattern generation tests (4.3.3.1) from CTS
specification 1.2 Rev 1.1.

This tool has the support for responding to the hotplug uevents
sent by compliance testting unit after each test.

The Linux DUT running this utility must be in text (console) mode
and cannot have any other display manager running. Since this uses
sysfs nodes for kernel interaction, this utility should be run as
Root. Once this user application is up and running, waiting for
test requests, the test appliance software on the windows host
can now be used to execute the compliance tests.

This app is based on some prior work done in April 2015 (by
Todd Previte )

v2:
* Add mode unset on hotplug uevent on disconnect (Manasi Navare)

v3:
Made capitalization consistent
Reduced line lengths
Added return value checks
Changed how GLib is linked
Fixed build warnings

v4:
* Conditionally build this tool if UDEV is present (Petri Latvala)
* igt_warn and info cleanup to remove \r
* Add intel_dp_compliance to tools/.gitignore
* Change the year in copyright statements to current (Petri Latvala)

Cc: Petri Latvala 
Cc: Marius Vlad 
Cc: Daniel Vetter 
Signed-off-by: Manasi Navare 
Signed-off-by: Dhinakaran Pandiyan 
---
 configure.ac|1 +
 tools/.gitignore|1 +
 tools/Makefile.am   |6 +-
 tools/Makefile.sources  |6 +
 tools/intel_dp_compliance.c | 1104 +++
 tools/intel_dp_compliance.h |   35 ++
 tools/intel_dp_compliance_hotplug.c |  124 
 7 files changed, 1276 insertions(+), 1 deletion(-)
 create mode 100644 tools/intel_dp_compliance.c
 create mode 100644 tools/intel_dp_compliance.h
 create mode 100644 tools/intel_dp_compliance_hotplug.c

diff --git a/configure.ac b/configure.ac
index 411bfab..d268140 100644
--- a/configure.ac
+++ b/configure.ac
@@ -164,6 +164,7 @@ PKG_CHECK_MODULES(XRANDR, xrandr >= 1.3, 
AC_DEFINE(HAVE_XRANDR, 1, [Have libXran
 # for testdisplay
 PKG_CHECK_MODULES(CAIRO, [cairo >= 1.12.0])
 PKG_CHECK_MODULES(LIBUDEV, [libudev], [udev=yes], [udev=no])
+AM_CONDITIONAL(HAVE_UDEV, [test "x$udev" = xyes])
 if test x"$udev" = xyes; then
AC_DEFINE(HAVE_UDEV,1,[Enable udev-based monitor hotplug detection])
 fi
diff --git a/tools/.gitignore b/tools/.gitignore
index 13825a3..9bb889f 100644
--- a/tools/.gitignore
+++ b/tools/.gitignore
@@ -8,6 +8,7 @@ intel_bios_dumper
 intel_bios_reader
 intel_display_crc
 intel_display_poller
+intel_dp_compliance
 intel_dump_decode
 intel_error_decode
 intel_firmware_decode
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 18f86f6..363945d 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -7,6 +7,11 @@ bin_PROGRAMS += $(LIBDRM_INTEL_BIN)
 intel_error_decode_LDFLAGS = -lz
 endif
 
+if HAVE_UDEV
+bin_PROGRAMS += intel_dp_compliance
+intel_dp_compliance_LDADD = $(top_builddir)/lib/libintel_tools.la $(GLIB_LIBS)
+endif
+
 SUBDIRS = null_state_gen registers
 
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib
@@ -16,7 +21,6 @@ AM_CFLAGS = $(DEBUG_CFLAGS) $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) 
$(CWARNFLAGS) \
 LDADD = $(top_builddir)/lib/libintel_tools.la
 AM_LDFLAGS = -Wl,--as-needed
 
-
 # aubdumper
 
 module_LTLIBRARIES = intel_aubdump.la
diff --git a/tools/Makefile.sources b/tools/Makefile.sources
index e2451ea..34c7a74 100644
--- a/tools/Makefile.sources
+++ b/tools/Makefile.sources
@@ -56,3 +56,9 @@ intel_l3_parity_SOURCES = \
intel_l3_parity.h   \
intel_l3_udev_listener.c
 
+intel_dp_compliance_SOURCES = \
+intel_dp_compliance.c \
+intel_dp_compliance.h \
+intel_dp_compliance_hotplug.c \
+$(NULL)
+
diff --git a/tools/intel_dp_compliance.c b/tools/intel_dp_compliance.c
new file mode 100644
index 000..b25fe86
--- /dev/null
+++ b/tools/intel_dp_compliance.c
@@ -0,0 +1,1104 @@
+/*
+ * Copyright © 2017 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute,