From patchwork Mon Jul 1 20:01:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 2809391 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7A0239F3EB for ; Mon, 1 Jul 2013 20:08:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5E2C7201A8 for ; Mon, 1 Jul 2013 20:08:01 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 65C3E20153 for ; Mon, 1 Jul 2013 20:08:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4CBEAE5E10 for ; Mon, 1 Jul 2013 13:08:00 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ee0-f42.google.com (mail-ee0-f42.google.com [74.125.83.42]) by gabe.freedesktop.org (Postfix) with ESMTP id E78DDE60CA for ; Mon, 1 Jul 2013 13:04:17 -0700 (PDT) Received: by mail-ee0-f42.google.com with SMTP id c4so2337600eek.1 for ; Mon, 01 Jul 2013 13:04:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=Bx1Q9Qy/42+5iC/2VFd0JFEWbccfd0xySL02G++9/Hs=; b=Fst/Na+PE6OBbzfa9CWnOMlLWEYunvcRNABOnyYurHB8am0luOxHeRMpGp0t6EeHMQ WnhS2Uj0xXBp+z5lE3hkJwav8Ps7MbXy0qPrfyhzFGaMQYR/nHi4n+3FRi4xChhA4Ta2 KsKmGp2ws9Pq4qpHoJNU9WJBoVW7/OyfefF5E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=Bx1Q9Qy/42+5iC/2VFd0JFEWbccfd0xySL02G++9/Hs=; b=d5RU3zL8YHbEbVxLYDD03tcUE/COWCZZWKpsb4qPLhezx7rhNdvDXAK8/I4tK1bprb Gec+pguZs2zZjHuM6BUqqRWkUslTQrwUF1zQQYwWxV9PFTXb1drbLiJpnOVXJQl363vd GDlbiiZcieqLhf9eLgGf5Nwqu2wrJQEWognfvC6x8c4DnzUAfph3DE99mh/MTf99qc3S vu+zQKwjkspLQxfua+N7lO2uhw2BTJ2tCnhOrHQZQWxKz+eOAacXEsrgHXmp/I+KGTqN KttGc/bGQrR4kqrlW/hvyqpJcnna7Rv5FahHpnwkM3KLpTmoB86qx4K4tEFoNt2I9dzc wILg== X-Received: by 10.14.109.195 with SMTP id s43mr22734531eeg.132.1372709057059; Mon, 01 Jul 2013 13:04:17 -0700 (PDT) Received: from gina.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPSA id ci50sm31853473eeb.12.2013.07.01.13.04.15 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 01 Jul 2013 13:04:16 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Subject: [PATCH 3/3] drm/mm: WARN for unclean mm takedown Date: Mon, 1 Jul 2013 22:01:04 +0200 Message-Id: <1372708864-26963-3-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1372708864-26963-1-git-send-email-daniel.vetter@ffwll.ch> References: <1372708864-26963-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQkmcaXkVsCuHfL6x/3NEZMkBMYv7ZRdK1aRkW4uggJNzDe1H760pcabEaELjfXHdbNcWMe+ Cc: Daniel Vetter , DRI Development X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The usual drm driver has tons of different drm_mm memory managers so the drm error message in dmesg is pretty useless. WARN instead so that we have the full backtrace. Signed-off-by: Daniel Vetter Reviewed-by: Ben Widawsky --- drivers/gpu/drm/drm_mm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c index f9d4873..d303e31 100644 --- a/drivers/gpu/drm/drm_mm.c +++ b/drivers/gpu/drm/drm_mm.c @@ -699,8 +699,8 @@ void drm_mm_takedown(struct drm_mm * mm) { struct drm_mm_node *entry, *next; - if (!list_empty(&mm->head_node.node_list)) { - DRM_ERROR("Memory manager not clean. Delaying takedown\n"); + if (WARN(!list_empty(&mm->head_node.node_list), + "Memory manager not clean. Delaying takedown\n")) { return; }