From patchwork Fri Feb 7 19:50:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 11371071 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 85CE3109A for ; Fri, 7 Feb 2020 19:51:31 +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 6487C21741 for ; Fri, 7 Feb 2020 19:51:31 +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="tiIDrcsL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6487C21741 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 987326FD78; Fri, 7 Feb 2020 19:51:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by gabe.freedesktop.org (Postfix) with ESMTPS id B4C4F6FD71; Fri, 7 Feb 2020 19:51:11 +0000 (UTC) Received: by mail-qk1-x744.google.com with SMTP id j20so252254qka.10; Fri, 07 Feb 2020 11:51:11 -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=vuO2RgQIhRHrPoIOS6P9hpIDp5H+sQisyjrPWS+rotU=; b=tiIDrcsLW836k++hg9Aw0QrmZf71n1Zhzv0MOCFnmL++agdzWXgdl7+5zUe5wdyyhD lw+fo9oQTc+Nrf2X812Mg0a2B7UBcE8UmJcY/NKFKudrG+zr4PuZ3/fvgFf+MzYQmJEw EGCKoTZVwt2e2Mgr0KkGbSfAYHItyFCUwJ9Gf1+YtyGgDXhdgGtacBZD+exjCg6SeE+5 6BpwgoyRmSkf2q+zShOU5mc36mdOtL2H9NkhvAAB7O3HSj5qJ4XDGbHwsx+ACfK/vSAy VCa0Ir5m+pcF5yw+VsE5TcEOJSBgm24z3A03DG65lWM/0eoneKk3DzPX+cKmwqRKL9Xi iGJQ== 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=vuO2RgQIhRHrPoIOS6P9hpIDp5H+sQisyjrPWS+rotU=; b=uTzTYbOeEJxHdPDoOFJYYkN8cyjSVGI1M3kTtyjdEYik3Uh2+hbos8/kTRuCfv+H7a u5tobQkJEjir3vKDa3cgdyXad4nZP3EyqCF/XNfLEk1Ehfp1i0sEm8WJfqrxS7hWjsJM F52GFbagIb9yguHhX7hnoIADsJuCGMTdTgk0KqggUtRe+2NwSuwEpvRSjhcEhfRKJpIx hrl4r2NRS3YGImygOKdVzVbDWxgLaWYIlJa7Sw0P9qdf3ID60Mcb4U/vle3nqRqfzpBW im/DU6I/YkgsR8Y9dUE3/uDx8CSvpZP6uqEFY2jjRdAdxBlFyaJP4jsPHcm/6xEJ0Pru VRvQ== X-Gm-Message-State: APjAAAXuIn+gUKo4ea+5XYsEBJD2jAsCESkf9thOx+rhpryZKV+asFwI ABXp3PHeFVGkO3lBOYQ5VN5aWm6M X-Google-Smtp-Source: APXvYqwcvKM4XqtLBNpp1gzixUU4c2qPVCAd3yaUUGdKvtZHXadujAcMp+7Ge8EGMAKQw2ZO2Vh3Cg== X-Received: by 2002:a37:6346:: with SMTP id x67mr526597qkb.476.1581105070703; Fri, 07 Feb 2020 11:51:10 -0800 (PST) Received: from localhost.localdomain ([71.219.59.120]) by smtp.gmail.com with ESMTPSA id w16sm1752226qkj.135.2020.02.07.11.51.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Feb 2020 11:51:10 -0800 (PST) From: Alex Deucher X-Google-Original-From: Alex Deucher To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH 05/15] drm/amdgpu/fence: move debugfs init into core amdgpu debugfs Date: Fri, 7 Feb 2020 14:50:48 -0500 Message-Id: <20200207195058.2354-6-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 fence handling. Acked-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c index 84c5e9f23c76..bcd10daa6e39 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c @@ -1245,6 +1245,9 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev) dev_err(adev->dev, "failed to register debugfs file for SA\n"); } + if (amdgpu_debugfs_fence_init(adev)) + dev_err(adev->dev, "fence debugfs file creation failed\n"); + return amdgpu_debugfs_add_files(adev, amdgpu_debugfs_list, ARRAY_SIZE(amdgpu_debugfs_list)); } diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index 3c01252b1e0e..7531527067df 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c @@ -503,9 +503,6 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring, */ int amdgpu_fence_driver_init(struct amdgpu_device *adev) { - if (amdgpu_debugfs_fence_init(adev)) - dev_err(adev->dev, "fence debugfs file creation failed\n"); - return 0; }