All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] tests: Share the code handling PSR debugfs parsing
@ 2018-10-04 20:59 José Roberto de Souza
  2018-10-04 20:59 ` [igt-dev] [PATCH i-g-t 2/2] lib/psr: Add support to new modified i915_edp_psr_status output José Roberto de Souza
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: José Roberto de Souza @ 2018-10-04 20:59 UTC (permalink / raw)
  To: igt-dev; +Cc: Dhinakaran Pandiyan

The same code checking if sink supports PSR was spread into 3 tests,
better move it to lib and reuse.
Also kms_fbcon_fbt was doing its own handling to wait for PSR to get
enabled while it is already available in lib.

Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 lib/igt_psr.c                    |  9 +++++++++
 lib/igt_psr.h                    |  1 +
 tests/kms_fbcon_fbt.c            | 26 ++------------------------
 tests/kms_frontbuffer_tracking.c |  8 +-------
 tests/kms_psr.c                  |  8 +-------
 5 files changed, 14 insertions(+), 38 deletions(-)

diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index 0ddfb64f..f36496fd 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -129,3 +129,12 @@ bool psr_disable(int debugfs_fd)
 {
 	return psr_set(debugfs_fd, false);
 }
+
+bool psr_supported(int debugfs_fd)
+{
+	char buf[512];
+
+	igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
+				sizeof(buf));
+	return strstr(buf, "Sink_Support: yes\n");
+}
diff --git a/lib/igt_psr.h b/lib/igt_psr.h
index b9693822..a4fcf325 100644
--- a/lib/igt_psr.h
+++ b/lib/igt_psr.h
@@ -32,5 +32,6 @@ bool psr_wait_entry(int debugfs_fd);
 bool psr_wait_exit(int debugfs_fd);
 bool psr_enable(int debugfs_fd);
 bool psr_disable(int debugfs_fd);
+bool psr_supported(int debugfs_fd);
 
 #endif
diff --git a/tests/kms_fbcon_fbt.c b/tests/kms_fbcon_fbt.c
index 24d3ad90..32407709 100644
--- a/tests/kms_fbcon_fbt.c
+++ b/tests/kms_fbcon_fbt.c
@@ -168,19 +168,6 @@ static void set_mode_for_one_screen(struct drm_info *drm, struct igt_fb *fb,
 	igt_assert_eq(rc, 0);
 }
 
-static bool psr_supported_on_chipset(int debugfs_fd)
-{
-	char buf[256];
-	int ret;
-
-	ret = igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status",
-				      buf, sizeof(buf));
-	if (ret < 0)
-		return false;
-
-	return strstr(buf, "Sink_Support: yes\n");
-}
-
 static bool connector_can_psr(drmModeConnectorPtr connector)
 {
 	return (connector->connector_type == DRM_MODE_CONNECTOR_eDP);
@@ -195,18 +182,9 @@ static void psr_print_status(int debugfs_fd)
 	igt_debug("PSR status: %s\n", buf);
 }
 
-static bool psr_is_enabled(int debugfs_fd)
-{
-	char buf[256];
-
-	igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
-				sizeof(buf));
-	return strstr(buf, "\nHW Enabled & Active bit: yes\n");
-}
-
 static bool psr_wait_until_enabled(int debugfs_fd)
 {
-	bool r = igt_wait(psr_is_enabled(debugfs_fd), 5000, 1);
+	bool r = psr_wait_entry(debugfs_fd);
 
 	psr_print_status(debugfs_fd);
 	return r;
@@ -239,7 +217,7 @@ struct feature {
 	.connector_possible_fn = connector_can_fbc,
 	.enable = fbc_modparam_enable,
 }, psr = {
-	.supported_on_chipset = psr_supported_on_chipset,
+	.supported_on_chipset = psr_supported,
 	.wait_until_enabled = psr_wait_until_enabled,
 	.connector_possible_fn = connector_can_psr,
 	.enable = psr_debugfs_enable,
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 9aecb815..1725217b 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -1419,13 +1419,7 @@ static void teardown_fbc(void)
 
 static bool psr_sink_has_support(void)
 {
-	char buf[256];
-
-	debugfs_read("i915_edp_psr_status", buf);
-	if (*buf == '\0') /* !HAS_PSR -> -ENODEV*/
-		return false;
-
-	return strstr(buf, "Sink_Support: yes\n");
+	return psr_supported(drm.debugfs);
 }
 
 static void setup_psr(void)
diff --git a/tests/kms_psr.c b/tests/kms_psr.c
index 9767f475..b8ce7c4d 100644
--- a/tests/kms_psr.c
+++ b/tests/kms_psr.c
@@ -190,13 +190,7 @@ static void fill_render(data_t *data, uint32_t handle, unsigned char color)
 
 static bool sink_support(data_t *data)
 {
-	char buf[512];
-
-	igt_debugfs_simple_read(data->debugfs_fd, "i915_edp_psr_status",
-			 buf, sizeof(buf));
-
-	return data->with_psr_disabled ||
-		strstr(buf, "Sink_Support: yes\n");
+	return data->with_psr_disabled || psr_supported(data->debugfs_fd);
 }
 
 static bool psr_wait_entry_if_enabled(data_t *data)
-- 
2.19.0

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

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

* [igt-dev] [PATCH i-g-t 2/2] lib/psr: Add support to new modified i915_edp_psr_status output
  2018-10-04 20:59 [igt-dev] [PATCH i-g-t 1/2] tests: Share the code handling PSR debugfs parsing José Roberto de Souza
@ 2018-10-04 20:59 ` José Roberto de Souza
  2018-10-05 22:42   ` Dhinakaran Pandiyan
  2018-10-04 22:10 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests: Share the code handling PSR debugfs parsing Patchwork
  2018-10-05  4:33 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2 siblings, 1 reply; 7+ messages in thread
From: José Roberto de Souza @ 2018-10-04 20:59 UTC (permalink / raw)
  To: igt-dev; +Cc: Dhinakaran Pandiyan

The kernel patch 'drm/i915: Refactor PSR status debugfs' changed the
output of i915_edp_psr_status, so adding support to the new output
here while keeping the support to the old one for a while.

Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 lib/igt_psr.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index f36496fd..a48c9232 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -32,8 +32,10 @@ static bool psr_active(int debugfs_fd, bool check_active)
 
 	igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
 				sizeof(buf));
-	active = strstr(buf, "HW Enabled & Active bit: yes\n") &&
-		(strstr(buf, "SRDENT") || strstr(buf, "SLEEP"));
+
+	active = (strstr(buf, "HW Enabled & Active bit: yes\n") ||
+		  strstr(buf, "Source PSR ctl: enabled")) &&
+		 (strstr(buf, "SRDENT") || strstr(buf, "SLEEP"));
 	return check_active ? active : !active;
 }
 
@@ -136,5 +138,6 @@ bool psr_supported(int debugfs_fd)
 
 	igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
 				sizeof(buf));
-	return strstr(buf, "Sink_Support: yes\n");
+	return strstr(buf, "Sink_Support: yes\n") ||
+	       strstr(buf, "Sink support: yes");
 }
-- 
2.19.0

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests: Share the code handling PSR debugfs parsing
  2018-10-04 20:59 [igt-dev] [PATCH i-g-t 1/2] tests: Share the code handling PSR debugfs parsing José Roberto de Souza
  2018-10-04 20:59 ` [igt-dev] [PATCH i-g-t 2/2] lib/psr: Add support to new modified i915_edp_psr_status output José Roberto de Souza
