From patchwork Wed Feb 5 15:39:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 11366489 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 95377112B for ; Wed, 5 Feb 2020 15:40:49 +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 7395520730 for ; Wed, 5 Feb 2020 15:40:49 +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="IfBXGEUX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7395520730 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 E341C89C53; Wed, 5 Feb 2020 15:40:29 +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 38CE26F612; Wed, 5 Feb 2020 15:40:20 +0000 (UTC) Received: by mail-yw1-xc42.google.com with SMTP id t141so2671904ywc.11; Wed, 05 Feb 2020 07:40:20 -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=4p9znhhB5vE3fVJEzAq+piHOIAc6BksjmnQcQMYSiD4=; b=IfBXGEUXp2lvRYs1SkeXpykPkiutBaGl9s0TFAU43GLO+gE2+lmKenzeAd0K/OlruC xTC3DvdI7vzHuTZbimKryvhfxf5HGZtxMdYZM8c9isde7DRpRhOf+IHhs245/ZuJ+o4S blCB419/qfqrasrEIo6CwTcdIdSELpiRgCqjLyaUcO9e3uP+KQA/tldFe9KbD1FLjDDX Q6eK8pImTB2ET7OqxVK+e6yLjjNVYDs9TCO+to1smHQFYTJ490ZeVjdND6io0SDQtfJZ tti4Gc6fzAFinKQBSOQN0lD1Y6ILxrIhayoBjOLd69E1dZ7RgzBAcioZSxP2zfMBFyk7 2T7A== 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=4p9znhhB5vE3fVJEzAq+piHOIAc6BksjmnQcQMYSiD4=; b=Bks+Mp2fvcguxu2H/HCGkT8B3cg6J2gaP6bCgy8ZmcjkIg30Lp2Kq7qbjyMnhh9wsC CzBdfZRUDy76/tfMWGbu7tX+r8foeA9PZLq2HTTGtcubIU2XI+tLh0hdnQu/ZlZkYhYD B/g4X6EA2SlE7tqbIjVvs01tr0FyLZPNokdUSx4B7v5faY29hfLrQOJKyVAUq2hmJtQF 6ypEV2dJgeHBiErDdltAP7yoYbLq9AQw4VHqeJ6hCFcO46xt2rD+aCba+9I4pCqnEDam on4UnAEODa/cPhwgaIIT29Od816tbASa96GPMGTECOnzeqrdZbzBRM4EnQeXgSpzLHZc 6IDw== X-Gm-Message-State: APjAAAXWG/LXb5GKE/OakeA9+xMgsCBIMTLpBwtrF5z/FuqNT1j17E41 ZD6fqNobdwYVnchRJHbquv44lUAT X-Google-Smtp-Source: APXvYqxamsgv+VcMAsj8GCx4BDfX31ChXSBAbgXpvtn8GfMmr7IkKaIrDZCYiVHrfJROvf2tkg8FXQ== X-Received: by 2002:a5b:ac9:: with SMTP id a9mr28450299ybr.307.1580917219147; Wed, 05 Feb 2020 07:40:19 -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.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Feb 2020 07:40:18 -0800 (PST) From: Alex Deucher X-Google-Original-From: Alex Deucher To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH 10/15] drm/amdgpu/display: move debugfs init into core amdgpu debugfs Date: Wed, 5 Feb 2020 10:39:55 -0500 Message-Id: <20200205154000.536145-11-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 display. Reviewed-by: Harry Wentland Acked-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 6 ++++++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c index 5bf43f20ec30..82d30bae2ba0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c @@ -32,6 +32,7 @@ #include "amdgpu.h" #include "amdgpu_pm.h" +#include "amdgpu_dm_debugfs.h" /** * amdgpu_debugfs_add_files - Add simple debugfs entries @@ -1260,6 +1261,11 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev) if (r) DRM_ERROR("registering firmware debugfs failed (%d).\n", r); + if (amdgpu_device_has_dc_support(adev)) { + if (dtn_debugfs_init(adev)) + DRM_ERROR("amdgpu: failed initialize dtn debugfs support.\n"); + } + return amdgpu_debugfs_add_files(adev, amdgpu_debugfs_list, ARRAY_SIZE(amdgpu_debugfs_list)); } diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 50137df9cdad..81c8d8c61d62 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -991,11 +991,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) goto error; } -#if defined(CONFIG_DEBUG_FS) - if (dtn_debugfs_init(adev)) - DRM_ERROR("amdgpu: failed initialize dtn debugfs support.\n"); -#endif - DRM_DEBUG_DRIVER("KMS initialized.\n"); return 0;