All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] lib/sysfs: Fix fbcon unbind, again
@ 2018-03-05 12:54 Ville Syrjala
  2018-03-05 12:54 ` [igt-dev] [PATCH i-g-t 2/2] lib/sysfs: s/kick_fbcon/bind_fbcon/ Ville Syrjala
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Ville Syrjala @ 2018-03-05 12:54 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Looks like unbinding the dummy con doesn't work on all machines. Instead
we have to bind fbcon (which is what we used to do before commit
d18fca7f6cf3 ("lib/sysfs: Fix fbcon rebind")). Since some machines need
the bind and others need the unbind let's do both. The most obvious
difference I observed between two machines that behave differently
was the order in which the console drivers were listed in sysfs.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_sysfs.c | 34 +++++++++++++++++++++++-----------
 1 file changed, 23 insertions(+), 11 deletions(-)

diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
index f8aae9d5c695..3b8308118432 100644
--- a/lib/igt_sysfs.c
+++ b/lib/igt_sysfs.c
@@ -503,14 +503,7 @@ bool igt_sysfs_set_boolean(int dir, const char *attr, bool value)
 	return igt_sysfs_printf(dir, attr, "%d", value) == 1;
 }
 
-/**
- * kick_fbcon:
- * @enable: boolean value
- *
- * This functions enables/disables the text console running on top of the
- * framebuffer device.
- */
-void kick_fbcon(bool enable)
+static void bind_con(const char *name, bool enable)
 {
 	const char *path = "/sys/class/vtconsole";
 	DIR *dir;
@@ -538,20 +531,39 @@ void kick_fbcon(bool enable)
 		if (len >= 0)
 			buf[len] = '\0';
 
-		if (!strstr(buf, enable ? "dummy device" :
-			    "frame buffer device"))
+		if (!strstr(buf, name))
 			continue;
 
 		sprintf(buf, "%s/%s/bind", path, de->d_name);
 		fd = open(buf, O_WRONLY);
 		if (fd != -1) {
-			igt_ignore_warn(write(fd, "0\n", 2));
+			igt_ignore_warn(write(fd, enable ? "1\n" : "0\n", 2));
 			close(fd);
 		}
+		break;
 	}
 	closedir(dir);
 }
 
+/**
+ * kick_fbcon:
+ * @enable: boolean value
+ *
+ * This functions enables/disables the text console running on top of the
+ * framebuffer device.
+ */
+void kick_fbcon(bool enable)
+{
+	/*
+	 * The vtcon bind interface seems somewhat broken. Possibly
+	 * depending on the order the console drivers have been
+	 * registered you either have to unbind the old driver,
+	 * or bind the new driver. Let's do both.
+	 */
+	bind_con("dummy device", !enable);
+	bind_con("frame buffer device", enable);
+}
+
 /**
  * kick_snd_hda_intel:
  *
-- 
2.16.1

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

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

* [igt-dev] [PATCH i-g-t 2/2] lib/sysfs: s/kick_fbcon/bind_fbcon/
  2018-03-05 12:54 [igt-dev] [PATCH i-g-t 1/2] lib/sysfs: Fix fbcon unbind, again Ville Syrjala
@ 2018-03-05 12:54 ` Ville Syrjala
  2018-03-05 16:32 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/sysfs: Fix fbcon unbind, again Patchwork
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Ville Syrjala @ 2018-03-05 12:54 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Rename kick_fbcon() into bind_fbcon() so that it's not so
confusing.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_core.c  | 4 ++--
 lib/igt_kmod.c  | 4 ++--
 lib/igt_sysfs.c | 4 ++--
 lib/igt_sysfs.h | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/igt_core.c b/lib/igt_core.c