@ 2018-10-04 22:10 ` Patchwork
  2018-10-05  4:33 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2018-10-04 22:10 UTC (permalink / raw)
  To: José Roberto de Souza; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/2] tests: Share the code handling PSR debugfs parsing
URL   : https://patchwork.freedesktop.org/series/50574/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4931 -> IGTPW_1912 =

== Summary - SUCCESS ==

  No regressions found.

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

== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_module_reload@basic-reload:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#106248, fdo#106725)

    igt@kms_chamelium@dp-crc-fast:
      fi-kbl-7500u:       PASS -> DMESG-FAIL (fdo#103841)

    igt@kms_flip@basic-flip-vs-modeset:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#106000)

    
    ==== Possible fixes ====

    igt@drv_module_reload@basic-reload:
      fi-blb-e6850:       INCOMPLETE (fdo#107718) -> PASS

    igt@gem_ctx_param@basic-default:
      fi-pnv-d510:        INCOMPLETE (fdo#106007) -> SKIP

    igt@kms_frontbuffer_tracking@basic:
      fi-byt-clapper:     FAIL (fdo#103167) -> PASS

    igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
      fi-byt-clapper:     FAIL (fdo#107362, fdo#103191) -> PASS

    igt@kms_pipe_crc_basic@read-crc-pipe-a:
      fi-byt-clapper:     FAIL (fdo#107362) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-cfl-8109u:       INCOMPLETE (fdo#106070, fdo#108126) -> PASS

    
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841
  fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000
  fdo#106007 https://bugs.freedesktop.org/show_bug.cgi?id=106007
  fdo#106070 https://bugs.freedesktop.org/show_bug.cgi?id=106070
  fdo#106248 https://bugs.freedesktop.org/show_bug.cgi?id=106248
  fdo#106725 https://bugs.freedesktop.org/show_bug.cgi?id=106725
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
  fdo#108126 https://bugs.freedesktop.org/show_bug.cgi?id=108126


== Participating hosts (48 -> 41) ==

  Additional (1): fi-icl-u 
  Missing    (8): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-icl-u2 fi-bwr-2160 fi-bsw-cyan fi-ctg-p8600 fi-kbl-7560u 


== Build changes ==

    * IGT: IGT_4667 -> IGTPW_1912

  CI_DRM_4931: 826702bf60ae2b37841c051ed769b44af194fbb1 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1912: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1912/
  IGT_4667: 596f48dcd59fd2f8c16671514f3e69d4a2891374 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] tests: Share the code handling PSR debugfs parsing
  2018-10-04 20:59 [igt-dev] [PATCH i-g-t 1/2] tests: Share the code handling PSR debugfs parsing José Roberto de Souza
  2018-10-04 20:59 ` [igt-dev] [PATCH i-g-t 2/2] lib/psr: Add support to new modified i915_edp_psr_status output José Roberto de Souza
  2018-10-04 22:10 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests: Share the code handling PSR debugfs parsing Patchwork
