On Wed, 2011-04-27 at 11:08 +0200, Michel DÃnzer wrote: > On Mit, 2011-04-27 at 18:58 +1000, Christopher James Halse Rogers > wrote: > > On Wed, 2011-04-27 at 10:32 +0200, Michel DÃnzer wrote: > > > On Mit, 2011-04-27 at 16:10 +1000, christopher.halse.rogers@xxxxxxxxxxxxx wrote: > > > > From: Christopher James Halse Rogers <christopher.halse.rogers@xxxxxxxxxxxxx> > > > > > > > > This is the least-bad behaviour. It means that we signal the > > > > vblank event before it actually happens, but since we're disabling > > > > vblanks there's no guarantee that it will *ever* happen otherwise. > > > > > > This may indeed be the best we can do for events that are pending when > > > the CRTC is disabled[0], but I can't see anything that would prevent new > > > events from getting scheduled (or synchronous vblank waits from timing > > > out) while the CRTC is disabled? > > > > > > [0] Though it might unnecessarily send events prematurely when the CRTC > > > is just disabled temporarily, e.g. as part of a modeset. > > > > > > > > > Also, this patch won't seem to help at all for other drivers which don't > > > call drm_vblank_off() directly when disabling a CRTC. > > > > This is true. On the other hand, the other drivers don't wedge the > > vblank code into a state where vblanks cannot be re-enabled. So it's > > only a problem when disabling one of 2+ monitors on those drivers, > > And with DPMS? > > > whereas it's easily triggerable on single monitor systems on intel. > > Anyway, this patch is probably good at least as a preliminary fix for > the inconsistent vblank state with the intel driver. > > > > > Maybe it would be possible to move those calls to core code, and/or only > > > force sending out events when the CRTC isn't just getting disabled > > > temporarily. > > > > > > > As in: have the core modesetting code call drm_vblank_off before making > > the driver-specific calls when disabling a crtc? I'll look into it - > > that would appear to be a more general solution. > > Yeah, something like that, thanks. > Ok. This appears to be surprisingly difficult. Particularly, the vblank code indexes crtcs based on the driver-private numbering, and there doesn't appear to be a generic interface to grab this number; Intel uses the DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID ioctl, radeon uses something different. I'll see what I can come up with, but I don't think I'm sufficiently familiar with the kms code to quickly come up with a nice API.
Attachment:
signature.asc
Description: This is a digitally signed message part
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel