From patchwork Fri Feb 7 19:50:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 11371073 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 EBB2C14E3 for ; Fri, 7 Feb 2020 19:51:32 +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 CA3CF21741 for ; Fri, 7 Feb 2020 19:51:32 +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="fIgBncpd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CA3CF21741 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 C4DCB6FD76; Fri, 7 Feb 2020 19:51:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by gabe.freedesktop.org (Postfix) with ESMTPS id C28F16FD75; Fri, 7 Feb 2020 19:51:12 +0000 (UTC) Received: by mail-qk1-x741.google.com with SMTP id w15so276212qkf.6; Fri, 07 Feb 2020 11:51:12 -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=RTgGxHJYBOc/AOgPlCZnYLG4WwQuIWgZuky2QefgHXM=; b=fIgBncpd/OPPojmADp1OV754fLf7jJ0s1QanZbRmAuu/0VvFTvanKG5qb2ceIkfYZU FIMudKzzqe0Kz+U8BTId8uk+5jUUS7ifM2rsIIWjGpxMdLg+8uucgDc6SgOyt46q1O7a q5bnfUyxcm6DDbIzhif/YtN1sk1XRcBoGZkvYb2Wl9FeTmHbBaJff0QKOQWPGIsaavmc v/hcGeaqPV/M5ZRoZuNlASZlevoo+ZXe4XKaxOL9I23BxEW5Pt28SJoaUH/q+hFmEYAC s0jWEUBh6v1n020pscoAYjK6zxyghILV4GREFBERgj4EWbcyHVvRZyboof//mM1erCZT VeRw== 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=RTgGxHJYBOc/AOgPlCZnYLG4WwQuIWgZuky2QefgHXM=; b=kc1bKR8a5jdPClVgAXUhd9D8n9pXcL+D4c/WO2OPFPxbrma8Hb2Q9e/bpGFNTfkVwN f7qbjuHEzyi47UwVZDre3F0gldO1VPAuACOUoYDrbwOaU1E8emRVvAX6N7z0nhn3ZbWu fsbYM1xRHtYWUqftWtv0PHDwsxvUTKUdlpl5APJnyIXOhDUNPqHhIc2v1Z1EWJhBp7m/ l9dX8sJtEGg/+G7GPknm6+VhPnkUzo0cxXMwL/wu0PMKNk8N4nqalU3s2QkfySYk3aBO FNu/Z8wnD6sE3wVBrsB/uY0eUN++TrXoAqHUhVSETpAhSeQicqjiNSYesq5yDgQVdSAx M00A== X-Gm-Message-State: APjAAAV1+Bj5CQlyEEl1IohkvfJSuFC7opC6y7rcJcbG25qeqKx3BxAR FEDIAoCEG0q5bM9rAbIHTTT4e7nr X-Google-Smtp-Source: APXvYqxVcMCN91YjzTL599Ra8FC+0E/iX7x6BghuNsshK2pDul9koX12PWb11wAsavWyq/1zHoiFKg== X-Received: by 2002:ae9:f302:: with SMTP id p2mr530563qkg.382.1581105071662; Fri, 07 Feb 2020 11:51:11 -0800 (PST) Received: from localhost.localdomain ([71.219.59.120]) by smtp.gmail.com with ESMTPSA id w16sm1752226qkj.135.2020.02.07.11.51.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Feb 2020 11:51:11 -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: Fri, 7 Feb 2020 14:50:49 -0500 Message-Id: <20200207195058.2354-7-alexander.deucher@amd.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200207195058.2354-1-alexander.deucher@amd.com> References: <20200207195058.2354-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 4cf1c2d261ca..c787aebc240b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -3123,10 +3123,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);