From patchwork Fri Feb 14 02:35:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilia Mirkin X-Patchwork-Id: 3649351 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 8AE539F334 for ; Fri, 14 Feb 2014 02:35:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BE49C201D5 for ; Fri, 14 Feb 2014 02:35:39 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 83DC1201CE for ; Fri, 14 Feb 2014 02:35:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A77F2FB3D0; Thu, 13 Feb 2014 18:35:33 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qa0-f46.google.com (mail-qa0-f46.google.com [209.85.216.46]) by gabe.freedesktop.org (Postfix) with ESMTP id 09D63FB3CF; Thu, 13 Feb 2014 18:35:30 -0800 (PST) Received: by mail-qa0-f46.google.com with SMTP id k15so4177642qaq.33 for ; Thu, 13 Feb 2014 18:35:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=XeMO4yh/npzY4gRhRe5wHdwZNQnWPMbO8w7hCZ+pzU0=; b=rjYbDQInufZ7ptkez3krzYbg7RxxVgB6zth+XT4ybCP5cocUty3csIksGtQxEiMr7K /+XkpFUrAknFrKUpjY1VszVllhxjEJdQQxZY+JijBP7WS66BWyUWjZaxHPIejRrOmtVx hitW/WTGSPXw7mPpmuY3Oj+sKrviishTqKV5/BxOebiJz7uoG0CgS+AYb5Xoz3RCEjc4 h4nNxyC5xbtgCl2JSYu4K2e/mBIOceEIpeNsD2xlSVJYVGazG0lFi3kTl9EmrzmYcPUC 6hsSY0MvB2AbMdurXVq+JY+L6YBrb6QnqX62ceRPRcuI7OQLTClWI9mh28tCwS/vGY+D njTg== X-Received: by 10.140.94.74 with SMTP id f68mr8230122qge.64.1392345326047; Thu, 13 Feb 2014 18:35:26 -0800 (PST) Received: from localhost.localdomain (cpe-74-71-29-187.nyc.res.rr.com. [74.71.29.187]) by mx.google.com with ESMTPSA id r7sm5679162qgr.17.2014.02.13.18.35.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Feb 2014 18:35:25 -0800 (PST) From: Ilia Mirkin To: Ben Skeggs , nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH v2] drm/nouveau: use nv_debug for NV_DEBUG, make DRM a separate subflag Date: Thu, 13 Feb 2014 21:35:14 -0500 Message-Id: <1392345314-29394-1-git-send-email-imirkin@alum.mit.edu> X-Mailer: git-send-email 1.8.3.2 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@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.7 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 It's really confusing for NV_DEBUG's printing to be controlled via drm.debug while everything else is controlled via nouveau.debug. These messages can be turned on with nouveau.debug=DRM=debug. Signed-off-by: Ilia Mirkin --- Updated version that makes the top-level DRM client have a separate debug flag from everything else, since it presents debug info that's interesting for a very different set of use-cases. drivers/gpu/drm/nouveau/nouveau_drm.c | 2 ++ drivers/gpu/drm/nouveau/nouveau_drm.h | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 1c7c8a7..9c9ce4d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -335,6 +336,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) dev->dev_private = drm; drm->dev = dev; + nouveau_client(drm)->debug = nouveau_dbgopt(nouveau_debug, "DRM"); INIT_LIST_HEAD(&drm->clients); spin_lock_init(&drm->tile.lock); diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.h b/drivers/gpu/drm/nouveau/nouveau_drm.h index 23ca7a5..7efbafa 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.h +++ b/drivers/gpu/drm/nouveau/nouveau_drm.h @@ -161,10 +161,7 @@ int nouveau_pmops_resume(struct device *); #define NV_ERROR(cli, fmt, args...) nv_error((cli), fmt, ##args) #define NV_WARN(cli, fmt, args...) nv_warn((cli), fmt, ##args) #define NV_INFO(cli, fmt, args...) nv_info((cli), fmt, ##args) -#define NV_DEBUG(cli, fmt, args...) do { \ - if (drm_debug & DRM_UT_DRIVER) \ - nv_info((cli), fmt, ##args); \ -} while (0) +#define NV_DEBUG(cli, fmt, args...) nv_debug((cli), fmt, ##args) extern int nouveau_modeset;