Re: [PATCH 2/3] drm: Warn if vblank state has become inconsistent.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Apr 27, 2011, at 10:58 AM, dri-devel-request@xxxxxxxxxxxxxxxxxxxxx wrote:
Message: 5
Date: Wed, 27 Apr 2011 10:38:14 +0200
From: Michel D?nzer <michel@xxxxxxxxxxx>
Subject: Re: [PATCH 2/3] drm: Warn if vblank state has become
	inconsistent.
To: christopher.halse.rogers@xxxxxxxxxxxxx
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
Message-ID: <1303893494.5633.129.camel@xxxxxxxxxx>
Content-Type: text/plain; charset="UTF-8"

On Mit, 2011-04-27 at 16:10 +1000, christopher.halse.rogers@xxxxxxxxxxxxx wrote:
From: Christopher James Halse Rogers <christopher.halse.rogers@xxxxxxxxxxxxx>

After emitting all the waiting vblank events no-one should hold
a vblank reference.  Emit a warning if this is not the case.

Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@xxxxxxxxxxxxx>
---
 drivers/gpu/drm/drm_irq.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index a1f12cb..72407fa 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -960,6 +960,7 @@ void drm_vblank_off(struct drm_device *dev, int crtc)
 						 e->event.sequence);
 	}

+	WARN_ON(atomic_read(&dev->vblank_refcount[crtc]) != 0);
 	spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
 }
 EXPORT_SYMBOL(drm_vblank_off);

Reviewed-by: Michel D?nzer <michel@xxxxxxxxxxx>



Any pending kms pageflip will also hold a reference on the vblank of a crtc, so having the refcount non-zero there is not really a sign of inconsistency, so i'm not sure if a warning is appropriate there.

-mario

*********************************************************************
Mario Kleiner
Max Planck Institute for Biological Cybernetics
Spemannstr. 38
72076 Tuebingen
Germany

e-mail: mario.kleiner@xxxxxxxxxxxxxxxx
office: +49 (0)7071/601-1623
fax:    +49 (0)7071/601-616
www:    http://www.kyb.tuebingen.mpg.de/~kleinerm
*********************************************************************
"For a successful technology, reality must take precedence
over public relations, for Nature cannot be fooled."
(Richard Feynman)

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux