From patchwork Sat May 24 18:30:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 4237951 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 192C89F32B for ; Sat, 24 May 2014 18:31:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 277EB20211 for ; Sat, 24 May 2014 18:31:21 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 59A2E2020F for ; Sat, 24 May 2014 18:31:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A6BFF6E32E; Sat, 24 May 2014 11:31:19 -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 DC2166E46F for ; Sat, 24 May 2014 11:31:16 -0700 (PDT) Received: by mail-qg0-f46.google.com with SMTP id q108so10029522qgd.33 for ; Sat, 24 May 2014 11:31:16 -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=QIHiqr9pcyVOUX6gq4R5xNZJvScgmaQ+i92ljFOVlJ0=; b=jjn3mNmE6786ZPFGT3T6OtS5QPAjoKYhn6ZZ/p+vUpXXkp2NO7Hpq25iw2HajPx6q2 7H7zKYWU38ykbcxSVFjbsr06bOBY66WcFu1pTKZZ9JwDOGbjK+2hSfCGz03vBSKBi1vz KVMOzpcrCEBVMRBlWMsylUlb0g0/TSNRNGWr9qRez2bpTP08LTV5eXrR/XHXXrCaIXEY 2DC/JFbB1a+mxf336um6EldK+ECkN56kkkEZ+M8c4agjqP/daVxE+uW4KbzsS35JC2T8 sxaUfLF2fwKm4aoxgrvEMIRpBWSEyrIPUsoQm0gtsFy5VUFq+gMIJr2iBmXsrHVfoPMT rqKg== X-Received: by 10.224.92.197 with SMTP id s5mr17604303qam.93.1400956276548; Sat, 24 May 2014 11:31:16 -0700 (PDT) Received: from localhost (pool-108-20-252-175.bstnma.east.verizon.net. [108.20.252.175]) by mx.google.com with ESMTPSA id j5sm11128080qai.34.2014.05.24.11.31.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 May 2014 11:31:16 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [PATCH 15/17] drm: spiff out FB refcnting traces Date: Sat, 24 May 2014 14:30:24 -0400 Message-Id: <1400956226-28053-16-git-send-email-robdclark@gmail.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1400956226-28053-1-git-send-email-robdclark@gmail.com> References: <1400956226-28053-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.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 e14d517..972af76 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -584,7 +584,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); @@ -597,7 +597,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); @@ -609,7 +609,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); }