All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] tests/kms_dp_dsc: Read the debugfs only once
@ 2019-06-10 23:26 Anusha Srivatsa
  2019-06-10 23:26 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_dp_dsc: Add a subtest to force DSC output BPP Anusha Srivatsa
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Anusha Srivatsa @ 2019-06-10 23:26 UTC (permalink / raw)
  To: igt-dev; +Cc: Manasi Navare, Anusha Srivatsa

Instead of doing a debugfs_simple_read and then
a debugfs_read(), lets read the debugfs node just once.
We anyway get the suitable return from the following
strstr operation.

For any following subtests, we will be reading only the
contents of the buffer. We can avoid the simple_read
altogether.

Cc: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
---
 tests/kms_dp_dsc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tests/kms_dp_dsc.c b/tests/kms_dp_dsc.c
index e2e3aaa0..7f2bf276 100644
--- a/tests/kms_dp_dsc.c
+++ b/tests/kms_dp_dsc.c
@@ -80,8 +80,6 @@ static bool is_dp_dsc_supported(data_t *data)
 
 	strcpy(file_name, data->conn_name);
 	strcat(file_name, "/i915_dsc_fec_support");
-	igt_require(igt_debugfs_simple_read(data->debugfs_fd, file_name, buf,
-					    sizeof(buf)) > 0);
 	igt_debugfs_read(data->drm_fd, file_name, buf);
 
 	return strstr(buf, "DSC_Sink_Support: yes");
-- 
2.17.1

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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [igt-dev] [PATCH i-g-t 2/2] tests/kms_dp_dsc: Add a subtest to force DSC output BPP
  2019-06-10 23:26 [igt-dev] [PATCH i-g-t 1/2] tests/kms_dp_dsc: Read the debugfs only once Anusha Srivatsa
@ 2019-06-10 23:26 ` Anusha Srivatsa
  2019-06-11 19:55   ` Manasi Navare
  2019-06-11  0:07 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/kms_dp_dsc: Read the debugfs only once Patchwork
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Anusha Srivatsa @ 2019-06-10 23:26 UTC (permalink / raw)
  To: igt-dev; +Cc: Manasi Navare, Anusha Srivatsa, Petri Latvala

This subtest uses the accepted DSC BPPs and tries to
force a modeset by setting a certain BPP as the output
BPP for a connector.

Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
---
 tests/kms_dp_dsc.c | 94 +++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 92 insertions(+), 2 deletions(-)

diff --git a/tests/kms_dp_dsc.c b/tests/kms_dp_dsc.c
index 7f2bf276..f936eb33 100644
--- a/tests/kms_dp_dsc.c
+++ b/tests/kms_dp_dsc.c
@@ -46,7 +46,8 @@
 
 enum dsc_test_type
 {
-	test_basic_dsc_enable
+	test_basic_dsc_enable,
+	test_basic_dsc_enable_bpp
 };
 
 typedef struct {
@@ -67,6 +68,7 @@ typedef struct {
 
 bool force_dsc_en_orig;
 int force_dsc_restore_fd = -1;
+int new_bpp;
 
 static inline void manual(const char *expected)
 {
@@ -157,6 +159,17 @@ static void restore_force_dsc_en(void)
 	force_dsc_restore_fd = -1;
 }
 
+static void force_dp_dsc_enable_bpp(data_t *data)
+{
+	char file_name[128] = {0};
+	char buffer[20];
+	sprintf(buffer, "%d", new_bpp);
+	strcpy(file_name, data->conn_name);
+	strcat(file_name, "/i915_dsc_bpp_slice_support");
+	igt_debug ("Forcing DSC BPP to %d on %s\n", new_bpp, data->conn_name);
+	igt_sysfs_write(data->debugfs_fd, file_name, buffer, sizeof(buffer));
+}
+
 static void test_cleanup(data_t *data)
 {
 	igt_plane_t *primary;
@@ -229,6 +242,44 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 			     "Default DSC enable failed on Connector: %s Pipe: %s\n",
 			     data->conn_name,
 			     kmstest_pipe_name(data->pipe));
+	} else if (test_type == test_basic_dsc_enable_bpp) {
+		bool enabled;
+
+		igt_debug("DSC is supported on %s\n", data->conn_name);
+
+		save_force_dsc_en(data);
+		force_dp_dsc_enable(data);
+
+		igt_debug("Trying to set BPP to %d\n", new_bpp);
+
+		force_dp_dsc_enable_bpp(data);
+
+		igt_output_set_pipe(data->output, data->pipe);
+		igt_create_pattern_fb(data->drm_fd, data->mode->hdisplay,
+				      data->mode->vdisplay,
+				      DRM_FORMAT_XRGB8888,
+				      LOCAL_DRM_FORMAT_MOD_NONE,
+				      &data->fb_test_pattern);
+		primary = igt_output_get_plane_type(data->output,
+					    DRM_PLANE_TYPE_PRIMARY);
+		/* Now set the output to the desired mode */
+		igt_plane_set_fb(primary, &data->fb_test_pattern);
+		igt_display_commit(&data->display);
+
+		/*
+		 * Until we have CRC check support, manually check if RGB test
+		 * pattern has no corruption.
+		 */
+		manual("RGB test pattern without corruption");
+
+		enabled = is_dp_dsc_enabled(data);
+		restore_force_dsc_en();
+
+		igt_assert_f(enabled,
+			     "Default DSC BPP enable failed on Connector: %s Pipe: %s\n",
+			     data->conn_name,
+			     kmstest_pipe_name(data->pipe));
+
 	} else {
 		igt_assert(!"Unknown test type\n");
 	}
@@ -256,7 +307,9 @@ igt_main
 	igt_output_t *output;
 	drmModeRes *res;
 	drmModeConnector *connector;
-	int i, test_conn_cnt, test_cnt;
+	int i, j, test_conn_cnt, test_cnt;
+	int dp_dsc_supported_compressed_bpp[] = {8, 10, 12, 15};
+
 	int tests[] = {DRM_MODE_CONNECTOR_eDP, DRM_MODE_CONNECTOR_DisplayPort};
 
 	igt_fixture {
@@ -300,6 +353,43 @@ igt_main
 			}
 			igt_skip_on(test_conn_cnt == 0);
 		}
