From patchwork Thu Apr 1 12:44:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pauli Nieminen X-Patchwork-Id: 90131 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o31CkRom017357 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 1 Apr 2010 12:47:03 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NxJm5-0002Aa-VQ; Thu, 01 Apr 2010 12:45:29 +0000 Received: from sfi-mx-2.v28.ch3.sourceforge.com ([172.29.28.122] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NxJm5-0002A9-6z for dri-devel@lists.sourceforge.net; Thu, 01 Apr 2010 12:45:29 +0000 Received-SPF: neutral (sfi-mx-2.v28.ch3.sourceforge.com: 213.243.153.188 is neither permitted nor denied by domain of gmail.com) client-ip=213.243.153.188; envelope-from=suokkos@gmail.com; helo=filtteri5.pp.htv.fi; Received: from filtteri5.pp.htv.fi ([213.243.153.188]) by sfi-mx-2.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1NxJm2-0004Ll-Ou for dri-devel@lists.sourceforge.net; Thu, 01 Apr 2010 12:45:29 +0000 Received: from localhost (localhost [127.0.0.1]) by filtteri5.pp.htv.fi (Postfix) with ESMTP id 5E52F5A6140; Thu, 1 Apr 2010 15:45:12 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at pp.htv.fi Received: from smtp4.welho.com ([213.243.153.38]) by localhost (filtteri5.pp.htv.fi [213.243.153.188]) (amavisd-new, port 10024) with ESMTP id K-VBADZtMsUK; Thu, 1 Apr 2010 15:45:11 +0300 (EEST) Received: from localhost.localdomain (cs181130083.pp.htv.fi [82.181.130.83]) by smtp4.welho.com (Postfix) with ESMTP id 5AA4B5BC015; Thu, 1 Apr 2010 15:45:11 +0300 (EEST) From: Pauli Nieminen To: dri-devel@lists.sourceforge.net Subject: [PATCH 3/7] drm/radeon/kms: Add ttm page pool debugfs file. Date: Thu, 1 Apr 2010 15:44:59 +0300 Message-Id: <1270125903-6004-3-git-send-email-suokkos@gmail.com> X-Mailer: git-send-email 1.7.0 In-Reply-To: <1270125903-6004-1-git-send-email-suokkos@gmail.com> References: <1270125903-6004-1-git-send-email-suokkos@gmail.com> X-Spam-Score: 1.1 (+) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 1.2 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) -0.1 AWL AWL: From: address is in the auto white-list X-Headers-End: 1NxJm2-0004Ll-Ou X-BeenThere: dri-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 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.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 01 Apr 2010 12:47:03 +0000 (UTC) diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index 43c5ab3..fc787e8 100644 --- a/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/drivers/gpu/drm/radeon/radeon_ttm.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -744,8 +745,8 @@ static int radeon_mm_dump_table(struct seq_file *m, void *data) static int radeon_ttm_debugfs_init(struct radeon_device *rdev) { #if defined(CONFIG_DEBUG_FS) - static struct drm_info_list radeon_mem_types_list[RADEON_DEBUGFS_MEM_TYPES]; - static char radeon_mem_types_names[RADEON_DEBUGFS_MEM_TYPES][32]; + static struct drm_info_list radeon_mem_types_list[RADEON_DEBUGFS_MEM_TYPES+1]; + static char radeon_mem_types_names[RADEON_DEBUGFS_MEM_TYPES+1][32]; unsigned i; for (i = 0; i < RADEON_DEBUGFS_MEM_TYPES; i++) { @@ -762,7 +763,13 @@ static int radeon_ttm_debugfs_init(struct radeon_device *rdev) radeon_mem_types_list[i].data = &rdev->mman.bdev.man[TTM_PL_TT].manager; } - return radeon_debugfs_add_files(rdev, radeon_mem_types_list, RADEON_DEBUGFS_MEM_TYPES); + /* Add ttm page pool to debugfs */ + sprintf(radeon_mem_types_names[i], "ttm_page_pool"); + radeon_mem_types_list[i].name = radeon_mem_types_names[i]; + radeon_mem_types_list[i].show = &ttm_page_alloc_debugfs; + radeon_mem_types_list[i].driver_features = 0; + radeon_mem_types_list[i].data = NULL; + return radeon_debugfs_add_files(rdev, radeon_mem_types_list, RADEON_DEBUGFS_MEM_TYPES+1); #endif return 0;