From patchwork Mon Oct 8 19:23:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 1566761 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 5028E40135 for ; Mon, 8 Oct 2012 19:24:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 490BBA087A for ; Mon, 8 Oct 2012 12:24:39 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-oa0-f49.google.com (mail-oa0-f49.google.com [209.85.219.49]) by gabe.freedesktop.org (Postfix) with ESMTP id E4607A0888 for ; Mon, 8 Oct 2012 12:23:43 -0700 (PDT) Received: by mail-oa0-f49.google.com with SMTP id l10so514776oag.36 for ; Mon, 08 Oct 2012 12:23:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=C0yx855ThqMZVKGd3g3W5/tGJ0mha94vahOFfO5Qpkk=; b=Q9fGuadgFnItNY7rgfXcTu4JiG74/u3nD4YLAK6VzPl4a0A5dVZ8q0qNhanAO+up1X BeHr8vgoVHigMWMq5z5ok4FC7V6WOKXuFY+g3wcC49IwB2V+AOVtOOeKPZ8oltvaVZd9 FCLJQu2q2hkUzH0m+VI89bsba6UgQtzZt9DmZpYQB/nm1XwkAnEJw6sa3im6L+zzjvQP 0j9BqbrdjRnhGg2mFAG77JRWZWWJhUKu1aHpJ1yGQjBI+QbQ0oQ0Vn7r3iO6RIjMIMZh nCysfoIi34DQnE2+jdJjCXImVQWg1Dad4amvYPfpROueXqBrf8cjtZGB2Rs9M+fqn4jR tzIw== Received: by 10.182.64.14 with SMTP id k14mr974646obs.72.1349724222992; Mon, 08 Oct 2012 12:23:42 -0700 (PDT) Received: from localhost (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id ea6sm17942055obc.9.2012.10.08.12.23.41 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 08 Oct 2012 12:23:42 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm: move a few frequent traces to DRM_VERB() Date: Mon, 8 Oct 2012 14:23:38 -0500 Message-Id: <1349724218-20968-1-git-send-email-rob.clark@linaro.org> X-Mailer: git-send-email 1.7.9.5 Cc: Rob Clark , patches@linaro.org 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 From: Rob Clark Add a new bit for the trace-mask for verbose traces. Signed-off-by: Rob Clark --- drivers/gpu/drm/drm_drv.c | 9 +++++++-- drivers/gpu/drm/drm_vm.c | 4 ++-- include/drm/drmP.h | 9 ++++++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 933e7ae..b31296f 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -394,7 +394,7 @@ long drm_ioctl(struct file *filp, atomic_inc(&dev->counts[_DRM_STAT_IOCTLS]); ++file_priv->ioctl_count; - DRM_DEBUG("pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n", + DRM_VERB("pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n", task_pid_nr(current), cmd, nr, (long)old_encode_dev(file_priv->minor->device), file_priv->authenticated); @@ -475,8 +475,13 @@ long drm_ioctl(struct file *filp, if (kdata != stack_kdata) kfree(kdata); atomic_dec(&dev->ioctl_count); - if (retcode) + if (retcode) { + DRM_DEBUG("pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n", + task_pid_nr(current), cmd, nr, + (long)old_encode_dev(file_priv->minor->device), + file_priv->authenticated); DRM_DEBUG("ret = %d\n", retcode); + } return retcode; } diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index 961ee08..0a6ff73 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c @@ -411,7 +411,7 @@ void drm_vm_open_locked(struct drm_device *dev, { struct drm_vma_entry *vma_entry; - DRM_DEBUG("0x%08lx,0x%08lx\n", + DRM_VERB("0x%08lx,0x%08lx\n", vma->vm_start, vma->vm_end - vma->vm_start); atomic_inc(&dev->vma_count); @@ -438,7 +438,7 @@ void drm_vm_close_locked(struct drm_device *dev, { struct drm_vma_entry *pt, *temp; - DRM_DEBUG("0x%08lx,0x%08lx\n", + DRM_VERB("0x%08lx,0x%08lx\n", vma->vm_start, vma->vm_end - vma->vm_start); atomic_dec(&dev->vma_count); diff --git a/include/drm/drmP.h b/include/drm/drmP.h index f719c4d..b472114 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -92,6 +92,8 @@ struct drm_device; #define DRM_UT_DRIVER 0x02 #define DRM_UT_KMS 0x04 #define DRM_UT_PRIME 0x08 +#define DRM_UT_CORE_VERB 0x10 + /* * Three debug levels are defined. * drm_core, drm_driver, drm_kms @@ -206,7 +208,11 @@ int drm_err(const char *func, const char *format, ...); drm_ut_debug_printk(DRM_UT_CORE, DRM_NAME, \ __func__, fmt, ##args); \ } while (0) - +#define DRM_VERB(fmt, args...) \ + do { \ + drm_ut_debug_printk(DRM_UT_CORE_VERB, DRM_NAME, \ + __func__, fmt, ##args); \ + } while (0) #define DRM_DEBUG_DRIVER(fmt, args...) \ do { \ drm_ut_debug_printk(DRM_UT_DRIVER, DRM_NAME, \ @@ -247,6 +253,7 @@ int drm_err(const char *func, const char *format, ...); #define DRM_DEBUG_KMS(fmt, args...) do { } while (0) #define DRM_DEBUG_PRIME(fmt, args...) do { } while (0) #define DRM_DEBUG(fmt, arg...) do { } while (0) +#define DRM_VERB(fmt, arg...) do { } while (0) #define DRM_LOG(fmt, arg...) do { } while (0) #define DRM_LOG_KMS(fmt, args...) do { } while (0) #define DRM_LOG_MODE(fmt, arg...) do { } while (0)