[Intel-gfx] [RFC] VGA hotplug support for i915 kms

Jesse Barnes jbarnes at virtuousgeek.org
Mon Jan 19 19:06:39 CET 2009


On Saturday, January 17, 2009 12:53 pm Eric Anholt wrote:
> On Fri, 2009-01-16 at 14:42 +0100, Jakob Bornecrantz wrote:
> > Jesse Barnes wrote:
> > > On Wednesday, January 14, 2009 2:14 pm Jesse Barnes wrote:
> > >> Here's a work in progress VGA hotplug patch that I've been testing on
> > >> my GM45.  I've only tested VGA interrupts so far, but other ports may
> > >> work or should be easy to enable.  When a hotplug interrupt is
> > >> received, the i915 interrupt handler kicks off a work queue which ends
> > >> up sending a uevent. I've deliberately done nothing else; I figure
> > >> userspace should decide what to do with the event (ignore it, probe
> > >> outputs, set up a cloned or extended configuration, etc.).
> > >>
> > >> Thoughts or comments?  The passing of the DRM device struct to the
> > >> work function is pretty ugly at this point, and could be improved, and
> > >> whether hotplug detection is enabled should probably be configurable
> > >> since it depends on the outputs being powered enough to detect events.
> > >
> > > Here's a slightly less revolting version.  I removed all the global
> > > variables, and moved to using the system wide work queue rather than an
> > > i915 specific one, so things are much cleaner & clearer.
> > >
> > > Comments?  Userspace will still need to call getresources after
> > > receiving a hotplug event, but I think that's better than trying to do
> > > something by default in the kernel.
> >
> > When we only run fbcon we might not be blessed with a clever userspace
> > that can add a new monitor to the fb config. Maybe we should run some
> > sort of detection code in the intel fb code.
>
> Our experience with trying to "do something sensible when we notice new
> things plugged in" in the early randr 1.2 days was that it was a
> terrible idea that made users hate us.  I suspect it would be even worse
> if we tried it in the kernel.

In general I don't think we should try to put a bunch of smarts in the kernel.  
But if the fb console is active, it would be nice to clone the current fbcon 
onto the new display if possible.  Since the fbcon configuration is separate 
from any app configs, that should be possible, and would give people a bit 
more of a chance to see any panic/oops messages that appear.

Jesse

-- 
Jesse Barnes, Intel Open Source Technology Center



More information about the Intel-gfx mailing list