@ 2018-10-05  4:33 ` Patchwork
  2 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2018-10-05  4:33 UTC (permalink / raw)
  To: José Roberto de Souza; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/2] tests: Share the code handling PSR debugfs parsing
URL   : https://patchwork.freedesktop.org/series/50574/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4667_full -> IGTPW_1912_full =

== Summary - WARNING ==

  Minor unknown changes coming with IGTPW_1912_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_1912_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/50574/revisions/1/mbox/

== Possible new issues ==

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

  === IGT changes ===

    ==== Warnings ====

    igt@pm_rc6_residency@rc6-accuracy:
      shard-snb:          PASS -> SKIP

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_suspend@fence-restore-tiled2untiled:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665)

    igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
      shard-glk:          PASS -> FAIL (fdo#108145)

    igt@kms_cursor_crc@cursor-128x128-onscreen:
      shard-kbl:          PASS -> FAIL (fdo#103232)

    igt@kms_cursor_crc@cursor-256x256-random:
      shard-glk:          PASS -> FAIL (fdo#103232) +7

    igt@kms_cursor_crc@cursor-64x21-sliding:
      shard-apl:          PASS -> FAIL (fdo#103232) +3

    igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
      shard-glk:          PASS -> FAIL (fdo#105363)

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-gtt:
      shard-kbl:          PASS -> FAIL (fdo#103167)

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
      shard-apl:          PASS -> FAIL (fdo#103167) +2

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-blt:
      shard-glk:          PASS -> FAIL (fdo#103167) +7

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-render:
      shard-snb:          SKIP -> INCOMPLETE (fdo#105411)

    igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
      shard-apl:          PASS -> FAIL (fdo#103166)

    igt@kms_universal_plane@universal-plane-pipe-a-functional:
      shard-glk:          PASS -> FAIL (fdo#103166) +1

    
    ==== Possible fixes ====

    igt@drv_suspend@fence-restore-untiled:
      shard-kbl:          INCOMPLETE (fdo#103665) -> PASS

    igt@gem_exec_big:
      shard-hsw:          TIMEOUT (fdo#107937) -> PASS

    igt@gem_mmap_gtt@medium-copy:
      shard-snb:          INCOMPLETE (fdo#105411) -> PASS

    igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
      shard-kbl:          DMESG-WARN (fdo#107956) -> PASS

    igt@kms_busy@extended-pageflip-hang-newfb-render-a:
      shard-glk:          DMESG-WARN (fdo#107956) -> PASS

    igt@kms_ccs@pipe-a-bad-pixel-format:
      shard-apl:          DMESG-WARN (fdo#105602, fdo#103558) -> PASS +6

    igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
      shard-kbl:          FAIL (fdo#108145) -> PASS

    igt@kms_cursor_crc@cursor-128x128-suspend:
      shard-apl:          FAIL (fdo#103232, fdo#103191) -> PASS
      shard-kbl:          FAIL (fdo#103232, fdo#103191) -> PASS

    igt@kms_cursor_crc@cursor-128x42-onscreen:
      shard-glk:          FAIL (fdo#103232) -> PASS +2

    igt@kms_cursor_crc@cursor-256x256-suspend:
      shard-apl:          DMESG-FAIL (fdo#105602, fdo#103558) -> PASS

    igt@kms_cursor_crc@cursor-64x21-random:
      shard-apl:          FAIL (fdo#103232) -> PASS +5

    igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
      shard-hsw:          FAIL (fdo#105767) -> PASS

    igt@kms_flip@flip-vs-expired-vblank-interruptible:
      shard-glk:          FAIL (fdo#105363, fdo#102887) -> PASS

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
      shard-apl:          FAIL (fdo#103167) -> PASS +5

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-fullscreen:
      shard-kbl:          FAIL (fdo#103167) -> PASS +1

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-cpu:
      shard-glk:          FAIL (fdo#103167) -> PASS +1

    igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
      shard-apl:          FAIL (fdo#103166) -> PASS +3

    igt@kms_plane_multiple@atomic-pipe-b-tiling-yf:
      shard-kbl:          FAIL (fdo#103166) -> PASS +1

    igt@kms_plane_multiple@atomic-pipe-c-tiling-x:
      shard-glk:          FAIL (fdo#103166) -> PASS +2

    
  fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
  fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
  fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
  fdo#105767 https://bugs.freedesktop.org/show_bug.cgi?id=105767
  fdo#107937 https://bugs.freedesktop.org/show_bug.cgi?id=107937
  fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
  fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145


== Participating hosts (6 -> 5) ==

  Missing    (1): shard-skl 


== Build changes ==

    * IGT: IGT_4667 -> IGTPW_1912
    * Linux: CI_DRM_4930 -> CI_DRM_4931

  CI_DRM_4930: bf1bd5e86f267d58ac68c342fcfff70e8ef1fd34 @ git://anongit.freedesktop.org/gfx-ci/linux
  CI_DRM_4931: 826702bf60ae2b37841c051ed769b44af194fbb1 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1912: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1912/
  IGT_4667: 596f48dcd59fd2f8c16671514f3e69d4a2891374 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* Re: [igt-dev] [PATCH i-g-t 2/2] lib/psr: Add support to new modified i915_edp_psr_status output
  2018-10-04 20:59 ` [igt-dev] [PATCH i-g-t 2/2] lib/psr: Add support to new modified i915_edp_psr_status output José Roberto de Souza
