From patchwork Fri Feb 7 19:50:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 11371083 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 31F5714E3 for ; Fri, 7 Feb 2020 19:51:41 +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 0FA04227BF for ; Fri, 7 Feb 2020 19:51:41 +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="dp8ZO5B5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0FA04227BF 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 690E86FD85; Fri, 7 Feb 2020 19:51:20 +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 B98706FD7D; Fri, 7 Feb 2020 19:51:16 +0000 (UTC) Received: by mail-qk1-x744.google.com with SMTP id q15so257551qke.9; Fri, 07 Feb 2020 11:51: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=xsYrQuNh+sVpWmRpiWGT+6wWdo77wFgu3ioKldiOfbA=; b=dp8ZO5B5jrUIODd3uGSh47Ky7pDD4uz53BtlJpxkmI9hlp3vn3T7LAvzpj/ww+Rz58 vqvsZe0xdokS0IWkiB4usXDp1/IurUCK/+McDXFJxlCUs+Pd2Nc8CWoIh+V0j3FtxFte NJAmtba+ZItC+c4PKc1b4lDQrb2hVnZcjSu8Ekdma3IIp68DeiR9lntftKXWmM2LGXdQ zZY+fWc3Wa+PR+dkcFF/mFzr4BwxYlNcScjQdPVbZqvOAmNOYEgfHhU+So2iB+5YFeK1 54A3rAJTthuvVCF8WHB6m/Ra4hVeV7TcHdixkXbYbu5Sbgnoh+lfWPI1XpBiPls3LV3q RG/g== 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=xsYrQuNh+sVpWmRpiWGT+6wWdo77wFgu3ioKldiOfbA=; b=q/+yn9dELB+agL9MHfwSn/+HlGpIYvwg8IXhL7FPeyfd4A0KczwenSdc2PNy6jwkt5 yyJzoTRhwe8rwbhcmM8YHffwZ7LlB0lXSO2FMU6rIe+hh9mQRuJ8LDdvZE9OU/kRnhQN eD3wRViY9K9s0oSJpe7LRHW+dX6Gl2k+BGCqYeYtY+F0MOCgj95LIWoKu+K4IVQMl6mY oc+tndU3m+86YGKeJ5xWHzPLAiczeBNLJb9CAJTOgOYnAn98tc2OEgXGkqokuJusPW5f zx0UspdEkuwyZmp/iwjfXN/zIzJudrUJgIKiwGap1crOgq5AYIi8NHMvLXdVCbGhen44 ZP5A== X-Gm-Message-State: APjAAAXKrdczO3p1qh2VFdkNnvHM5ch2G8Larb+/U3TCH/iBMTn4wfvQ oakKVahybIncBBhcass2df23ciWf X-Google-Smtp-Source: APXvYqyUHRb3UwFFbDyafl3y83rTQo56tMJSk3Fi+2DFonlCS9p6iyuZqOz2FmNWQaAG4eD+7pJTLQ== X-Received: by 2002:a05:620a:b04:: with SMTP id t4mr533002qkg.7.1581105075476; Fri, 07 Feb 2020 11:51:15 -0800 (PST) Received: from localhost.localdomain ([71.219.59.120]) by smtp.gmail.com with ESMTPSA id w16sm1752226qkj.135.2020.02.07.11.51.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Feb 2020 11:51: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 10/15] drm/amdgpu/display: move debugfs init into core amdgpu debugfs (v2) Date: Fri, 7 Feb 2020 14:50:53 -0500 Message-Id: <20200207195058.2354-11-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 display. v2: add config guard for DC Reviewed-by: Harry Wentland (v1) Acked-by: Christian König (v1) Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 8 ++++++++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ----- 2 files changed, 8 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..df3919ef886b 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,13 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev) if (r) DRM_ERROR("registering firmware debugfs failed (%d).\n", r); +#if defined(CONFIG_DRM_AMD_DC) + if (amdgpu_device_has_dc_support(adev)) { + if (dtn_debugfs_init(adev)) + DRM_ERROR("amdgpu: failed initialize dtn debugfs support.\n"); + } +#endif + 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;