From patchwork Wed Feb 5 15:39:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 11366471 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 38E1B139A for ; Wed, 5 Feb 2020 15:40:34 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 180BE20730 for ; Wed, 5 Feb 2020 15:40:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="f/ixeOT6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 180BE20730 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F1C5489DE5; Wed, 5 Feb 2020 15:40:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw1-xc42.google.com (mail-yw1-xc42.google.com [IPv6:2607:f8b0:4864:20::c42]) by gabe.freedesktop.org (Postfix) with ESMTPS id E6B1689E35; Wed, 5 Feb 2020 15:40:15 +0000 (UTC) Received: by mail-yw1-xc42.google.com with SMTP id l5so2751271ywd.4; Wed, 05 Feb 2020 07:40:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2OA8lB2OrGh8nJkA0X7sKAlsz1UEuNurcUSKsfyXOw8=; b=f/ixeOT6fnzJFPCmD2pJnSq0PAib1LY0yliODigYy6EvY2/vTZ3cf9c0TKTnBoajSj iWZhzfsRaJ8iBEelVMSEUlMMQQ/BJmlsi6xLZh3TLGwmpT06ybZTCAUviLa1q1yqG14M oYHQQ/j9fxwm4oO/LVdQv1CoUh7COvpMvQXj5rGHLN7B9n88TR3KcaG7N6uNuL2LSqUR xdjTq/k+FX+y4fsiXIQIVvGf0SbjQcDZmDJ2d0Siy1LPsh0KAsP2mQu0kr3IWp3aJh9z gfPfCIibNs69/U79KCi7keEQxG6y8FolyXzXQg9EXNwHMDSyeJ5UC9E2RgGkHm6B4LC2 6IzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2OA8lB2OrGh8nJkA0X7sKAlsz1UEuNurcUSKsfyXOw8=; b=YSq6zFw6tXE2OQ5vF3fYRLkQ26sTlOgYAhN+E8fI9u+zaeoC8moKKNfeetCOr16ygU tfth0gMNn+2cxrsc0FB9UwKYl6Q/+ygdK+x4aUdcteNFmCfsdR8UdarDVTIV7gtMbUSf rmO11CpCop/1zggmx26zG5AzzLvuRL2wAhSKJYNl6krC8awhCrJcAW9AiQqc11UZTxeZ hLtPcFU0+Hqo/33Cbx4Cc8+2YobXeqMnbXOpO/YfJ2KuvIQlbRrf43LgODM7tdsLvCmr SGs8zhwC9J8HRrlmv2dbL0RuKLJL4elarBqWnWk9TMnsV0RYEqWhFRhkYUHu2q/XiA/n h24g== X-Gm-Message-State: APjAAAVCU0jkKgnazN2AuloTCwtoL9H3/D6Hea6QUYQalVlx7+VBiWqH DpPjXaXMduz+UYkR1ZCpCLKH3B4I X-Google-Smtp-Source: APXvYqzNPGWqXj/B4XVQY8UcxPVqUcF17G3wP9DtZ6QwOh44gN4xrGxBE0em2p9IOAIGuNU8vwR+wA== X-Received: by 2002:a25:868e:: with SMTP id z14mr29422720ybk.413.1580917214634; Wed, 05 Feb 2020 07:40:14 -0800 (PST) Received: from tr4.amd.com (atlvpn.amd.com. [165.204.84.11]) by smtp.gmail.com with ESMTPSA id q185sm61256ywh.61.2020.02.05.07.40.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Feb 2020 07:40:14 -0800 (PST) From: Alex Deucher X-Google-Original-From: Alex Deucher To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH 06/15] drm/amdgpu/gem: move debugfs init into core amdgpu debugfs Date: Wed, 5 Feb 2020 10:39:51 -0500 Message-Id: <20200205154000.536145-7-alexander.deucher@amd.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200205154000.536145-1-alexander.deucher@amd.com> References: <20200205154000.536145-1-alexander.deucher@amd.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" In order to remove the load and unload drm callbacks, we need to reorder the init sequence to move all the drm debugfs file handling. Do this for gem. Acked-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c index bcd10daa6e39..cb7db7edfc3f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c @@ -1248,6 +1248,10 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev) if (amdgpu_debugfs_fence_init(adev)) dev_err(adev->dev, "fence debugfs file creation failed\n"); + r = amdgpu_debugfs_gem_init(adev); + if (r) + DRM_ERROR("registering gem debugfs failed (%d).\n", r); + return amdgpu_debugfs_add_files(adev, amdgpu_debugfs_list, ARRAY_SIZE(amdgpu_debugfs_list)); } diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 3b09897eb1e9..64a275664c72 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -3091,10 +3091,6 @@ int amdgpu_device_init(struct amdgpu_device *adev, } else adev->ucode_sysfs_en = true; - r = amdgpu_debugfs_gem_init(adev); - if (r) - DRM_ERROR("registering gem debugfs failed (%d).\n", r); - r = amdgpu_debugfs_regs_init(adev); if (r) DRM_ERROR("registering register debugfs failed (%d).\n", r);