@ 2018-10-05 22:42   ` Dhinakaran Pandiyan
  2018-10-05 22:59     ` Souza, Jose
  0 siblings, 1 reply; 7+ messages in thread
From: Dhinakaran Pandiyan @ 2018-10-05 22:42 UTC (permalink / raw)
  To: José Roberto de Souza, igt-dev, Rodrigo Vivi

On Thu, 2018-10-04 at 13:59 -0700, José Roberto de Souza wrote:
> The kernel patch 'drm/i915: Refactor PSR status debugfs' 
Was this sent to the list already? I might have missed it.

> changed the
> output of i915_edp_psr_status, so adding support to the new output
> here while keeping the support to the old one for a while.
> 
> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> ---
>  lib/igt_psr.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/igt_psr.c b/lib/igt_psr.c
> index f36496fd..a48c9232 100644
> --- a/lib/igt_psr.c
> +++ b/lib/igt_psr.c
> @@ -32,8 +32,10 @@ static bool psr_active(int debugfs_fd, bool
> check_active)
>  
>  	igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
>  				sizeof(buf));
> -	active = strstr(buf, "HW Enabled & Active bit: yes\n") &&
> -		(strstr(buf, "SRDENT") || strstr(buf, "SLEEP"));
> +
> +	active = (strstr(buf, "HW Enabled & Active bit: yes\n") ||
> +		  strstr(buf, "Source PSR ctl: enabled")) &&
> +		 (strstr(buf, "SRDENT") || strstr(buf, "SLEEP"));
>  	return check_active ? active : !active;
>  }
>  
> @@ -136,5 +138,6 @@ bool psr_supported(int debugfs_fd)
>  
>  	igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
>  				sizeof(buf));
> -	return strstr(buf, "Sink_Support: yes\n");
> +	return strstr(buf, "Sink_Support: yes\n") ||
> +	       strstr(buf, "Sink support: yes");