index e52b806bdb01..5092a3f035c7 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -517,7 +517,7 @@ bool igt_exit_called;
 static void common_exit_handler(int sig)
 {
 	if (!igt_only_list_subtests()) {
-		kick_fbcon(true);
+		bind_fbcon(true);
 	}
 
 	/* When not killed by a signal check that igt_exit() has been properly
@@ -802,7 +802,7 @@ out:
 		exit(ret == -1 ? 0 : IGT_EXIT_INVALID);
 
 	if (!list_subtests) {
-		kick_fbcon(false);
+		bind_fbcon(false);
 		igt_kmsg(KMSG_INFO "%s: executing\n", command_str);
 		print_version();
 
diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
index bc1ace23ca2b..4f70e30d9de0 100644
--- a/lib/igt_kmod.c
+++ b/lib/igt_kmod.c
@@ -294,7 +294,7 @@ igt_i915_driver_load(const char *opts)
 		return IGT_EXIT_FAILURE;
 	}
 
-	kick_fbcon(true);
+	bind_fbcon(true);
 	igt_kmod_load("snd_hda_intel", NULL);
 
 	return IGT_EXIT_SUCCESS;
@@ -310,7 +310,7 @@ int
 igt_i915_driver_unload(void)
 {
 	/* unbind vt */
-	kick_fbcon(false);
+	bind_fbcon(false);
 
 	if (igt_kmod_is_loaded("snd_hda_intel")) {
 		igt_terminate_process(SIGTERM, "alsactl");
diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
index 3b8308118432..8efe889bebcd 100644
--- a/lib/igt_sysfs.c
+++ b/lib/igt_sysfs.c
@@ -546,13 +546,13 @@ static void bind_con(const char *name, bool enable)
 }
 
 /**
- * kick_fbcon:
+ * bind_fbcon:
  * @enable: boolean value
  *
  * This functions enables/disables the text console running on top of the
  * framebuffer device.
  */
-void kick_fbcon(bool enable)
+void bind_fbcon(bool enable)
 {
 	/*
 	 * The vtcon bind interface seems somewhat broken. Possibly
diff --git a/lib/igt_sysfs.h b/lib/igt_sysfs.h
index 74e61060d224..2ce5b7bd841d 100644
--- a/lib/igt_sysfs.h
+++ b/lib/igt_sysfs.h
@@ -55,7 +55,7 @@ bool igt_sysfs_set_u32(int dir, const char *attr, uint32_t value);
 bool igt_sysfs_get_boolean(int dir, const char *attr);
 bool igt_sysfs_set_boolean(int dir, const char *attr, bool value);
 
-void kick_fbcon(bool enable);
+void bind_fbcon(bool enable);
 void kick_snd_hda_intel(void);
 
 #endif /* __IGT_SYSFS_H__ */
-- 
2.16.1

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/sysfs: Fix fbcon unbind, again
  2018-03-05 12:54 [igt-dev] [PATCH i-g-t 1/2] lib/sysfs: Fix fbcon unbind, again Ville Syrjala
  2018-03-05 12:54 ` [igt-dev] [PATCH i-g-t 2/2] lib/sysfs: s/kick_fbcon/bind_fbcon/ Ville Syrjala
@ 2018-03-05 16:32 ` Patchwork
  2018-03-05 17:34 ` [igt-dev] [PATCH i-g-t 1/2] " Chris Wilson
  2018-03-05 21:16 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/2] " Patchwork
  3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-03-05 16:32 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/2] lib/sysfs: Fix fbcon unbind, again
URL   : https://patchwork.freedesktop.org/series/39377/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
23f7da18a92059610792299cfdb03d2c922a9948 lib/igt_pm: Restore runtime pm state on test exit

with latest DRM-Tip kernel build CI_DRM_3872
4a3784737699 drm-tip: 2018y-03m-05d-14h-32m-57s UTC integration manifest

No testlist changes.

---- Known issues:

Test gem_mmap_gtt:
        Subgroup basic-small-bo-tiledx:
                pass       -> FAIL       (fi-gdg-551) fdo#102575
Test kms_chamelium:
        Subgroup dp-edid-read:
                pass       -> FAIL       (fi-kbl-7500u) fdo#102505
Test prime_vgem:
        Subgroup basic-fence-flip:
                fail       -> PASS       (fi-ilk-650) fdo#104008

fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#102505 https://bugs.freedesktop.org/show_bug.cgi?id=102505
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:425s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:426s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:373s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:503s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:279s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:491s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:493s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:490s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:472s
fi-cfl-8700k     total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:411s
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:577s
fi-cfl-u         total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:503s
fi-cnl-y3        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:580s
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:417s
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:291s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:517s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:400s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:409s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:462s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:423s
fi-kbl-7500u     total:288  pass:262  dwarn:1   dfail:0   fail:1   skip:24  time:474s
fi-kbl-7560u     total:108  pass:104  dwarn:0   dfail:0   fail:0   skip:3  
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:461s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:508s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:584s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:434s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:523s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:534s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:498s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:493s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:429s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:430s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:514s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:400s

== Logs ==

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

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

* Re: [igt-dev] [PATCH i-g-t 1/2] lib/sysfs: Fix fbcon unbind, again
  2018-03-05 12:54 [igt-dev] [PATCH i-g-t 1/2] lib/sysfs: Fix fbcon unbind, again Ville Syrjala
  2018-03-05 12:54 ` [igt-dev] [PATCH i-g-t 2/2] lib/sysfs: s/kick_fbcon/bind_fbcon/ Ville Syrjala
  2018-03-05 16:32 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/sysfs: Fix fbcon unbind, again Patchwork
@ 2018-03-05 17:34 ` Chris Wilson
  2018-03-05 19:05   ` Ville Syrjälä
  2018-03-05 21:16 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/2] " Patchwork
  3 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2018-03-05 17:34 UTC (permalink / raw)
  To: Ville Syrjala, igt-dev

Quoting Ville Syrjala (2018-03-05 12:54:16)
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Looks like unbinding the dummy con doesn't work on all machines. Instead
> we have to bind fbcon (which is what we used to do before commit
> d18fca7f6cf3 ("lib/sysfs: Fix fbcon rebind")). Since some machines need
> the bind and others need the unbind let's do both. The most obvious
> difference I observed between two machines that behave differently
> was the order in which the console drivers were listed in sysfs.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Ok... For both,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t 1/2] lib/sysfs: Fix fbcon unbind, again
  2018-03-05 17:34 ` [igt-dev] [PATCH i-g-t 1/2] " Chris Wilson
@ 2018-03-05 19:05   ` Ville Syrjälä
  0 siblings, 0 replies; 6+ messages in thread
