From patchwork Mon Nov 16 17:36:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 324445 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp3503211ils; Mon, 16 Nov 2020 09:37:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSAqy1OVU5/kI6ZiXksRe3ZvTgAOxx+5rXkasHaQR8zQnh3J8nPFQA28IEWQTKMG/rUWNP X-Received: by 2002:a62:2cc1:0:b029:18c:85f5:864b with SMTP id s184-20020a622cc10000b029018c85f5864bmr14505389pfs.29.1605548254991; Mon, 16 Nov 2020 09:37:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605548254; cv=none; d=google.com; s=arc-20160816; b=epE7nc9Ewe9wboMwX0eqbZcB5H9W1hBiF26UpVE8z8thvfH4MFy/d8k+xwI4cmJLbo Ncu7B6I4z2wTflQY0FKw8l7AzhgIE9j4pT0ZGAHVxte1HyiOPsG6MbNFS/4Z2KoaTXBR Sxmj5lkP2CYyThc+TUc+1MB/6a8IHHaJdLAuxRPi54aZTU8vIfFMhXY0Dpf7reWNeN39 mB+Smj1JCSKH9F5EWsq0CuSMqRmLxOgl+5MxcWSV38ZVoP2uFuXdYOPO8rg+317Jc5Vi FvO176UZfb7/IgaXOS8eVjsDbbLjb6jXt1fmaG/3mwtxcJdNpavkUUsRe74gHZnuEfl6 aHlA== 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=MdWu6wID9JVO/0aQsG+6aY+n98NVxSDotwOHb/brB/M=; b=Rz5Ztx/ezkZDkTrVgrbTs+VdFAWzAVE7gF9jFLi/b0ZSXLWxcnXjFYihmI2T6iOMtK WrYRqxj97Y+V5UKUk/WcG9RqVJe9DqxalVMw34fhV2XGDlyfQKbe96OXK3DKhmgVPprO VlOt0eG6qt1G/VeNtSM00se3REz1/x603U+02IQk0V3gau5WPkgV8uclJ3Qbjgx8tfQZ JKrFA1eQCqNLb+UCA3iser2iTYTK2YVbgsNcORTK0/QVYAEiM6/iEynofMwuRhqFZ2Od ZTezmSnRSRpFodyzQ7UbEixt4yxAcvYtLtCdlXuXWkmBeNYiDzCGg3tlEWVmVDoa3PYd Y7dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=hZVLMix1; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 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. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id r9si14854310pgb.87.2020.11.16.09.37.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 09:37:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=hZVLMix1; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 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 55B0F6E056; Mon, 16 Nov 2020 17:37:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1D6C66E03B for ; Mon, 16 Nov 2020 17:37:27 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id 23so19606105wrc.8 for ; Mon, 16 Nov 2020 09:37:27 -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=ZB9hYDRdCmOkwqHlGjcs4P6f6PN70ruIEMJUcMVmENQ=; b=hZVLMix1qZXuOVledxd2pSvUCKHQwD1kkJJOi+0dzOiRZWtJzU6UHoOXvxWRs0/GcW yFlNWsBkdSrSq/mxr6HCuk6ZLzSLP3sSthyILxjtGJCBetdfhF9kSyv9F0CEQW7V6N1r CZBQP/LlSmmkZWzV4UOV0pCYavCl/esO2zH3MHWnY8aK8hGIE5gH8a7mE3lc0HRsZxfR f7Vkt/kyfkxpJg7u/yMSOHcb7IWtXceYip3tFAxmngjh/tsCk3Xph+1PeS1GTEXNqq3R fSySmp9Ht+PyBmgCj5THCOIIZB7U/be1M7R15riXasVAZzNzd7561n1QB16RiepLN97K dboQ== 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=ZB9hYDRdCmOkwqHlGjcs4P6f6PN70ruIEMJUcMVmENQ=; b=T9naJDOTC+Rk9DizyyDCGohPmM7iRiL5SYSNFdSDC+0A6H0Goh1rlutil/XIISloj7 Baw4Of/jMhtxiXb9JY8SyYQRwvAwtoiwi/9z25o3P5MgysXEHonn6yED4AJHthQ3Aiar vPz1ekd8ijvv9FFfcFSVJhok8jzJRehmblHe53toRpV5T2yDwWvb90ZLJr5lVMO/CybG BVo8OGPRJhzHskngv7/WLuPErSupAvXUs4EtXjYIRF7pzJFuUSCFXIZMF2nZkNbBXNa5 07wr9N6rjX/eRB5ygEK1d7Tsuk941uU/6jEL5xCxd8DYHcSqroqaHpsYABRFp4iG7bO4 9yQQ== X-Gm-Message-State: AOAM533TmQ34C+JxisXfOHxVHuozb+LiAtrUIv+aNGK6NwaS4NY7q/Z2 LXTLVjs1xMfm2nb3t03JxRvFjw== X-Received: by 2002:adf:f881:: with SMTP id u1mr21825293wrp.103.1605548245824; Mon, 16 Nov 2020 09:37:25 -0800 (PST) Received: from dell.default ([91.110.221.159]) by smtp.gmail.com with ESMTPSA id 30sm16942828wrd.88.2020.11.16.09.37.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 09:37:25 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 16/43] drm/radeon/radeon_gem: Move 'radeon_gem_prime_*()'s prototypes to shared header Date: Mon, 16 Nov 2020 17:36:33 +0000 Message-Id: <20201116173700.1830487-17-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201116173700.1830487-1-lee.jones@linaro.org> References: <20201116173700.1830487-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/radeon/radeon_prime.c:34:18: warning: no previous prototype for ‘radeon_gem_prime_get_sg_table’ [-Wmissing-prototypes] 34 | struct sg_table *radeon_gem_prime_get_sg_table(struct drm_gem_object *obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_prime.c:42:7: warning: no previous prototype for ‘radeon_gem_prime_vmap’ [-Wmissing-prototypes] 42 | void *radeon_gem_prime_vmap(struct drm_gem_object *obj) | ^~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_prime.c:55:6: warning: no previous prototype for ‘radeon_gem_prime_vunmap’ [-Wmissing-prototypes] 55 | void radeon_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr) | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_prime.c:62:24: warning: no previous prototype for ‘radeon_gem_prime_import_sg_table’ [-Wmissing-prototypes] 62 | struct drm_gem_object *radeon_gem_prime_import_sg_table(struct drm_device *dev, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_prime.c:86:5: warning: no previous prototype for ‘radeon_gem_prime_pin’ [-Wmissing-prototypes] 86 | int radeon_gem_prime_pin(struct drm_gem_object *obj) | ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_prime.c:104:6: warning: no previous prototype for ‘radeon_gem_prime_unpin’ [-Wmissing-prototypes] 104 | void radeon_gem_prime_unpin(struct drm_gem_object *obj) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_prime.c:120:17: warning: no previous prototype for ‘radeon_gem_prime_export’ [-Wmissing-prototypes] 120 | struct dma_buf *radeon_gem_prime_export(struct drm_gem_object *gobj, | ^~~~~~~~~~~~~~~~~~~~~~~ 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/radeon/radeon_gem.c | 1 + drivers/gpu/drm/radeon/radeon_prime.c | 1 + drivers/gpu/drm/radeon/radeon_prime.h | 39 +++++++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 drivers/gpu/drm/radeon/radeon_prime.h diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c index d2876ce3bc9e2..b6b21d2e72624 100644 --- a/drivers/gpu/drm/radeon/radeon_gem.c +++ b/drivers/gpu/drm/radeon/radeon_gem.c @@ -35,6 +35,7 @@ #include #include "radeon.h" +#include "radeon_prime.h" struct dma_buf *radeon_gem_prime_export(struct drm_gem_object *gobj, int flags); diff --git a/drivers/gpu/drm/radeon/radeon_prime.c b/drivers/gpu/drm/radeon/radeon_prime.c index 088d39a51c0d2..dd482edc819c5 100644 --- a/drivers/gpu/drm/radeon/radeon_prime.c +++ b/drivers/gpu/drm/radeon/radeon_prime.c @@ -30,6 +30,7 @@ #include #include "radeon.h" +#include "radeon_prime.h" struct sg_table *radeon_gem_prime_get_sg_table(struct drm_gem_object *obj) { diff --git a/drivers/gpu/drm/radeon/radeon_prime.h b/drivers/gpu/drm/radeon/radeon_prime.h new file mode 100644 index 0000000000000..11b7f80987834 --- /dev/null +++ b/drivers/gpu/drm/radeon/radeon_prime.h @@ -0,0 +1,39 @@ +/* radeon_prime.h -- Private header for radeon driver -*- linux-c -*- + * + * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. + * Copyright 2000 VA Linux Systems, Inc., Fremont, California. + * All rights reserved. + * + * 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 (including the next + * paragraph) 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 + * PRECISION INSIGHT AND/OR ITS SUPPLIERS 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 __RADEON_PRIME_H__ +#define __RADEON_PRIME_H__ + +struct dma_buf *radeon_gem_prime_export(struct drm_gem_object *gobj, + int flags); +struct sg_table *radeon_gem_prime_get_sg_table(struct drm_gem_object *obj); +int radeon_gem_prime_pin(struct drm_gem_object *obj); +void radeon_gem_prime_unpin(struct drm_gem_object *obj); +void *radeon_gem_prime_vmap(struct drm_gem_object *obj); +void radeon_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr); + +#endif /* __RADEON_PRIME_H__ */