This results in unnecessary commits. I think what can do is
1) send unrelated kernel fixes that pass CI and merge them.
2) send new debugfs changes and corresponding IGT changes to the list
for review.
3) merge igt patches after kernel debugfs changes are reviewed.
4) rerun tests on the reviewed kernel patches and merge them.




>  }

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

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

* Re: [igt-dev] [PATCH i-g-t 2/2] lib/psr: Add support to new modified i915_edp_psr_status output
  2018-10-05 22:42   ` Dhinakaran Pandiyan
@ 2018-10-05 22:59     ` Souza, Jose
  2018-10-05 23:25       ` Dhinakaran Pandiyan
  0 siblings, 1 reply; 7+ messages in thread
From: Souza, Jose @ 2018-10-05 22:59 UTC (permalink / raw)
  To: igt-dev, Pandiyan, Dhinakaran, Vivi, Rodrigo

On Fri, 2018-10-05 at 15:42 -0700, Dhinakaran Pandiyan wrote:
> On Thu, 2018-10-04 at 13:59 -0700, José Roberto de Souza wrote:
> > The kernel patch 'drm/i915: Refactor PSR status debugfs' 
> Was this sent to the list already? I might have missed it.
> 
> > changed the
> > output of i915_edp_psr_status, so adding support to the new output
> > here while keeping the support to the old one for a while.
> > 
> > Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> > ---
> >  lib/igt_psr.c | 9 ++++++---
> >  1 file changed, 6 insertions(+), 3 deletions(-)
> > 
> > diff --git a/lib/igt_psr.c b/lib/igt_psr.c
> > index f36496fd..a48c9232 100644
> > --- a/lib/igt_psr.c
> > +++ b/lib/igt_psr.c
> > @@ -32,8 +32,10 @@ static bool psr_active(int debugfs_fd, bool
> > check_active)
> >  
> >  	igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
> >  				sizeof(buf));
> > -	active = strstr(buf, "HW Enabled & Active bit: yes\n") &&
> > -		(strstr(buf, "SRDENT") || strstr(buf, "SLEEP"));
> > +
> > +	active = (strstr(buf, "HW Enabled & Active bit: yes\n") ||
> > +		  strstr(buf, "Source PSR ctl: enabled")) &&
> > +		 (strstr(buf, "SRDENT") || strstr(buf, "SLEEP"));
> >  	return check_active ? active : !active;
> >  }
> >  
> > @@ -136,5 +138,6 @@ bool psr_supported(int debugfs_fd)
> >  
> >  	igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
> >  				sizeof(buf));
> > -	return strstr(buf, "Sink_Support: yes\n");
> > +	return strstr(buf, "Sink_Support: yes\n") ||
> > +	       strstr(buf, "Sink support: yes");
> 
> This results in unnecessary commits. I think what can do is

You don't want to keep support for both for a while? Someone recently
sent a patch fixing PSR test for old kernels I think is worthy keeping
both at least for 1 or 2 kernel releases.

> 1) send unrelated kernel fixes that pass CI and merge them.
> 2) send new debugfs changes and corresponding IGT changes to the list
> for review.
> 3) merge igt patches after kernel debugfs changes are reviewed.
> 4) rerun tests on the reviewed kernel patches and merge them.

I'm okay in doing this way but it will just waste CI time running a
test that we know that will fail.

Could you then merge patch 1 to 4 maybe 7 too from 
https://patchwork.freedesktop.org/series/50526/ in kernel? 

Also the first one in this series is not related.

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

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

* Re: [igt-dev] [PATCH i-g-t 2/2] lib/psr: Add support to new modified i915_edp_psr_status output
  2018-10-05 22:59     ` Souza, Jose