+
+		for (j = 0; j < ARRAY_SIZE(dp_dsc_supported_compressed_bpp); j++) {
+			new_bpp = dp_dsc_supported_compressed_bpp[j];
+			igt_subtest_f("basic-dsc-enable-%dbpp-%s", new_bpp,
+				      kmstest_connector_type_str(tests[test_cnt])) {
+			test_conn_cnt = 0;
+			for (i = 0; i < res->count_connectors; i++) {
+				connector = drmModeGetConnectorCurrent(data.drm_fd,
+								       res->connectors[i]);
+				if (connector->connection != DRM_MODE_CONNECTED ||
+				    connector->connector_type !=
+				    tests[test_cnt])
+					continue;
+				output = igt_output_from_connector(&data.display, connector);
+				sprintf(data.conn_name, "%s-%d",
+					kmstest_connector_type_str(connector->connector_type),
+					connector->connector_type_id);
+				printf("connector name: %s test_conn_count %d\n", data.conn_name, test_conn_cnt++);
+				if(!is_dp_dsc_supported(&data)) {
+				   igt_debug("DSC not supported on connector %s \n",
+					     data.conn_name);
+					continue;
+                                 }
+				if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort &&
+				    !is_dp_fec_supported(&data)) {
+					igt_debug("DSC cannot be enabled without FEC on %s\n",
+						  data.conn_name);
+					continue;
+				}
+
+				test_conn_cnt++;
+				run_test(&data, output, test_basic_dsc_enable_bpp);
+				}
+				igt_skip_on(test_conn_cnt == 0);
+			}
+		}
+
 	}
 
 	igt_fixture {
-- 
2.17.1

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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/kms_dp_dsc: Read the debugfs only once
  2019-06-10 23:26 [igt-dev] [PATCH i-g-t 1/2] tests/kms_dp_dsc: Read the debugfs only once Anusha Srivatsa
  2019-06-10 23:26 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_dp_dsc: Add a subtest to force DSC output BPP Anusha Srivatsa
@ 2019-06-11  0:07 ` Patchwork
  2019-06-11 19:07 ` [igt-dev] [PATCH i-g-t 1/2] " Manasi Navare
  2019-06-12  8:00 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/2] " Patchwork
  3 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-06-11  0:07 UTC (permalink / raw)
  To: Anusha Srivatsa; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/2] tests/kms_dp_dsc: Read the debugfs only once
URL   : https://patchwork.freedesktop.org/series/61868/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6230 -> IGTPW_3137
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/61868/revisions/1/mbox/

