On Tuesday, August 26, 2008 9:03 pm Robert Noland wrote:
> On Tue, 2008-08-26 at 18:02 -0700, Jesse Barnes wrote:
> > On Tuesday, August 26, 2008 5:13 pm Robert Noland wrote:
> > > I kinda prompted this topic to come back to life...  I'm less concerned
> > > with the IRQ bits than I am with the vblank issue, but they are
> > > currently tied together.
> > >
> > > What I'm seeing right now, it that at least the intel ddx driver calls
> > > the irq_uninstall ioctl before calling pre_modeset ioctl during vt
> > > switch.  The way the code is now, irq_uninstall calls vblank_cleanup
> > > and clears all of the structures and resets num_crtcs to 0.  When it
> > > hits modeset_ioctl it tests for num_crtcs and thinks the vblank_init
> > > hasn't been called and bails out and doesn't properly enable vblank
> > > over the modeset.  When returning from vt switch, it is doing the
> > > opposite.  It calls modeset_ctl ioctl, num_crtcs is still 0, because
> > > vblank_init doesn't get called until the irq_install ioctl gets called.
> > >  So, the short story is that after a vt switch, vlbanks aren't allowed
> > > to be disabled.
> > >
> > > I had a patch around here somewhere that only moved the vblank_init and
> > > cleanup routines to the driver load / unload routines.  This put the
> > > entire responsibilty on the driver, while not touching the irq install
> > > / uninstall routines.  IIRC, I actually sent that patch to this list...
> > > It will require very minor changes to the linux driver bits, just to
> > > call vblank_init/cleanup at the right places.  IMO, this is the way to
> > > go...  I don't want to rely on the ddx driver to DTRT any more than I
> > > have to...
> > >
> > > When I mentioned something about this originally, someone stated that
> > > it would be good to just install the handlers at load time, and get rid
> > > of pre/post install.  I ran into problems when I tried to go down that
> > > path, so I just settled to only move the vblank bits...
> >
> > I'll post the upstream vblank-rework code as soon as I have it working
> > well; fixing this particular problem should be fairly easy w/o having to
> > rip out all the IRQ stuff (though I was kinda hoping that would be the
> > solution, Dave is right that it's just a bunch of regressions waiting to
> > happen).
>
> The patch that I sent on July 24, does the right thing, but it won't
> apply cleanly any more... It included the infrastructure changes and
> fixed intel and radeon on BSD.  But, yeah it's not hard to DTRT in this
> case.  I still maintain that if the driver sets up the vblank structures
> it should be responsible for tearing them down.

Agreed, I'll fix that up.

Thanks,
-- 
Jesse Barnes, Intel Open Source Technology Center

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to