lib/sysfs: Fix fbcon rebind

"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.

Additionally Daniel Vetter pointed out:
"We select the dummy con in i915, to be able to kick out vgacon before we                                               register fbdev. So should always be there."

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
1 file changed