* [PATCH i-g-t] lib/sysfs: Fix fbcon rebind
@ 2017-09-06 13:04 ville.syrjala
2017-09-06 13:22 ` ✓ Fi.CI.BAT: success for " Patchwork
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: ville.syrjala @ 2017-09-06 13:04 UTC (permalink / raw)
To: intel-gfx
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
"echo 1 > vtconN/bind" doesn't actually do anything. Looks like the only
way to rebind fbcon is to unbind the current console.
I suppose the failure to rebind might be a kernel bug, but I can't be
bothered to decode the vt.c spaghetti so let's just try to handle this
in igt. For simplicity let's assume the currently bound console is the
dummy console and unbind that when we want to rebind fbcon. That works
for me.
With rebinding not working we can't really tell wich console is going
to get bound anyway, so there's no way to make this code really robust,
assuming we ever had more than these two console drivers involved.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
lib/igt_sysfs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
index 9227e374bf44..12be8a165c34 100644
--- a/lib/igt_sysfs.c
+++ b/lib/igt_sysfs.c
@@ -516,13 +516,14 @@ void kick_fbcon(bool enable)
if (len >= 0)
buf[len] = '\0';
- if (!strstr(buf, "frame buffer device"))
+ if (!strstr(buf, enable ? "dummy device" :
+ "frame buffer device"))
continue;
sprintf(buf, "%s/%s/bind", path, de->d_name);
fd = open(buf, O_WRONLY);
if (fd != -1) {
- igt_ignore_warn(write(fd, enable ? "1\n" : "0\n", 2));
+ igt_ignore_warn(write(fd, "0\n", 2));
close(fd);
}
}
--
2.13.5
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
* ✓ Fi.CI.BAT: success for lib/sysfs: Fix fbcon rebind
2017-09-06 13:04 [PATCH i-g-t] lib/sysfs: Fix fbcon rebind ville.syrjala
@ 2017-09-06 13:22 ` Patchwork
2017-09-06 14:08 ` [PATCH i-g-t] " Chris Wilson
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2017-09-06 13:22 UTC (permalink / raw)
To: ville.syrjala; +Cc: intel-gfx
== Series Details ==
Series: lib/sysfs: Fix fbcon rebind
URL : https://patchwork.freedesktop.org/series/29880/
State : success
== Summary ==
IGT patchset tested on top of latest successful build
918863f8e3e8f49235fd2e4a36e11f386c06c11c intel_display_poller: Fix truncation of a test name.
with latest DRM-Tip kernel build CI_DRM_3044
0640ea73be26 drm-tip: 2017y-09m-06d-06h-41m-15s UTC integration manifest
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:443s
fi-blb-e6850 total:289 pass:224 dwarn:1 dfail:0 fail:0 skip:64 time:381s
fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:543s
fi-bwr-2160 total:289 pass:184 dwarn:0 dfail:0 fail:0 skip:105 time:269s
fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:510s
fi-byt-j1900 total:289 pass:254 dwarn:1 dfail:0 fail:0 skip:34 time:509s
fi-byt-n2820 total:289 pass:250 dwarn:1 dfail:0 fail:0 skip:38 time:508s
fi-cfl-s total:289 pass:250 dwarn:4 dfail:0 fail:0 skip:35 time:451s
fi-elk-e7500 total:289 pass:230 dwarn:0 dfail:0 fail:0 skip:59 time:451s
fi-glk-2a total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:598s
fi-hsw-4770 total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:430s
fi-hsw-4770r total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:409s
fi-ilk-650 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:440s
fi-ivb-3520m total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:493s
fi-ivb-3770 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:464s
fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:495s
fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:573s
fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:593s
fi-pnv-d510 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:553s
fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:473s
fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:530s
fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:507s
fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:458s
fi-skl-x1585l total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:483s
fi-snb-2520m total:289 pass:251 dwarn:0 dfail:0 fail:0 skip:38 time:578s
fi-snb-2600 total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:428s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_152/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH i-g-t] lib/sysfs: Fix fbcon rebind
2017-09-06 13:04 [PATCH i-g-t] lib/sysfs: Fix fbcon rebind ville.syrjala
2017-09-06 13:22 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-09-06 14:08 ` Chris Wilson
2017-09-06 14:34 ` Ville Syrjälä
2017-09-06 14:17 ` ✓ Fi.CI.IGT: success for " Patchwork
2017-09-07 18:44 ` [PATCH i-g-t] " Chris Wilson
3 siblings, 1 reply; 7+ messages in thread
From: Chris Wilson @ 2017-09-06 14:08 UTC (permalink / raw)
To: ville.syrjala, intel-gfx
Quoting ville.syrjala@linux.intel.com (2017-09-06 14:04:01)
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> "echo 1 > vtconN/bind" doesn't actually do anything. Looks like the only
> way to rebind fbcon is to unbind the current console.
>
> I suppose the failure to rebind might be a kernel bug, but I can't be
> bothered to decode the vt.c spaghetti so let's just try to handle this
> in igt. For simplicity let's assume the currently bound console is the
> dummy console and unbind that when we want to rebind fbcon. That works
> for me.
>
> With rebinding not working we can't really tell wich console is going
> to get bound anyway, so there's no way to make this code really robust,
> assuming we ever had more than these two console drivers involved.
Hmm, CONFIG_DUMMY_CONSOLE suggests that the dummy isn't universal
either. If there is no dummy, can the last be unbound? I have no idea.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* ✓ Fi.CI.IGT: success for lib/sysfs: Fix fbcon rebind
2017-09-06 13:04 [PATCH i-g-t] lib/sysfs: Fix fbcon rebind ville.syrjala
2017-09-06 13:22 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-09-06 14:08 ` [PATCH i-g-t] " Chris Wilson
@ 2017-09-06 14:17 ` Patchwork
2017-09-07 18:44 ` [PATCH i-g-t] " Chris Wilson
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2017-09-06 14:17 UTC (permalink / raw)
To: ville.syrjala; +Cc: intel-gfx
== Series Details ==
Series: lib/sysfs: Fix fbcon rebind
URL : https://patchwork.freedesktop.org/series/29880/
State : success
== Summary ==
Test kms_flip:
Subgroup plain-flip-fb-recreate-interruptible:
pass -> FAIL (shard-hsw) fdo#100368
Test perf:
Subgroup blocking:
pass -> FAIL (shard-hsw) fdo#102252 +1
Test kms_atomic_transition:
Subgroup plane-use-after-nonblocking-unbind:
fail -> INCOMPLETE (shard-hsw) fdo#101847
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#101847 https://bugs.freedesktop.org/show_bug.cgi?id=101847
shard-hsw total:2226 pass:1215 dwarn:0 dfail:0 fail:16 skip:994 time:9337s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_152/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH i-g-t] lib/sysfs: Fix fbcon rebind
2017-09-06 14:08 ` [PATCH i-g-t] " Chris Wilson
@ 2017-09-06 14:34 ` Ville Syrjälä
2017-09-08 7:09 ` Daniel Vetter
0 siblings, 1 reply; 7+ messages in thread
From: Ville Syrjälä @ 2017-09-06 14:34 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On Wed, Sep 06, 2017 at 03:08:40PM +0100, Chris Wilson wrote:
> Quoting ville.syrjala@linux.intel.com (2017-09-06 14:04:01)
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > "echo 1 > vtconN/bind" doesn't actually do anything. Looks like the only
> > way to rebind fbcon is to unbind the current console.
> >
> > I suppose the failure to rebind might be a kernel bug, but I can't be
> > bothered to decode the vt.c spaghetti so let's just try to handle this
> > in igt. For simplicity let's assume the currently bound console is the
> > dummy console and unbind that when we want to rebind fbcon. That works
> > for me.
> >
> > With rebinding not working we can't really tell wich console is going
> > to get bound anyway, so there's no way to make this code really robust,
> > assuming we ever had more than these two console drivers involved.
>
> Hmm, CONFIG_DUMMY_CONSOLE suggests that the dummy isn't universal
> either. If there is no dummy, can the last be unbound? I have no idea.
DUMMY_CONSOLE isn't user visible and default=y, so you can't actually
disable it, I think.
It does have some suspicious looking dependencies though:
depends on VGA_CONSOLE!=y || SGI_NEWPORT_CONSOLE!=y
So it gets disabled only if you have both VGA and SGI_NEWPORT enabled.
I suspect someone meant to say '&&' instead of '||'. But for us the '||'
works better since we don't allow rebinding vgacon after it's been
kicked out, and so having dummy+vga is good.
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH i-g-t] lib/sysfs: Fix fbcon rebind
2017-09-06 13:04 [PATCH i-g-t] lib/sysfs: Fix fbcon rebind ville.syrjala
` (2 preceding siblings ...)
2017-09-06 14:17 ` ✓ Fi.CI.IGT: success for " Patchwork
@ 2017-09-07 18:44 ` Chris Wilson
3 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2017-09-07 18:44 UTC (permalink / raw)
To: ville.syrjala, intel-gfx
Quoting ville.syrjala@linux.intel.com (2017-09-06 14:04:01)
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> "echo 1 > vtconN/bind" doesn't actually do anything. Looks like the only
> way to rebind fbcon is to unbind the current console.
>
> I suppose the failure to rebind might be a kernel bug, but I can't be
> bothered to decode the vt.c spaghetti so let's just try to handle this
> in igt. For simplicity let's assume the currently bound console is the
> dummy console and unbind that when we want to rebind fbcon. That works
> for me.
>
> With rebinding not working we can't really tell wich console is going
> to get bound anyway, so there's no way to make this code really robust,
> assuming we ever had more than these two console drivers involved.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Ok, if it works in one direction, it should work in the other... And
pragmatically if it works, it works. However, I do worry if that if we
have been measuring our test runtimes with never having to rebind fbcon
if we suddenly get a slowdown...
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH i-g-t] lib/sysfs: Fix fbcon rebind
2017-09-06 14:34 ` Ville Syrjälä
@ 2017-09-08 7:09 ` Daniel Vetter
0 siblings, 0 replies; 7+ messages in thread
From: Daniel Vetter @ 2017-09-08 7:09 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
On Wed, Sep 06, 2017 at 05:34:45PM +0300, Ville Syrjälä wrote:
> On Wed, Sep 06, 2017 at 03:08:40PM +0100, Chris Wilson wrote:
> > Quoting ville.syrjala@linux.intel.com (2017-09-06 14:04:01)
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >
> > > "echo 1 > vtconN/bind" doesn't actually do anything. Looks like the only
> > > way to rebind fbcon is to unbind the current console.
> > >
> > > I suppose the failure to rebind might be a kernel bug, but I can't be
> > > bothered to decode the vt.c spaghetti so let's just try to handle this
> > > in igt. For simplicity let's assume the currently bound console is the
> > > dummy console and unbind that when we want to rebind fbcon. That works
> > > for me.
> > >
> > > With rebinding not working we can't really tell wich console is going
> > > to get bound anyway, so there's no way to make this code really robust,
> > > assuming we ever had more than these two console drivers involved.
> >
> > Hmm, CONFIG_DUMMY_CONSOLE suggests that the dummy isn't universal
> > either. If there is no dummy, can the last be unbound? I have no idea.
>
> DUMMY_CONSOLE isn't user visible and default=y, so you can't actually
> disable it, I think.
>
> It does have some suspicious looking dependencies though:
> depends on VGA_CONSOLE!=y || SGI_NEWPORT_CONSOLE!=y
>
> So it gets disabled only if you have both VGA and SGI_NEWPORT enabled.
> I suspect someone meant to say '&&' instead of '||'. But for us the '||'
> works better since we don't allow rebinding vgacon after it's been
> kicked out, and so having dummy+vga is good.
We select the dummy con in i915, to be able to kick out vgacon before we
register fbdev. So should always be there.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-09-08 7:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-06 13:04 [PATCH i-g-t] lib/sysfs: Fix fbcon rebind ville.syrjala
2017-09-06 13:22 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-09-06 14:08 ` [PATCH i-g-t] " Chris Wilson
2017-09-06 14:34 ` Ville Syrjälä
2017-09-08 7:09 ` Daniel Vetter
2017-09-06 14:17 ` ✓ Fi.CI.IGT: success for " Patchwork
2017-09-07 18:44 ` [PATCH i-g-t] " Chris Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox