From patchwork Tue Mar 18 21:22:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 3849551 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 CBEEF9F370 for ; Tue, 18 Mar 2014 21:24:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EBFF420394 for ; Tue, 18 Mar 2014 21:24:03 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2FAA62038F for ; Tue, 18 Mar 2014 21:24:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5DCEC6FD00; Tue, 18 Mar 2014 14:24:02 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qg0-f46.google.com (mail-qg0-f46.google.com [209.85.192.46]) by gabe.freedesktop.org (Postfix) with ESMTP id 54B026FD00 for ; Tue, 18 Mar 2014 14:24:01 -0700 (PDT) Received: by mail-qg0-f46.google.com with SMTP id e89so22974553qgf.5 for ; Tue, 18 Mar 2014 14:24:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BYlexr/jhVLhW9K/5mwkR3iW5mB9HuR7saBl01jRkoM=; b=hc8PGLiH+UBsd1eMp9T5svpAHSgJebt2JGL4GfOMZVqAJxMtZgchFDhBTQ/4PJ3dlh 08COY6doFFx1u8zUWrra2qS6OvivqpAmBKTrQisp30RLQHK+fdCjBlB4SOH7wtpWkrvz CEHSajBxjyLmj1aVKUseP1MHi53irhdu5hP1PZMvdncLNjxqFgSKN1dT+ZWVAF++vOVC 33se58Kmb1y4L7JuxkxCYl7cayOpbLaBNKmDQaWtZMoGoU/463i0SJ/fdKgfClR/sJCp lQK7lqewrfzobNx2Kywr+JeivHQU6Eu//jjY6HVyEinpWxsqpdichbcAUrIzR7TR05pp 6CXw== X-Received: by 10.140.38.168 with SMTP id t37mr36805096qgt.33.1395177840931; Tue, 18 Mar 2014 14:24:00 -0700 (PDT) Received: from localhost (pool-108-20-254-15.bstnma.east.verizon.net. [108.20.254.15]) by mx.google.com with ESMTPSA id b16sm56884042qag.14.2014.03.18.14.23.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Mar 2014 14:24:00 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [PATCH 16/16] drm: spiff out FB refcnting traces Date: Tue, 18 Mar 2014 17:22:53 -0400 Message-Id: <1395177773-800-17-git-send-email-robdclark@gmail.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1395177773-800-1-git-send-email-robdclark@gmail.com> References: <1395177773-800-1-git-send-email-robdclark@gmail.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 I find myself making this change locally whenever debugging FB reference counting. Which seems a bit silly. Signed-off-by: Rob Clark --- drivers/gpu/drm/drm_crtc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 9f2db6c..77d1ff1 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -600,7 +600,7 @@ EXPORT_SYMBOL(drm_framebuffer_lookup); */ void drm_framebuffer_unreference(struct drm_framebuffer *fb) { - DRM_DEBUG("FB ID: %d\n", fb->base.id); + DRM_DEBUG("%p: FB ID: %d (%d)\n", fb, fb->base.id, fb->refcount.refcount.counter); kref_put(&fb->refcount, drm_framebuffer_free); } EXPORT_SYMBOL(drm_framebuffer_unreference); @@ -611,7 +611,7 @@ EXPORT_SYMBOL(drm_framebuffer_unreference); */ void drm_framebuffer_reference(struct drm_framebuffer *fb) { - DRM_DEBUG("FB ID: %d\n", fb->base.id); + DRM_DEBUG("%p: FB ID: %d (%d)\n", fb, fb->base.id, fb->refcount.refcount.counter); kref_get(&fb->refcount); } EXPORT_SYMBOL(drm_framebuffer_reference); @@ -623,7 +623,7 @@ static void drm_framebuffer_free_bug(struct kref *kref) static void __drm_framebuffer_unreference(struct drm_framebuffer *fb) { - DRM_DEBUG("FB ID: %d\n", fb->base.id); + DRM_DEBUG("%p: FB ID: %d (%d)\n", fb, fb->base.id, fb->refcount.refcount.counter); kref_put(&fb->refcount, drm_framebuffer_free_bug); }