From: Ville Syrjälä @ 2018-03-05 19:05 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

On Mon, Mar 05, 2018 at 05:34:40PM +0000, Chris Wilson wrote:
> Quoting Ville Syrjala (2018-03-05 12:54:16)
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Looks like unbinding the dummy con doesn't work on all machines. Instead
> > we have to bind fbcon (which is what we used to do before commit
> > d18fca7f6cf3 ("lib/sysfs: Fix fbcon rebind")). Since some machines need
> > the bind and others need the unbind let's do both. The most obvious
> > difference I observed between two machines that behave differently
> > was the order in which the console drivers were listed in sysfs.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Ok... For both,
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Both pushed. Thanks.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/2] lib/sysfs: Fix fbcon unbind, again
  2018-03-05 12:54 [igt-dev] [PATCH i-g-t 1/2] lib/sysfs: Fix fbcon unbind, again Ville Syrjala
                   ` (2 preceding siblings ...)
  2018-03-05 17:34 ` [igt-dev] [PATCH i-g-t 1/2] " Chris Wilson
@ 2018-03-05 21:16 ` Patchwork
  3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-03-05 21:16 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/2] lib/sysfs: Fix fbcon unbind, again
URL   : https://patchwork.freedesktop.org/series/39377/
State : failure

== Summary ==

---- Possible new issues:

Test kms_color:
        Subgroup pipe-c-legacy-gamma:
                pass       -> FAIL       (shard-apl)
Test kms_vblank:
        Subgroup pipe-a-ts-continuation-modeset:
                skip       -> PASS       (shard-snb)

---- Known issues:

Test gem_eio:
        Subgroup in-flight-external:
                pass       -> INCOMPLETE (shard-apl) fdo#104945
Test kms_chv_cursor_fail:
        Subgroup pipe-b-256x256-right-edge:
                dmesg-warn -> PASS       (shard-snb) fdo#105185 +1
Test kms_cursor_legacy:
        Subgroup flip-vs-cursor-atomic:
                skip       -> PASS       (shard-snb) fdo#102670
Test kms_flip:
        Subgroup dpms-vs-vblank-race:
                fail       -> PASS       (shard-hsw) fdo#103060

fdo#104945 https://bugs.freedesktop.org/show_bug.cgi?id=104945
fdo#105185 https://bugs.freedesktop.org/show_bug.cgi?id=105185
fdo#102670 https://bugs.freedesktop.org/show_bug.cgi?id=102670
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060

shard-apl        total:3465 pass:1822 dwarn:1   dfail:0   fail:8   skip:1632 time:12142s
shard-hsw        total:3468 pass:1774 dwarn:1   dfail:0   fail:1   skip:1691 time:11922s
shard-snb        total:3468 pass:1364 dwarn:2   dfail:0   fail:1   skip:2101 time:7099s
Blacklisted hosts:
shard-kbl        total:3459 pass:1945 dwarn:2   dfail:0   fail:7   skip:1504 time:9208s

== Logs ==

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

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

end of thread, other threads:[~2018-03-05 21:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-05 12:54 [igt-dev] [PATCH i-g-t 1/2] lib/sysfs: Fix fbcon unbind, again Ville Syrjala
2018-03-05 12:54 ` [igt-dev] [PATCH i-g-t 2/2] lib/sysfs: s/kick_fbcon/bind_fbcon/ Ville Syrjala
2018-03-05 16:32 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/sysfs: Fix fbcon unbind, again Patchwork
2018-03-05 17:34 ` [igt-dev] [PATCH i-g-t 1/2] " Chris Wilson
2018-03-05 19:05   ` Ville Syrjälä
2018-03-05 21:16 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/2] " 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.