From patchwork Fri Nov 13 13:49:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 324287 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp1212636ils; Fri, 13 Nov 2020 05:49:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJyrNVPypH1mavjo+r0rN9pgiUiwaLKg47fE4pv59cqyhFvPdD1RnDaCto7x2GkjtDC8ejMe X-Received: by 2002:a17:90b:93:: with SMTP id bb19mr3116803pjb.102.1605275397246; Fri, 13 Nov 2020 05:49:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605275397; cv=none; d=google.com; s=arc-20160816; b=BZQP1Ulrk44cpg13vsnj60xNmrJaTeAaQ9JrWL0yGAbpVxL69tUOPx4yekg7ek8oG1 0CBplMaquTvn6ZxLLZKVTcPASGfKYd66SJkOdY5M8SfIFehh/+7JGmO1R+oboQstAWfI JVCC4q1XoyD/ekyWV6mRuKhA6kvblWn0xs/L2Vw5DgrLVB5NLdUiHG4XzviLuPEYt6ef pawPv8OMPC/uWfKfeYq5l+J0xd3WXCM0FrF0YEOwfLNgqwQivzhdD9M7xd2Op/OXEiy2 IFRkgJnEtQsarTePr3WVVWE4KfkDZ0LRbSZY8y/RZS7eqB0shyU4zjISI072q3NZTkPA HTWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=aTYLqVfgYIJWP8gAVZ7y/NOCct2AHnXEsarsQ8tSLD4=; b=iigFj5JL9Sy/CR8fBhIGH7iHD2ddT8NP+9q6SPI5fSspS/ldKpZe7byeCVIXqvw4Ep zAbG1k7geV0FitCQPP4RmRlGc1vmI5I1XkiNpTsA95lc2d26+jCA12SR+6tDhuPEbTAC wtiKRvDNCA/92D4ShISmfazkvDtzhL+474QtKVE41KXvzwqrFJjsQLL6t/1eHATxGG4o m5A2wgf7v6hPqx0jtjtM0lLqhsCN15ceLkXz4OMMRK8a/HDsPYw9PPCBEeVI84eMfDC8 OaGlw5dyG3ePOg0WKfuoTYK29AaLWJj9nIcfhlNJHkCxU/Mz+RI78ak0avN80rkJan1b wyhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=XwFxvGa9; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id l137si8153125pfd.98.2020.11.13.05.49.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Nov 2020 05:49:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=XwFxvGa9; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3986E6E4F3; Fri, 13 Nov 2020 13:49:50 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by gabe.freedesktop.org (Postfix) with ESMTPS id D36146E514 for ; Fri, 13 Nov 2020 13:49:48 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id s13so8549272wmh.4 for ; Fri, 13 Nov 2020 05:49:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+yLMECfz4SQeh3+r6t6vIS8Tp4hfLiHYcv2v7xPbbH8=; b=XwFxvGa9Xc8VSIwGJA9BMdIQW9mUlNFmQAqTyunI02+OZcgeOhYLBswJPnWTzruwhx mo2BJ/8T2PrZu9oTvXUxAG0l3V9EYDdFyx7DsRMMIdRybw/crYokPbqPGjgsX1OrvKg4 EuqJPpQkRnhM/0e2vZJTF4poIpcDRj4YipAu3SOfO88BrBy4UvVqd6Oj6r7hGQb0nBCl G7TVdOXrrDTrsVtibgzInH4IYVN7myIIjGIn1Azb4qlkyWs2s5seN8RWVtcVNwjVALRa WnWakzteQsdODnVicJ5uPCUXG2Htl3eFcSD+gBt//wKClhkOCRFtaX3Pdpj9eQAFs918 VaGA== 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=+yLMECfz4SQeh3+r6t6vIS8Tp4hfLiHYcv2v7xPbbH8=; b=PvxKH2K9q59XC/WRdvcR3jetG6XJto+zoIGaIOWc8/QvTWaBWxrIzPoHrMGVqTodPY L4hk9NPqjTeTDQD3cClpoUdOC5l6UjgfN/JWJKZQLrbGSRMTM+iCISjdHnlm7rKe9viy 4Tdc0YjYkR71XqaVIowm13wxI1HelzN+lUsvPgsP0IXUrYbFWyVVk6XO/DxJgKhf9feq kjzBVhXBqPIFA7TtmlSr3rlp3salFuKXxoFK/vwTYY9pQaS2G8iI6pwzq31XudyCjO/c cwi4AmvforIVl4ZBDvYwQtvQX4mJkGxgHX3mLo47WVFEk5wRN+uNQj3wEMy5PAE5dOUm LL0w== X-Gm-Message-State: AOAM532LH7axda/uX5oFos+O/wLiNP7qGq3ZDKDTU0mODuQQJVPJGGip HSeWcU69Ilfbhvryjzoj0Ptr2g== X-Received: by 2002:a1c:bac1:: with SMTP id k184mr2593413wmf.76.1605275387562; Fri, 13 Nov 2020 05:49:47 -0800 (PST) Received: from dell.default ([91.110.221.159]) by smtp.gmail.com with ESMTPSA id t11sm4561614wrm.8.2020.11.13.05.49.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Nov 2020 05:49:46 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 04/40] drm/amd/amdgpu/amdgpu_drv: Move 'amdgpu_info_ioctl()'s prototype to shared header Date: Fri, 13 Nov 2020 13:49:02 +0000 Message-Id: <20201113134938.4004947-5-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201113134938.4004947-1-lee.jones@linaro.org> References: <20201113134938.4004947-1-lee.jones@linaro.org> 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: David Airlie , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Alex Deucher , =?utf-8?q?Christian_K=C3=B6?= =?utf-8?q?nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c:486:5: warning: no previous prototype for ‘amdgpu_info_ioctl’ [-Wmissing-prototypes] 486 | int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) | ^~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_kms.h | 31 +++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.h diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 1dfea15bbec36..afd357df0f886 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -43,7 +43,7 @@ #include "amdgpu_sched.h" #include "amdgpu_amdkfd.h" - +#include "amdgpu_kms.h" #include "amdgpu_ras.h" /* @@ -1521,8 +1521,6 @@ int amdgpu_file_to_fpriv(struct file *filp, struct amdgpu_fpriv **fpriv) return 0; } -int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp); - const struct drm_ioctl_desc amdgpu_ioctls_kms[] = { DRM_IOCTL_DEF_DRV(AMDGPU_GEM_CREATE, amdgpu_gem_create_ioctl, DRM_AUTH|DRM_RENDER_ALLOW), DRM_IOCTL_DEF_DRV(AMDGPU_CTX, amdgpu_ctx_ioctl, DRM_AUTH|DRM_RENDER_ALLOW), diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 98721ae931841..54c4ee6d230d8 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c @@ -41,6 +41,7 @@ #include "amdgpu_amdkfd.h" #include "amdgpu_gem.h" #include "amdgpu_display.h" +#include "amdgpu_kms.h" #include "amdgpu_ras.h" void amdgpu_unregister_gpu_instance(struct amdgpu_device *adev) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.h new file mode 100644 index 0000000000000..f3111aef76cae --- /dev/null +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.h @@ -0,0 +1,31 @@ +/* amdgpu_kms.h -- Private header for radeon driver -*- linux-c -*- + * + * Copyright 2008 Advanced Micro Devices, Inc. + * Copyright 2008 Red Hat Inc. + * Copyright 2009 Jerome Glisse. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef __AMDGPU_KMS_H__ +#define __AMDGPU_KMS_H__ + +int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp); + +#endif /* __AMDGPU_KMS_H__ */