On Sun, 2008-11-02 at 23:38 -0800, Keith Packard wrote: > The initial mode setting from the 2D driver is done before drm_vblank_init > is called, which means that vblank_disable_allow isn't set. This prevents > the kernel from disabling vblank interrupts after they are first turned on.
As soon as vblank_init is called, it will reset
vblank_disable_allowed=0. This also means that if vblank_disable_fn
were to be called it could panic.
robert.
> Signed-off-by: Keith Packard <[EMAIL PROTECTED]>
> ---
> drivers/gpu/drm/drm_irq.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
> index 212a94f..61c2a46 100644
> --- a/drivers/gpu/drm/drm_irq.c
> +++ b/drivers/gpu/drm/drm_irq.c
> @@ -448,6 +448,8 @@ int drm_modeset_ctl(struct drm_device *dev, void *data,
> unsigned long irqflags;
> int crtc, ret = 0;
>
> + dev->vblank_disable_allowed = 1;
> +
> /* If drm_vblank_init() hasn't been called yet, just no-op */
> if (!dev->num_crtcs)
> goto out;
> @@ -475,7 +477,6 @@ int drm_modeset_ctl(struct drm_device *dev, void *data,
> case _DRM_POST_MODESET:
> if (dev->vblank_inmodeset[crtc]) {
> spin_lock_irqsave(&dev->vbl_lock, irqflags);
> - dev->vblank_disable_allowed = 1;
> dev->vblank_inmodeset[crtc] = 0;
> spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
> drm_vblank_put(dev, crtc);
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
