Improving VT switching with KMS

Ari Entlich atrigent at ccs.neu.edu
Sat Feb 27 18:48:58 PST 2010


----- "Michel Dänzer" <michel at daenzer.net> wrote:
> At least in the case of the radeon driver, yes. The crucial parts are
> the drmSet/DropMaster calls. This also means that when switching from
> one X server VT to another, the LeaveVT hook of the former needs to be
> called before the EnterVT hook of the latter, or things will break.

Hmm, alright. So maybe the new mode should be something more like
VT_PROCESS_HALFAUTO, which would only switch immediately when switching
to a VT_AUTO VT? Or maybe it should be based on the value of the graphics
mode (i.e. KD_TEXT and KD_GRAPHICS), since a VT could be managed by a process
but not be graphical (i.e. dealing with DRM and stuff) at all.

However, I think in the most ideal case I'd also like to be able to switch
to another X instance when the first X instance is frozen (i.e. when
the first instance can't run drmDropMaster, assuming I understand
this correctly). Would there be any way to, I don't know... Get the
kernel to automatically drop the master? Looking at libdrm, drm{Set,Drop}Master
both just amount to a single ioctl call, which means that the kernel
theoretically COULD automatically do it on VT switch, right? This would
require better integration of the DRM and VT subsystems (i.e. it'd have
to be possible to determine whether the process associated with a VT_PROCESS
VT is a DRM client, and to call those ioctls from VT code), but it would
be possible... right?

There are probably a ton of subtleties I'm overlooking here... Please
feel free to point them out.

I guess this is more a question to kernel driver developers than it is to
userspace driver developers.

Thanks!

Ari


More information about the xorg-devel mailing list