[PATCH] drm/irq: BUG_ON() -> WARN_ON()
Michel Dänzer
michel at daenzer.net
Sun Nov 9 19:57:33 PST 2014
On 09.11.2014 00:16, Rob Clark wrote:
> Let's make things a bit easier to debug when things go bad (potentially
> under console_lock).
>
> Signed-off-by: Rob Clark <robdclark at gmail.com>
> ---
> drivers/gpu/drm/drm_irq.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
> index 5ef03c2..c4edea9 100644
> --- a/drivers/gpu/drm/drm_irq.c
> +++ b/drivers/gpu/drm/drm_irq.c
> @@ -1029,7 +1029,8 @@ void drm_vblank_put(struct drm_device *dev, int crtc)
> {
> struct drm_vblank_crtc *vblank = &dev->vblank[crtc];
>
> - BUG_ON(atomic_read(&vblank->refcount) == 0);
> + if (WARN_ON(atomic_read(&vblank->refcount) == 0))
> + return;
>
> if (WARN_ON(crtc >= dev->num_crtcs))
> return;
>
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the dri-devel
mailing list