Known issues
------------

  Here are the changes found in IGTPW_3137 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live_sanitycheck:
    - fi-icl-u3:          [PASS][1] -> [DMESG-WARN][2] ([fdo#107724]) +2 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html

  * igt@kms_addfb_basic@bad-pitch-32:
    - fi-icl-dsi:         [PASS][3] -> [DMESG-WARN][4] ([fdo#106107])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/fi-icl-dsi/igt@kms_addfb_basic@bad-pitch-32.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/fi-icl-dsi/igt@kms_addfb_basic@bad-pitch-32.html

  
#### Possible fixes ####

  * igt@gem_ctx_switch@basic-default:
    - {fi-icl-guc}:       [INCOMPLETE][5] ([fdo#107713] / [fdo#108569]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/fi-icl-guc/igt@gem_ctx_switch@basic-default.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/fi-icl-guc/igt@gem_ctx_switch@basic-default.html

  * igt@gem_mmap@basic-small-bo:
    - fi-icl-u3:          [DMESG-WARN][7] ([fdo#107724]) -> [PASS][8] +2 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/fi-icl-u3/igt@gem_mmap@basic-small-bo.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/fi-icl-u3/igt@gem_mmap@basic-small-bo.html

  * igt@i915_selftest@live_contexts:
    - fi-bdw-gvtdvm:      [DMESG-FAIL][9] ([fdo#110235]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
  [fdo#110235]: https://bugs.freedesktop.org/show_bug.cgi?id=110235


Participating hosts (54 -> 47)
------------------------------

  Missing    (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * IGT: IGT_5050 -> IGTPW_3137

  CI_DRM_6230: 57bd224fa47bfe2a2b83fbfcfc48aaded027d211 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3137: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/
  IGT_5050: 4c072238c784e6acb00634a80c3c55fb8358058b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@kms_dp_dsc@basic-dsc-enable-8bpp-dp
+igt@kms_dp_dsc@basic-dsc-enable-8bpp-edp
+igt@kms_dp_dsc@basic-dsc-enable-10bpp-dp
+igt@kms_dp_dsc@basic-dsc-enable-10bpp-edp
+igt@kms_dp_dsc@basic-dsc-enable-12bpp-dp
+igt@kms_dp_dsc@basic-dsc-enable-12bpp-edp
+igt@kms_dp_dsc@basic-dsc-enable-15bpp-dp
+igt@kms_dp_dsc@basic-dsc-enable-15bpp-edp

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 1/2] tests/kms_dp_dsc: Read the debugfs only once
  2019-06-10 23:26 [igt-dev] [PATCH i-g-t 1/2] tests/kms_dp_dsc: Read the debugfs only once Anusha Srivatsa
  2019-06-10 23:26 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_dp_dsc: Add a subtest to force DSC output BPP Anusha Srivatsa
  2019-06-11  0:07 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/kms_dp_dsc: Read the debugfs only once Patchwork
@ 2019-06-11 19:07 ` Manasi Navare
  2019-06-12  8:00 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/2] " Patchwork
  3 siblings, 0 replies; 9+ messages in thread
From: Manasi Navare @ 2019-06-11 19:07 UTC (permalink / raw)
  To: Anusha Srivatsa; +Cc: igt-dev

On Mon, Jun 10, 2019 at 04:26:16PM -0700, Anusha Srivatsa wrote:
> Instead of doing a debugfs_simple_read and then
> a debugfs_read(), lets read the debugfs node just once.
> We anyway get the suitable return from the following
> strstr operation.
> 
> For any following subtests, we will be reading only the
> contents of the buffer. We can avoid the simple_read
> altogether.
> 
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>

Makes sense and looks good to me.

Reviewed-by: Manasi Navare <<manasi.d.navare@intel.com>

Manasi

> ---
>  tests/kms_dp_dsc.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/tests/kms_dp_dsc.c b/tests/kms_dp_dsc.c
> index e2e3aaa0..7f2bf276 100644
> --- a/tests/kms_dp_dsc.c
> +++ b/tests/kms_dp_dsc.c
> @@ -80,8 +80,6 @@ static bool is_dp_dsc_supported(data_t *data)
>  
>  	strcpy(file_name, data->conn_name);
>  	strcat(file_name, "/i915_dsc_fec_support");
> -	igt_require(igt_debugfs_simple_read(data->debugfs_fd, file_name, buf,
> -					    sizeof(buf)) > 0);
>  	igt_debugfs_read(data->drm_fd, file_name, buf);
>  
>  	return strstr(buf, "DSC_Sink_Support: yes");
> -- 
> 2.17.1
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 2/2] tests/kms_dp_dsc: Add a subtest to force DSC output BPP
  2019-06-10 23:26 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_dp_dsc: Add a subtest to force DSC output BPP Anusha Srivatsa
@ 2019-06-11 19:55   ` Manasi Navare
  2019-06-13 22:33     ` Srivatsa, Anusha
  2019-06-20  0:44     ` Srivatsa, Anusha
  0 siblings, 2 replies; 9+ messages in thread
From: Manasi Navare @ 2019-06-11 19:55 UTC (permalink / raw)
  To: Anusha Srivatsa; +Cc: igt-dev, Petri Latvala

On Mon, Jun 10, 2019 at 04:26:17PM -0700, Anusha Srivatsa wrote:
> This subtest uses the accepted DSC BPPs and tries to
> force a modeset by setting a certain BPP as the output
> BPP for a connector.
> 
> Cc: Petri Latvala <petri.latvala@intel.com>
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
> ---
>  tests/kms_dp_dsc.c | 94 +++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 92 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/kms_dp_dsc.c b/tests/kms_dp_dsc.c
> index 7f2bf276..f936eb33 100644
> --- a/tests/kms_dp_dsc.c
> +++ b/tests/kms_dp_dsc.c
> @@ -46,7 +46,8 @@
>  
>  enum dsc_test_type
>  {
> -	test_basic_dsc_enable
> +	test_basic_dsc_enable,
> +	test_basic_dsc_enable_bpp
>  };
>  
>  typedef struct {
> @@ -67,6 +68,7 @@ typedef struct {
>  
>  bool force_dsc_en_orig;
>  int force_dsc_restore_fd = -1;
> +int new_bpp;
>  
>  static inline void manual(const char *expected)
>  {
> @@ -157,6 +159,17 @@ static void restore_force_dsc_en(void)
>  	force_dsc_restore_fd = -1;
>  }
>  
> +static void force_dp_dsc_enable_bpp(data_t *data)
> +{
> +	char file_name[128] = {0};
> +	char buffer[20];
> +	sprintf(buffer, "%d", new_bpp);
> +	strcpy(file_name, data->conn_name);
> +	strcat(file_name, "/i915_dsc_bpp_slice_support");
> +	igt_debug ("Forcing DSC BPP to %d on %s\n", new_bpp, data->conn_name);
> +	igt_sysfs_write(data->debugfs_fd, file_name, buffer, sizeof(buffer));

Check the return value of igt_sysfs_write and assert if write failed

> +}
> +
>  static void test_cleanup(data_t *data)
>  {
>  	igt_plane_t *primary;
> @@ -229,6 +242,44 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
>  			     "Default DSC enable failed on Connector: %s Pipe: %s\n",
>  			     data->conn_name,
>  			     kmstest_pipe_name(data->pipe));
> +	} else if (test_type == test_basic_dsc_enable_bpp) {
> +		bool enabled;
> +
> +		igt_debug("DSC is supported on %s\n", data->conn_name);
> +

Unnecessary newline

> +		save_force_dsc_en(data);
> +		force_dp_dsc_enable(data);
> +
> +		igt_debug("Trying to set BPP to %d\n", new_bpp);
> +
> +		force_dp_dsc_enable_bpp(data);
> +
> +		igt_output_set_pipe(data->output, data->pipe);
> +		igt_create_pattern_fb(data->drm_fd, data->mode->hdisplay,
> +				      data->mode->vdisplay,
> +				      DRM_FORMAT_XRGB8888,
> +				      LOCAL_DRM_FORMAT_MOD_NONE,
> +				      &data->fb_test_pattern);
> +		primary = igt_output_get_plane_type(data->output,
> +					    DRM_PLANE_TYPE_PRIMARY);
> +		/* Now set the output to the desired mode */
> +		igt_plane_set_fb(primary, &data->fb_test_pattern);
> +		igt_display_commit(&data->display);
> +
> +		/*
> +		 * Until we have CRC check support, manually check if RGB test
> +		 * pattern has no corruption.
> +		 */
> +		manual("RGB test pattern without corruption");
> +
> +		enabled = is_dp_dsc_enabled(data);
> +		restore_force_dsc_en();

Not sure if we need to restore the DSC BPP value? What does the kernel code set the force_dsc_bpp value to if
not forced by IGT?

> +
> +		igt_assert_f(enabled,
> +			     "Default DSC BPP enable failed on Connector: %s Pipe: %s\n",
> +			     data->conn_name,
> +			     kmstest_pipe_name(data->pipe));
> +
>  	} else {
>  		igt_assert(!"Unknown test type\n");
>  	}
> @@ -256,7 +307,9 @@ igt_main
>  	igt_output_t *output;
>  	drmModeRes *res;
>  	drmModeConnector *connector;
> -	int i, test_conn_cnt, test_cnt;
> +	int i, j, test_conn_cnt, test_cnt;
> +	int dp_dsc_supported_compressed_bpp[] = {8, 10, 12, 15};

 May be a add a comment here saying these are the supported compressed BPPs on Gen 11

> +
>  	int tests[] = {DRM_MODE_CONNECTOR_eDP, DRM_MODE_CONNECTOR_DisplayPort};
>  
>  	igt_fixture {
> @@ -300,6 +353,43 @@ igt_main
>  			}
>  			igt_skip_on(test_conn_cnt == 0);
>  		}
> +
> +		for (j = 0; j < ARRAY_SIZE(dp_dsc_supported_compressed_bpp); j++) {
> +			new_bpp = dp_dsc_supported_compressed_bpp[j];
> +			igt_subtest_f("basic-dsc-enable-%dbpp-%s", new_bpp,
> +				      kmstest_connector_type_str(tests[test_cnt])) {
> +			test_conn_cnt = 0;

Check the indentation for the code within the igt_subtest_f, it needs one more tab

> +			for (i = 0; i < res->count_connectors; i++) {
> +				connector = drmModeGetConnectorCurrent(data.drm_fd,
> +								       res->connectors[i]);
> +				if (connector->connection != DRM_MODE_CONNECTED ||
> +				    connector->connector_type !=
> +				    tests[test_cnt])
> +					continue;
> +				output = igt_output_from_connector(&data.display, connector);
> +				sprintf(data.conn_name, "%s-%d",
> +					kmstest_connector_type_str(connector->connector_type),
> +					connector->connector_type_id);
> +				printf("connector name: %s test_conn_count %d\n", data.conn_name, test_conn_cnt++);

printf is redundant here, if you want you could have this in igt_debug so its printed only for debug

> +				if(!is_dp_dsc_supported(&data)) {
> +				   igt_debug("DSC not supported on connector %s \n",
> +					     data.conn_name);
> +					continue;
> +                                 }
> +				if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort &&
> +				    !is_dp_fec_supported(&data)) {
> +					igt_debug("DSC cannot be enabled without FEC on %s\n",
> +						  data.conn_name);
> +					continue;
> +				}
> +

Redundant newline

Manasi


> +				test_conn_cnt++;
> +				run_test(&data, output, test_basic_dsc_enable_bpp);
> +				}
> +				igt_skip_on(test_conn_cnt == 0);
> +			}
> +		}
> +
>  	}
>  
>  	igt_fixture {
> -- 
> 2.17.1
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/2] tests/kms_dp_dsc: Read the debugfs only once
  2019-06-10 23:26 [igt-dev] [PATCH i-g-t 1/2] tests/kms_dp_dsc: Read the debugfs only once Anusha Srivatsa
                   ` (2 preceding siblings ...)
  2019-06-11 19:07 ` [igt-dev] [PATCH i-g-t 1/2] " Manasi Navare
@ 2019-06-12  8:00 ` Patchwork
  3 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-06-12  8:00 UTC (permalink / raw)
  To: Anusha Srivatsa; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/2] tests/kms_dp_dsc: Read the debugfs only once
URL   : https://patchwork.freedesktop.org/series/61868/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_6230_full -> IGTPW_3137_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_3137_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_3137_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/61868/revisions/1/mbox/

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_3137_full:

### IGT changes ###

#### Possible regressions ####

  * {igt@kms_dp_dsc@basic-dsc-enable-10bpp-dp} (NEW):
    - shard-iclb:         NOTRUN -> [SKIP][1] +3 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-iclb8/igt@kms_dp_dsc@basic-dsc-enable-10bpp-dp.html

  * igt@kms_flip@basic-flip-vs-dpms:
    - shard-apl:          [PASS][2] -> [DMESG-WARN][3]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-apl3/igt@kms_flip@basic-flip-vs-dpms.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-apl5/igt@kms_flip@basic-flip-vs-dpms.html

  
New tests
---------

  New tests have been introduced between CI_DRM_6230_full and IGTPW_3137_full:

### New IGT tests (8) ###

  * igt@kms_dp_dsc@basic-dsc-enable-10bpp-dp:
    - Statuses : 2 pass(s) 4 skip(s)
    - Exec time: [0.0, 0.00] s

  * igt@kms_dp_dsc@basic-dsc-enable-10bpp-edp:
    - Statuses : 5 skip(s)
    - Exec time: [0.0] s

  * igt@kms_dp_dsc@basic-dsc-enable-12bpp-dp:
    - Statuses : 2 pass(s) 4 skip(s)
    - Exec time: [0.0] s

  * igt@kms_dp_dsc@basic-dsc-enable-12bpp-edp:
    - Statuses : 1 pass(s) 5 skip(s)
    - Exec time: [0.0, 0.00] s

  * igt@kms_dp_dsc@basic-dsc-enable-15bpp-dp:
    - Statuses : 2 pass(s) 4 skip(s)
    - Exec time: [0.0] s

  * igt@kms_dp_dsc@basic-dsc-enable-15bpp-edp:
    - Statuses : 1 pass(s) 5 skip(s)
    - Exec time: [0.0, 0.00] s

  * igt@kms_dp_dsc@basic-dsc-enable-8bpp-dp:
    - Statuses : 2 pass(s) 4 skip(s)
    - Exec time: [0.0, 0.00] s

  * igt@kms_dp_dsc@basic-dsc-enable-8bpp-edp:
    - Statuses : 1 pass(s) 5 skip(s)
    - Exec time: [0.0, 0.00] s

  

Known issues
------------

  Here are the changes found in IGTPW_3137_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_mmap_gtt@forked-medium-copy-odd:
    - shard-iclb:         [PASS][4] -> [INCOMPLETE][5] ([fdo#107713])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-iclb3/igt@gem_mmap_gtt@forked-medium-copy-odd.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-iclb8/igt@gem_mmap_gtt@forked-medium-copy-odd.html

  * igt@gem_pwrite@small-cpu-fbr:
    - shard-hsw:          [PASS][6] -> [INCOMPLETE][7] ([fdo#103540])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-hsw6/igt@gem_pwrite@small-cpu-fbr.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-hsw7/igt@gem_pwrite@small-cpu-fbr.html

  * igt@i915_pm_rc6_residency@rc6-accuracy:
    - shard-kbl:          [PASS][8] -> [SKIP][9] ([fdo#109271])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-kbl6/igt@i915_pm_rc6_residency@rc6-accuracy.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-kbl2/igt@i915_pm_rc6_residency@rc6-accuracy.html

  * igt@i915_suspend@sysfs-reader:
    - shard-kbl:          [PASS][10] -> [DMESG-WARN][11] ([fdo#108566])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-kbl4/igt@i915_suspend@sysfs-reader.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-kbl3/igt@i915_suspend@sysfs-reader.html

  * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic:
    - shard-hsw:          [PASS][12] -> [SKIP][13] ([fdo#109271]) +16 similar issues
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-hsw8/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-hsw1/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic.html

  * igt@kms_flip@modeset-vs-vblank-race:
    - shard-glk:          [PASS][14] -> [FAIL][15] ([fdo#103060])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-glk8/igt@kms_flip@modeset-vs-vblank-race.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-glk9/igt@kms_flip@modeset-vs-vblank-race.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render:
    - shard-iclb:         [PASS][16] -> [FAIL][17] ([fdo#103167]) +4 similar issues
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-iclb3/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-iclb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html

  * igt@kms_setmode@basic:
    - shard-hsw:          [PASS][18] -> [FAIL][19] ([fdo#99912])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-hsw1/igt@kms_setmode@basic.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-hsw6/igt@kms_setmode@basic.html

  * igt@kms_vblank@pipe-c-ts-continuation-suspend:
    - shard-apl:          [PASS][20] -> [DMESG-WARN][21] ([fdo#108566]) +3 similar issues
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-apl2/igt@kms_vblank@pipe-c-ts-continuation-suspend.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-apl7/igt@kms_vblank@pipe-c-ts-continuation-suspend.html

  
#### Possible fixes ####

  * igt@gem_eio@in-flight-suspend:
    - shard-glk:          [FAIL][22] ([fdo#110667]) -> [PASS][23]
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-glk2/igt@gem_eio@in-flight-suspend.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-glk9/igt@gem_eio@in-flight-suspend.html

  * igt@gem_mmap_gtt@forked-medium-copy:
    - shard-iclb:         [INCOMPLETE][24] ([fdo#107713]) -> [PASS][25]
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-iclb4/igt@gem_mmap_gtt@forked-medium-copy.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-iclb6/igt@gem_mmap_gtt@forked-medium-copy.html

  * igt@gem_tiled_swapping@non-threaded:
    - shard-hsw:          [INCOMPLETE][26] ([fdo#103540]) -> [PASS][27]
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-hsw1/igt@gem_tiled_swapping@non-threaded.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-hsw2/igt@gem_tiled_swapping@non-threaded.html

  * igt@i915_suspend@sysfs-reader:
    - shard-apl:          [DMESG-WARN][28] ([fdo#108566]) -> [PASS][29] +1 similar issue
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-apl5/igt@i915_suspend@sysfs-reader.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-apl6/igt@i915_suspend@sysfs-reader.html

  * igt@kms_cursor_crc@pipe-b-cursor-128x128-onscreen:
    - shard-apl:          [INCOMPLETE][30] ([fdo#103927]) -> [PASS][31]
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-apl8/igt@kms_cursor_crc@pipe-b-cursor-128x128-onscreen.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-apl6/igt@kms_cursor_crc@pipe-b-cursor-128x128-onscreen.html

  * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
    - shard-glk:          [FAIL][32] ([fdo#105363]) -> [PASS][33]
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-glk7/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-glk2/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible:
    - shard-apl:          [FAIL][34] ([fdo#102887] / [fdo#105363]) -> [PASS][35]
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-apl8/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-apl5/igt@kms_flip@flip-vs-expired-vblank-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-onoff:
    - shard-apl:          [FAIL][36] ([fdo#103167]) -> [PASS][37]
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-apl4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-onoff.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-apl8/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-onoff.html
    - shard-kbl:          [FAIL][38] ([fdo#103167]) -> [PASS][39]
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-kbl1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-onoff.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-kbl1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-onoff.html

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-mmap-gtt:
    - shard-glk:          [FAIL][40] ([fdo#103167]) -> [PASS][41] +1 similar issue
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-glk8/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-mmap-gtt.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-glk6/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-mmap-gtt.html

  * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-shrfb-draw-mmap-wc:
    - shard-hsw:          [SKIP][42] ([fdo#109271]) -> [PASS][43] +17 similar issues
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-hsw1/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-shrfb-draw-mmap-wc.html
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-hsw7/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-shrfb-draw-mmap-wc.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - shard-kbl:          [INCOMPLETE][44] ([fdo#103665]) -> [PASS][45]
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-kbl2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-kbl1/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  * igt@perf_pmu@rc6:
    - shard-kbl:          [SKIP][46] ([fdo#109271]) -> [PASS][47]
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-kbl2/igt@perf_pmu@rc6.html
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-kbl6/igt@perf_pmu@rc6.html

  
#### Warnings ####

  * igt@kms_hdmi_inject@inject-audio:
    - shard-iclb:         [DMESG-FAIL][48] ([fdo#109593]) -> [FAIL][49] ([fdo#102370])
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6230/shard-iclb1/igt@kms_hdmi_inject@inject-audio.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/shard-iclb4/igt@kms_hdmi_inject@inject-audio.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#102370]: https://bugs.freedesktop.org/show_bug.cgi?id=102370
  [fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887
  [fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109593]: https://bugs.freedesktop.org/show_bug.cgi?id=109593
  [fdo#110667]: https://bugs.freedesktop.org/show_bug.cgi?id=110667
  [fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (10 -> 6)
------------------------------

  Missing    (4): pig-skl-6260u shard-skl pig-hsw-4770r pig-glk-j5005 


Build changes
-------------

  * IGT: IGT_5050 -> IGTPW_3137
  * Piglit: piglit_4509 -> None

  CI_DRM_6230: 57bd224fa47bfe2a2b83fbfcfc48aaded027d211 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3137: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/
  IGT_5050: 4c072238c784e6acb00634a80c3c55fb8358058b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3137/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 2/2] tests/kms_dp_dsc: Add a subtest to force DSC output BPP
  2019-06-11 19:55   ` Manasi Navare
@ 2019-06-13 22:33     ` Srivatsa, Anusha
  2019-06-20  0:44     ` Srivatsa, Anusha
  1 sibling, 0 replies; 9+ messages in thread
From: Srivatsa, Anusha @ 2019-06-13 22:33 UTC (permalink / raw)
  To: Navare, Manasi D; +Cc: igt-dev, Latvala, Petri



>-----Original Message-----
>From: Navare, Manasi D
>Sent: Tuesday, June 11, 2019 12:55 PM
>To: Srivatsa, Anusha <anusha.srivatsa@intel.com>
>Cc: igt-dev@lists.freedesktop.org; Latvala, Petri <petri.latvala@intel.com>
>Subject: Re: [PATCH i-g-t 2/2] tests/kms_dp_dsc: Add a subtest to force DSC
>output BPP
>
>On Mon, Jun 10, 2019 at 04:26:17PM -0700, Anusha Srivatsa wrote:
>> This subtest uses the accepted DSC BPPs and tries to force a modeset
>> by setting a certain BPP as the output BPP for a connector.
>>
>> Cc: Petri Latvala <petri.latvala@intel.com>
>> Cc: Manasi Navare <manasi.d.navare@intel.com>
>> Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
>> ---
>>  tests/kms_dp_dsc.c | 94
>> +++++++++++++++++++++++++++++++++++++++++++++-
>>  1 file changed, 92 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/kms_dp_dsc.c b/tests/kms_dp_dsc.c index
>> 7f2bf276..f936eb33 100644
>> --- a/tests/kms_dp_dsc.c
>> +++ b/tests/kms_dp_dsc.c
>> @@ -46,7 +46,8 @@
>>
>>  enum dsc_test_type
>>  {
>> -	test_basic_dsc_enable
>> +	test_basic_dsc_enable,
>> +	test_basic_dsc_enable_bpp
>>  };
>>
>>  typedef struct {
>> @@ -67,6 +68,7 @@ typedef struct {
>>
>>  bool force_dsc_en_orig;
>>  int force_dsc_restore_fd = -1;
>> +int new_bpp;
>>
>>  static inline void manual(const char *expected)  { @@ -157,6 +159,17
>> @@ static void restore_force_dsc_en(void)
>>  	force_dsc_restore_fd = -1;
>>  }
>>
>> +static void force_dp_dsc_enable_bpp(data_t *data) {
>> +	char file_name[128] = {0};
>> +	char buffer[20];
>> +	sprintf(buffer, "%d", new_bpp);
>> +	strcpy(file_name, data->conn_name);
>> +	strcat(file_name, "/i915_dsc_bpp_slice_support");
>> +	igt_debug ("Forcing DSC BPP to %d on %s\n", new_bpp, data-
>>conn_name);
>> +	igt_sysfs_write(data->debugfs_fd, file_name, buffer,
>> +sizeof(buffer));
>
>Check the return value of igt_sysfs_write and assert if write failed

Yes. Makes sense.

>> +}
>> +
>>  static void test_cleanup(data_t *data)  {
>>  	igt_plane_t *primary;
>> @@ -229,6 +242,44 @@ static void update_display(data_t *data, enum
>dsc_test_type test_type)
>>  			     "Default DSC enable failed on Connector: %s Pipe:
>%s\n",
>>  			     data->conn_name,
>>  			     kmstest_pipe_name(data->pipe));
>> +	} else if (test_type == test_basic_dsc_enable_bpp) {
>> +		bool enabled;
>> +
>> +		igt_debug("DSC is supported on %s\n", data->conn_name);
>> +
>
>Unnecessary newline
>
>> +		save_force_dsc_en(data);
>> +		force_dp_dsc_enable(data);
>> +
>> +		igt_debug("Trying to set BPP to %d\n", new_bpp);
>> +
>> +		force_dp_dsc_enable_bpp(data);
>> +
>> +		igt_output_set_pipe(data->output, data->pipe);
>> +		igt_create_pattern_fb(data->drm_fd, data->mode->hdisplay,
>> +				      data->mode->vdisplay,
>> +				      DRM_FORMAT_XRGB8888,
>> +				      LOCAL_DRM_FORMAT_MOD_NONE,
>> +				      &data->fb_test_pattern);
>> +		primary = igt_output_get_plane_type(data->output,
>> +					    DRM_PLANE_TYPE_PRIMARY);
>> +		/* Now set the output to the desired mode */
>> +		igt_plane_set_fb(primary, &data->fb_test_pattern);
>> +		igt_display_commit(&data->display);
>> +
>> +		/*
>> +		 * Until we have CRC check support, manually check if RGB test
>> +		 * pattern has no corruption.
>> +		 */
>> +		manual("RGB test pattern without corruption");
>> +
>> +		enabled = is_dp_dsc_enabled(data);
>> +		restore_force_dsc_en();
>
>Not sure if we need to restore the DSC BPP value? What does the kernel code set
>the force_dsc_bpp value to if not forced by IGT?

I don't think we need it. Force_enable_bpp gets set iff we are forcing the dsc. If we are not forcing dsc, and the kernel does DSC because of the resolution restrictions, it computes the compressed bpp according to the calculation that are part of compute_dsc_params() and nothing to do with this value.

>
>> +
>> +		igt_assert_f(enabled,
>> +			     "Default DSC BPP enable failed on Connector: %s
>Pipe: %s\n",
>> +			     data->conn_name,
>> +			     kmstest_pipe_name(data->pipe));
>> +
>>  	} else {
>>  		igt_assert(!"Unknown test type\n");
>>  	}
>> @@ -256,7 +307,9 @@ igt_main
>>  	igt_output_t *output;
>>  	drmModeRes *res;
>>  	drmModeConnector *connector;
>> -	int i, test_conn_cnt, test_cnt;
>> +	int i, j, test_conn_cnt, test_cnt;
>> +	int dp_dsc_supported_compressed_bpp[] = {8, 10, 12, 15};
>
> May be a add a comment here saying these are the supported compressed BPPs
>on Gen 11

Sure. 
>> +
>>  	int tests[] = {DRM_MODE_CONNECTOR_eDP,
>> DRM_MODE_CONNECTOR_DisplayPort};
>>
>>  	igt_fixture {
>> @@ -300,6 +353,43 @@ igt_main
>>  			}
>>  			igt_skip_on(test_conn_cnt == 0);
>>  		}
>> +
>> +		for (j = 0; j < ARRAY_SIZE(dp_dsc_supported_compressed_bpp);
>j++) {
>> +			new_bpp = dp_dsc_supported_compressed_bpp[j];
>> +			igt_subtest_f("basic-dsc-enable-%dbpp-%s", new_bpp,
>> +				      kmstest_connector_type_str(tests[test_cnt]))
>{
>> +			test_conn_cnt = 0;
>
>Check the indentation for the code within the igt_subtest_f, it needs one more
>tab
>
>> +			for (i = 0; i < res->count_connectors; i++) {
>> +				connector =
>drmModeGetConnectorCurrent(data.drm_fd,
>> +								       res-
>>connectors[i]);
>> +				if (connector->connection !=
>DRM_MODE_CONNECTED ||
>> +				    connector->connector_type !=
>> +				    tests[test_cnt])
>> +					continue;
>> +				output =
>igt_output_from_connector(&data.display, connector);
>> +				sprintf(data.conn_name, "%s-%d",
>> +					kmstest_connector_type_str(connector-
>>connector_type),
>> +					connector->connector_type_id);
>> +				printf("connector name: %s test_conn_count
>%d\n", data.conn_name,
>> +test_conn_cnt++);
>
>printf is redundant here, if you want you could have this in igt_debug so its
>printed only for debug

Yes I agree. This was for my debugging. I will remove this. I dont think we need it to be in a igt_debug also.

Anusha
>
>> +				if(!is_dp_dsc_supported(&data)) {
>> +				   igt_debug("DSC not supported on connector
>%s \n",
>> +					     data.conn_name);
>> +					continue;
>> +                                 }
>> +				if (connector->connector_type ==
>DRM_MODE_CONNECTOR_DisplayPort &&
>> +				    !is_dp_fec_supported(&data)) {
>> +					igt_debug("DSC cannot be enabled
>without FEC on %s\n",
>> +						  data.conn_name);
>> +					continue;
>> +				}
>> +
>
>Redundant newline
>
>Manasi
>
>
>> +				test_conn_cnt++;
>> +				run_test(&data, output,
>test_basic_dsc_enable_bpp);
>> +				}
>> +				igt_skip_on(test_conn_cnt == 0);
>> +			}
>> +		}
>> +
>>  	}
>>
>>  	igt_fixture {
>> --
>> 2.17.1
>>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 2/2] tests/kms_dp_dsc: Add a subtest to force DSC output BPP
  2019-06-11 19:55   ` Manasi Navare
  2019-06-13 22:33     ` Srivatsa, Anusha
@ 2019-06-20  0:44     ` Srivatsa, Anusha
  1 sibling, 0 replies; 9+ messages in thread
From: Srivatsa, Anusha @ 2019-06-20  0:44 UTC (permalink / raw)
  To: Navare, Manasi D; +Cc: igt-dev, Latvala, Petri

The subtest  is still unstable.
The debugfs node - i915_dsc_fec_support is both read and write. We use it to check if sink supports DSC and to force the DSC, Which I think leave it unstable when used for the second time - for the bpp subtest.
IT is either the debugfs node state or maybe the crtc state from the force-dsc subtest that is causing the unstable nature,

Is it a good option to separate the debugfs nodes to read and write specific ?

Manasi, what do you think?

Anusha 

>-----Original Message-----
>From: Navare, Manasi D
>Sent: Tuesday, June 11, 2019 12:55 PM
>To: Srivatsa, Anusha <anusha.srivatsa@intel.com>
>Cc: igt-dev@lists.freedesktop.org; Latvala, Petri <petri.latvala@intel.com>
>Subject: Re: [PATCH i-g-t 2/2] tests/kms_dp_dsc: Add a subtest to force DSC
>output BPP
>
>On Mon, Jun 10, 2019 at 04:26:17PM -0700, Anusha Srivatsa wrote:
>> This subtest uses the accepted DSC BPPs and tries to force a modeset
>> by setting a certain BPP as the output BPP for a connector.
>>
>> Cc: Petri Latvala <petri.latvala@intel.com>
>> Cc: Manasi Navare <manasi.d.navare@intel.com>
>> Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
>> ---
>>  tests/kms_dp_dsc.c | 94
>> +++++++++++++++++++++++++++++++++++++++++++++-
>>  1 file changed, 92 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/kms_dp_dsc.c b/tests/kms_dp_dsc.c index
>> 7f2bf276..f936eb33 100644
>> --- a/tests/kms_dp_dsc.c
>> +++ b/tests/kms_dp_dsc.c
>> @@ -46,7 +46,8 @@
>>
>>  enum dsc_test_type
>>  {
>> -	test_basic_dsc_enable
>> +	test_basic_dsc_enable,
>> +	test_basic_dsc_enable_bpp
>>  };
>>
>>  typedef struct {
>> @@ -67,6 +68,7 @@ typedef struct {
>>
>>  bool force_dsc_en_orig;
>>  int force_dsc_restore_fd = -1;
>> +int new_bpp;
>>
>>  static inline void manual(const char *expected)  { @@ -157,6 +159,17
>> @@ static void restore_force_dsc_en(void)
>>  	force_dsc_restore_fd = -1;
>>  }
>>
>> +static void force_dp_dsc_enable_bpp(data_t *data) {
>> +	char file_name[128] = {0};
>> +	char buffer[20];
>> +	sprintf(buffer, "%d", new_bpp);
>> +	strcpy(file_name, data->conn_name);
>> +	strcat(file_name, "/i915_dsc_bpp_slice_support");
>> +	igt_debug ("Forcing DSC BPP to %d on %s\n", new_bpp, data-
>>conn_name);
>> +	igt_sysfs_write(data->debugfs_fd, file_name, buffer,
>> +sizeof(buffer));
>
>Check the return value of igt_sysfs_write and assert if write failed
>
>> +}
>> +
>>  static void test_cleanup(data_t *data)  {
>>  	igt_plane_t *primary;
>> @@ -229,6 +242,44 @@ static void update_display(data_t *data, enum
>dsc_test_type test_type)
>>  			     "Default DSC enable failed on Connector: %s Pipe:
>%s\n",
>>  			     data->conn_name,
>>  			     kmstest_pipe_name(data->pipe));
>> +	} else if (test_type == test_basic_dsc_enable_bpp) {
>> +		bool enabled;
>> +
>> +		igt_debug("DSC is supported on %s\n", data->conn_name);
>> +
>
>Unnecessary newline
>
>> +		save_force_dsc_en(data);
>> +		force_dp_dsc_enable(data);
>> +
>> +		igt_debug("Trying to set BPP to %d\n", new_bpp);
>> +
>> +		force_dp_dsc_enable_bpp(data);
>> +
>> +		igt_output_set_pipe(data->output, data->pipe);
>> +		igt_create_pattern_fb(data->drm_fd, data->mode->hdisplay,
>> +				      data->mode->vdisplay,
>> +				      DRM_FORMAT_XRGB8888,
>> +				      LOCAL_DRM_FORMAT_MOD_NONE,
>> +				      &data->fb_test_pattern);
>> +		primary = igt_output_get_plane_type(data->output,
>> +					    DRM_PLANE_TYPE_PRIMARY);
>> +		/* Now set the output to the desired mode */
>> +		igt_plane_set_fb(primary, &data->fb_test_pattern);
>> +		igt_display_commit(&data->display);
>> +
>> +		/*
>> +		 * Until we have CRC check support, manually check if RGB test
>> +		 * pattern has no corruption.
>> +		 */
>> +		manual("RGB test pattern without corruption");
>> +
>> +		enabled = is_dp_dsc_enabled(data);
>> +		restore_force_dsc_en();
>
>Not sure if we need to restore the DSC BPP value? What does the kernel code set
>the force_dsc_bpp value to if not forced by IGT?
>
>> +
>> +		igt_assert_f(enabled,
>> +			     "Default DSC BPP enable failed on Connector: %s
>Pipe: %s\n",
>> +			     data->conn_name,
>> +			     kmstest_pipe_name(data->pipe));
>> +
>>  	} else {
>>  		igt_assert(!"Unknown test type\n");
>>  	}
>> @@ -256,7 +307,9 @@ igt_main
>>  	igt_output_t *output;
>>  	drmModeRes *res;
>>  	drmModeConnector *connector;
>> -	int i, test_conn_cnt, test_cnt;
>> +	int i, j, test_conn_cnt, test_cnt;
>> +	int dp_dsc_supported_compressed_bpp[] = {8, 10, 12, 15};
>
> May be a add a comment here saying these are the supported compressed BPPs
>on Gen 11
>
>> +
>>  	int tests[] = {DRM_MODE_CONNECTOR_eDP,
>> DRM_MODE_CONNECTOR_DisplayPort};
>>
>>  	igt_fixture {
>> @@ -300,6 +353,43 @@ igt_main
>>  			}
>>  			igt_skip_on(test_conn_cnt == 0);
>>  		}
>> +
>> +		for (j = 0; j < ARRAY_SIZE(dp_dsc_supported_compressed_bpp);
>j++) {
>> +			new_bpp = dp_dsc_supported_compressed_bpp[j];
>> +			igt_subtest_f("basic-dsc-enable-%dbpp-%s", new_bpp,
>> +				      kmstest_connector_type_str(tests[test_cnt]))
>{
>> +			test_conn_cnt = 0;
>
>Check the indentation for the code within the igt_subtest_f, it needs one more
>tab
>
>> +			for (i = 0; i < res->count_connectors; i++) {
>> +				connector =
>drmModeGetConnectorCurrent(data.drm_fd,
>> +								       res-
>>connectors[i]);
>> +				if (connector->connection !=
>DRM_MODE_CONNECTED ||
>> +				    connector->connector_type !=
>> +				    tests[test_cnt])
>> +					continue;
>> +				output =
>igt_output_from_connector(&data.display, connector);
>> +				sprintf(data.conn_name, "%s-%d",
>> +					kmstest_connector_type_str(connector-
>>connector_type),
>> +					connector->connector_type_id);
>> +				printf("connector name: %s test_conn_count
>%d\n", data.conn_name,
>> +test_conn_cnt++);
>
>printf is redundant here, if you want you could have this in igt_debug so its
>printed only for debug
>
>> +				if(!is_dp_dsc_supported(&data)) {
>> +				   igt_debug("DSC not supported on connector
>%s \n",
>> +					     data.conn_name);
>> +					continue;
>> +                                 }
>> +				if (connector->connector_type ==
>DRM_MODE_CONNECTOR_DisplayPort &&
>> +				    !is_dp_fec_supported(&data)) {
>> +					igt_debug("DSC cannot be enabled
>without FEC on %s\n",
>> +						  data.conn_name);
>> +					continue;
>> +				}
>> +
>
>Redundant newline
>
>Manasi
>
>
>> +				test_conn_cnt++;
>> +				run_test(&data, output,
>test_basic_dsc_enable_bpp);
>> +				}
>> +				igt_skip_on(test_conn_cnt == 0);
>> +			}
>> +		}
>> +
>>  	}
>>
>>  	igt_fixture {
>> --
>> 2.17.1
>>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [igt-dev] [PATCH i-g-t 2/2] tests/kms_dp_dsc: Add a subtest to force DSC output BPP
  2019-05-29 23:39 [igt-dev] [PATCH i-g-t 1/2] tests/kms_dp_dsc: Create subtest if connector is connected Anusha
@ 2019-05-29 23:39 ` Anusha
  0 siblings, 0 replies; 9+ messages in thread
From: Anusha @ 2019-05-29 23:39 UTC (permalink / raw)
  To: igt-dev; +Cc: Manasi Navare, Anusha Srivatsa, Petri Latvala

From: Anusha Srivatsa <anusha.srivatsa@intel.com>

This subtest uses the accepted DSC BPPs and tries to
force a modeset by setting a certain BPP as the output
BPP for a connector.

Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
---
 tests/kms_dp_dsc.c | 60 ++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 56 insertions(+), 4 deletions(-)

diff --git a/tests/kms_dp_dsc.c b/tests/kms_dp_dsc.c
index b99037af..5dde1e79 100644
--- a/tests/kms_dp_dsc.c
+++ b/tests/kms_dp_dsc.c
@@ -46,7 +46,8 @@
 
 enum dsc_test_type
 {
-	test_basic_dsc_enable
+	test_basic_dsc_enable,
+	test_basic_dsc_enable_bpp
 };
 
 typedef struct {
@@ -67,6 +68,7 @@ typedef struct {
 
 bool force_dsc_en_orig;
 int force_dsc_restore_fd = -1;
+int new_bpp;
 
 static inline void manual(const char *expected)
 {
@@ -159,6 +161,18 @@ static void restore_force_dsc_en(void)
 	force_dsc_restore_fd = -1;
 }
 
+static void force_dp_dsc_enable_bpp(data_t *data)
+{
+	char file_name[128] = {0};
+	int ret;
+	char buffer[20];
+	sprintf(buffer, "%d", new_bpp);
+	strcpy(file_name, data->conn_name);
+	strcat(file_name, "/i915_dsc_bpp_slice_support");
+	igt_debug ("Forcing DSC BPP to %d on %s\n", new_bpp, data->conn_name);
+	ret = igt_sysfs_write(data->debugfs_fd, file_name, buffer, sizeof(buffer));
+}
+
 static void test_cleanup(data_t *data)
 {
 	igt_plane_t *primary;
@@ -231,9 +245,38 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 			     "Default DSC enable failed on Connector: %s Pipe: %s\n",
 			     data->conn_name,
 			     kmstest_pipe_name(data->pipe));
-	} else {
+	} else if (test_type == test_basic_dsc_enable_bpp) {
+
+	igt_debug("DSC is supported on %s\n", data->conn_name);
+
+	save_force_dsc_en(data);
+	force_dp_dsc_enable(data);
+
+	igt_debug("Trying to set BPP to %d\n", new_bpp);
+
+	force_dp_dsc_enable_bpp(data);
+
+	igt_output_set_pipe(data->output, data->pipe);
+	igt_create_pattern_fb(data->drm_fd, data->mode->hdisplay,
+			      data->mode->vdisplay,
+			      DRM_FORMAT_XRGB8888,
+			      LOCAL_DRM_FORMAT_MOD_NONE,
+			      &data->fb_test_pattern);
+	primary = igt_output_get_plane_type(data->output,
+					    DRM_PLANE_TYPE_PRIMARY);
+
+	/* Now set the output to the desired mode */
+	igt_plane_set_fb(primary, &data->fb_test_pattern);
+	igt_display_commit(&data->display);
+
+	/*
+	 * Until we have CRC check support, manually check if RGB test
+	 * pattern has no corruption.
+	 */
+	manual("RGB test pattern without corruption");
+
+	} else
 		igt_assert(!"Unknown test type\n");
-	}
 }
 
 static void run_test(data_t *data, igt_output_t *output,
@@ -258,7 +301,8 @@ igt_main
 	igt_output_t *output;
 	drmModeRes *res;
 	drmModeConnector *connector;
-	int i, test_conn_cnt, test_cnt;
+	int i, j, test_conn_cnt, test_cnt;
+	int dp_dsc_supported_compressed_bpp[] = {8, 10, 12, 15};
 	int tests[] = {DRM_MODE_CONNECTOR_eDP, DRM_MODE_CONNECTOR_DisplayPort};
 
 	igt_fixture {
@@ -298,6 +342,14 @@ igt_main
 			igt_subtest_f("basic-dsc-enable-%s",
 				      kmstest_connector_type_str(tests[test_cnt]))
 			run_test(&data, output, test_basic_dsc_enable);
+
+			/* Loop through all accepted DSC BPP's */
+			for (j = 0; j < ARRAY_SIZE(dp_dsc_supported_compressed_bpp); j++) {
+				new_bpp = dp_dsc_supported_compressed_bpp[j];
+				igt_subtest_f("basic-dsc-enable-%dbpp-%s", new_bpp,
+					      kmstest_connector_type_str(tests[test_cnt]))
+				run_test(&data, output, test_basic_dsc_enable_bpp);
+			}
 			igt_skip_on(test_conn_cnt == 0);
 		}
 	}
-- 
2.17.1

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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-06-20  0:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-10 23:26 [igt-dev] [PATCH i-g-t 1/2] tests/kms_dp_dsc: Read the debugfs only once Anusha Srivatsa
2019-06-10 23:26 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_dp_dsc: Add a subtest to force DSC output BPP Anusha Srivatsa
2019-06-11 19:55   ` Manasi Navare
2019-06-13 22:33     ` Srivatsa, Anusha
2019-06-20  0:44     ` Srivatsa, Anusha
2019-06-11  0:07 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/kms_dp_dsc: Read the debugfs only once Patchwork
2019-06-11 19:07 ` [igt-dev] [PATCH i-g-t 1/2] " Manasi Navare
2019-06-12  8:00 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/2] " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2019-05-29 23:39 [igt-dev] [PATCH i-g-t 1/2] tests/kms_dp_dsc: Create subtest if connector is connected Anusha
2019-05-29 23:39 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_dp_dsc: Add a subtest to force DSC output BPP Anusha

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.