From patchwork Wed Feb 5 15:39:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 11366473 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 0148A1395 for ; Wed, 5 Feb 2020 15:40:36 +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 D478D20730 for ; Wed, 5 Feb 2020 15:40:35 +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="FcaJfdEb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D478D20730 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 6F7446E219; Wed, 5 Feb 2020 15:40:18 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw1-xc43.google.com (mail-yw1-xc43.google.com [IPv6:2607:f8b0:4864:20::c43]) by gabe.freedesktop.org (Postfix) with ESMTPS id D9F8B89EEB; Wed, 5 Feb 2020 15:40:16 +0000 (UTC) Received: by mail-yw1-xc43.google.com with SMTP id 192so2795828ywy.0; Wed, 05 Feb 2020 07:40:16 -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=bkYRQmfYepBStIDdFbUMKhxcQfkGtWaInDgOAE3QheI=; b=FcaJfdEbFBtxNjMOuOSLT7Iy3Bscftke9zGm4bTAj+hStl0FX/fjf/seVkfh+JldbW WsxZ61sl15zGteV31pHrPJVbI8zHdIMt7v0oC7IXqW25oRRPYwFU8DvBXxnlq8B9atx5 ahfYk6Tncg8yLzkjmRUJThAJfxjqPDbDV7/Y0ZtUhoCN5NoA/Jith/t5/DiM8HJbngw5 rs9FxhDgBr7rqUq2h66cKS+Vr/KJeIpUhT2ksNKzV38FCSeemL7l7Qbr8RU9Sinbbn2H 839NYSmvK+4b/ORxB07UXHbJra4JhrCtgBncF7HgaAFSbFyZaMxtmG8lNRlZ6G0afA/7 pkew== 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=bkYRQmfYepBStIDdFbUMKhxcQfkGtWaInDgOAE3QheI=; b=FJa9JqgNxn7igRzGUQR6xHkR5bZcj0y/vctFQasr7boWSxrhxPRwBQSZSnSE7TBCnC 7aVOk6ZlmXvPmKU+WotyuHC+83CqOvgAW2bToJg1rnvlrNWKEgBxwa6UbPl9Abqj9VhW wn90/t+I5eWWE9mC2C/dCNXytKDyBMwBe3lBfiu7kgarN0UbQj7yFn3VnSMjThA8EXYn JA/OKnX51QQV4hkTX0p64ubHYo4ej5YJiPpPYSW2ApBeYUbOZ1D0N7/BI6ZAMpC66lHO TJao1MIIW1dHCsq/yP8XFFHR5dXmS5uGIhrOCLuMubdZ6Gb2XQmsWD1fQNjsvha9Gjcd xA7g== X-Gm-Message-State: APjAAAWfRpP1SwbJ4hFhsCnhSTcV4oDZP4rQj/SZohQeKXt0EnBIIbnc zCaXyN31C8OU7HeXEK8gnLDG9hEJ X-Google-Smtp-Source: APXvYqykyvtAvsIDtqhme53U7k6Ed3SAv9zRptrt4IB6qc+JOo6zh9LkCPF9DFhldBH6SpSQFGTl6A== X-Received: by 2002:a25:56:: with SMTP id 83mr21901620yba.80.1580917215801; Wed, 05 Feb 2020 07:40:15 -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.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Feb 2020 07:40:15 -0800 (PST) From: Alex Deucher X-Google-Original-From: Alex Deucher To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH 07/15] drm/amdgpu/regs: move debugfs init into core amdgpu debugfs Date: Wed, 5 Feb 2020 10:39:52 -0500 Message-Id: <20200205154000.536145-8-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 register access files. 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 cb7db7edfc3f..7721f1416cdb 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c @@ -1252,6 +1252,10 @@ int amdgpu_debugfs_init(struct amdgpu_device *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); + 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 64a275664c72..d84a61e18bf8 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_regs_init(adev); - if (r) - DRM_ERROR("registering register debugfs failed (%d).\n", r); - r = amdgpu_debugfs_firmware_init(adev); if (r) DRM_ERROR("registering firmware debugfs failed (%d).\n", r);