From patchwork Wed Dec 12 13:07:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1866901 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id BB0C9DF2EE for ; Wed, 12 Dec 2012 14:12:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9CBE9E65CB for ; Wed, 12 Dec 2012 06:12:34 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ee0-f49.google.com (mail-ee0-f49.google.com [74.125.83.49]) by gabe.freedesktop.org (Postfix) with ESMTP id AEF16E652F for ; Wed, 12 Dec 2012 05:14:05 -0800 (PST) Received: by mail-ee0-f49.google.com with SMTP id c4so429571eek.36 for ; Wed, 12 Dec 2012 05:14:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=qHEx8tkPDGXx8/R13+cefazVkAYfqzt5uDptYJNCcCA=; b=icm+aZFc7xc5nlr675Q4xwOvQAEv/flLHXxVmhDtRtPx1W3NMeAU+13M5CG0a6aSTZ P+VW9VT45JT8GD0GXQHB+Tp7t1TgYWBnqKZipaQfP4T7G03ORLUsY9ZnZ1DLMTWVmnJs mD88eruGM/UQyNdPkGrhFONr02dVOjd3tDndk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=qHEx8tkPDGXx8/R13+cefazVkAYfqzt5uDptYJNCcCA=; b=Cy3cfCRUYf7Q+lAAECuQkz5BITkeNKC9+WajvSX/eUXp3dXL3rxUlAxAHrxxv5nZm2 nY4bKXdbjecyKtGFVtVZruTRd5lc8Xji/ZdiOxsn5yul8IRV6Dvv6xLeYR8hc2GKPFY+ VkPz8rkAL2NPy4tBIqBxdJRmKE3mhNoM65xNxcolOw7KSuVV//8dcb2cl+bm8XrEBX8d IghHNGgE1aQu+9D2jjPRhIxsy3dN40ef/CIJL93DiizG2xPdsaakTjP3ll1osPWryJ2l F3kP6/8k17ANkIsq7fllEmnfmyvEuRJHm6I+wCGTbfXeCde8MGZtl2fJronkRCyc3Bnd JvhA== Received: by 10.14.203.2 with SMTP id e2mr2694900eeo.20.1355317672819; Wed, 12 Dec 2012 05:07:52 -0800 (PST) Received: from biers.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id r1sm55868541eeo.2.2012.12.12.05.07.52 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Dec 2012 05:07:52 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 30/37] drm/i915: dump refcount into framebuffer debugfs file Date: Wed, 12 Dec 2012 14:07:10 +0100 Message-Id: <1355317637-16742-31-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1355317637-16742-1-git-send-email-daniel.vetter@ffwll.ch> References: <1355317637-16742-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQnrmrTF/tIw0cspUoZdNrjcf9wPMqUIw+2a/3zGp1jyMtBnvzL3Yoc62BIw0Dj7OOqyBhtc Cc: Nouveau Dev , Intel Graphics Development , Radeon Dev , Daniel Vetter 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 Useful for checking whether the new refcounting works as advertised. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_debugfs.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index da1c8b6..e2dc77c 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1369,11 +1369,12 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) ifbdev = dev_priv->fbdev; fb = to_intel_framebuffer(ifbdev->helper.fb); - seq_printf(m, "fbcon size: %d x %d, depth %d, %d bpp, obj ", + seq_printf(m, "fbcon size: %d x %d, depth %d, %d bpp, refcount %d, obj ", fb->base.width, fb->base.height, fb->base.depth, - fb->base.bits_per_pixel); + fb->base.bits_per_pixel, + atomic_read(&fb->base.refcount.refcount)); describe_obj(m, fb->obj); seq_printf(m, "\n"); mutex_unlock(&dev->mode_config.mutex); @@ -1383,11 +1384,12 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) if (&fb->base == ifbdev->helper.fb) continue; - seq_printf(m, "user size: %d x %d, depth %d, %d bpp, obj ", + seq_printf(m, "user size: %d x %d, depth %d, %d bpp, refcount %d, obj ", fb->base.width, fb->base.height, fb->base.depth, - fb->base.bits_per_pixel); + fb->base.bits_per_pixel, + atomic_read(&fb->base.refcount.refcount)); describe_obj(m, fb->obj); seq_printf(m, "\n"); }