@ 2018-10-05 23:25       ` Dhinakaran Pandiyan
  0 siblings, 0 replies; 7+ messages in thread
From: Dhinakaran Pandiyan @ 2018-10-05 23:25 UTC (permalink / raw)
  To: Souza, Jose, igt-dev, Vivi, Rodrigo

On Fri, 2018-10-05 at 15:59 -0700, Souza, Jose wrote:
> On Fri, 2018-10-05 at 15:42 -0700, Dhinakaran Pandiyan wrote:
> > On Thu, 2018-10-04 at 13:59 -0700, José Roberto de Souza wrote:
> > > The kernel patch 'drm/i915: Refactor PSR status debugfs' 
> > 
> > Was this sent to the list already? I might have missed it.
> > 
> > > changed the
> > > output of i915_edp_psr_status, so adding support to the new
> > > output
> > > here while keeping the support to the old one for a while.
> > > 
> > > Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> > > ---
> > >  lib/igt_psr.c | 9 ++++++---
> > >  1 file changed, 6 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/lib/igt_psr.c b/lib/igt_psr.c
> > > index f36496fd..a48c9232 100644
> > > --- a/lib/igt_psr.c
> > > +++ b/lib/igt_psr.c
> > > @@ -32,8 +32,10 @@ static bool psr_active(int debugfs_fd, bool
> > > check_active)
> > >  
> > >  	igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
> > >  				sizeof(buf));
> > > -	active = strstr(buf, "HW Enabled & Active bit: yes\n") &&
> > > -		(strstr(buf, "SRDENT") || strstr(buf, "SLEEP"));
> > > +
> > > +	active = (strstr(buf, "HW Enabled & Active bit: yes\n") ||
> > > +		  strstr(buf, "Source PSR ctl: enabled")) &&
> > > +		 (strstr(buf, "SRDENT") || strstr(buf, "SLEEP"));
> > >  	return check_active ? active : !active;
> > >  }
> > >  
> > > @@ -136,5 +138,6 @@ bool psr_supported(int debugfs_fd)
> > >  
> > >  	igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
> > >  				sizeof(buf));
> > > -	return strstr(buf, "Sink_Support: yes\n");
> > > +	return strstr(buf, "Sink_Support: yes\n") ||
> > > +	       strstr(buf, "Sink support: yes");
> > 
> > This results in unnecessary commits. I think what can do is
> 
> You don't want to keep support for both for a while? Someone recently
> sent a patch fixing PSR test for old kernels I think is worthy
> keeping
> both at least for 1 or 2 kernel releases.
> 
> > 1) send unrelated kernel fixes that pass CI and merge them.
> > 2) send new debugfs changes and corresponding IGT changes to the
> > list
> > for review.
> > 3) merge igt patches after kernel debugfs changes are reviewed.
> > 4) rerun tests on the reviewed kernel patches and merge them.
> 
> I'm okay in doing this way but it will just waste CI time running a
> test that we know that will fail.
The downside is we have confusing commits in git history. And debugfs
is not kernel ABI from what I understand. In any case, it is better to
not modify tests until the corresponding kernel patches are finalized. 

For instance, these changes - "Sink_Support" -> "Sink support" and "HW
Enabled & Active bit" -> "Source PSR ctl" aren't on the intel-gfx list
yet.



> 
> Could you then merge patch 1 to 4 maybe 7 too from 
> https://patchwork.freedesktop.org/series/50526/ in kernel? 
> 
> Also the first one in this series is not related.
Done, thanks for the patches.

-DK
> 
> > 
> > 
> > 
> > 
> > >  }

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

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

end of thread, other threads:[~2018-10-05 23:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-04 20:59 [igt-dev] [PATCH i-g-t 1/2] tests: Share the code handling PSR debugfs parsing José Roberto de Souza
2018-10-04 20:59 ` [igt-dev] [PATCH i-g-t 2/2] lib/psr: Add support to new modified i915_edp_psr_status output José Roberto de Souza
2018-10-05 22:42   ` Dhinakaran Pandiyan
2018-10-05 22:59     ` Souza, Jose
2018-10-05 23:25       ` Dhinakaran Pandiyan
2018-10-04 22:10 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests: Share the code handling PSR debugfs parsing Patchwork
2018-10-05  4:33 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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.