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: 12043 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 4184523F6D for ; Mon, 8 Oct 2012 19:23:46 +0000 (UTC) Received: from mail-pb0-f52.google.com (mail-pb0-f52.google.com [209.85.160.52]) by fiordland.canonical.com (Postfix) with ESMTP id 81678A18BD7 for ; Mon, 8 Oct 2012 19:23:45 +0000 (UTC) Received: by mail-pb0-f52.google.com with SMTP id rr13so4848708pbb.11 for ; Mon, 08 Oct 2012 12:23:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :dkim-signature:sender:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=C0yx855ThqMZVKGd3g3W5/tGJ0mha94vahOFfO5Qpkk=; b=KuvZGKH1ifjq4FT9JbmTbB7MHbE0ALX/WZULmTmVNW3fpgA3gtaIzliE50FTG1D1Nw Ppce//EdsVyio3xALQZM8xv98L5TGW29n7RP9k6rINYESPrhOTidETx3ltN642JJuwPK F0EdB5HJcGHREHnyc9I8RcmaRnNf4YYYAXkLFuXa3stCrtY0p75o35E2CZMbXaRHXxoY YUN+1nf5rJlPcY+OiGnZ+1PHwBLVszOr/sq14mCOl4rea7fLnyAWtrxL6l5s5mKHNvts Gwr8pX/eEmOkScTUBWKL7tqFcoY3TPkwoJXYAR7QLxRnmWc9lv6jdFulCffgQBZjQZYf ulbg== Received: by 10.66.88.233 with SMTP id bj9mr45455560pab.72.1349724224747; Mon, 08 Oct 2012 12:23:44 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.68.34.137 with SMTP id z9csp309625pbi; Mon, 8 Oct 2012 12:23:44 -0700 (PDT) Received: by 10.60.6.105 with SMTP id z9mr13978346oez.113.1349724223691; Mon, 08 Oct 2012 12:23:43 -0700 (PDT) Received: from mail-ob0-f178.google.com (mail-ob0-f178.google.com [209.85.214.178]) by mx.google.com with ESMTPS id ir4si20134109obc.166.2012.10.08.12.23.43 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 08 Oct 2012 12:23:43 -0700 (PDT) Received-SPF: pass (google.com: domain of robdclark@gmail.com designates 209.85.214.178 as permitted sender) client-ip=209.85.214.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of robdclark@gmail.com designates 209.85.214.178 as permitted sender) smtp.mail=robdclark@gmail.com; dkim=pass header.i=@gmail.com Received: by mail-ob0-f178.google.com with SMTP id tb18so4845800obb.37 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) Sender: Rob Clark From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: patches@linaro.org, Rob Clark 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 X-Gm-Message-State: ALoCoQkEtl6YLEuvr+Zc5aIeRFe0tba4j0UBUoSshM1I0P/A5FRJkC99aqpU9g7QAoGHP+t/Inj3 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)