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: 11909923 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3129C2D0A3 for ; Mon, 16 Nov 2020 17:37:34 +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 7ADFB20B80 for ; Mon, 16 Nov 2020 17:37:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hZVLMix1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7ADFB20B80 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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 55B0F6E056; Mon, 16 Nov 2020 17:37:29 +0000 (UTC) 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-Google-Smtp-Source: ABdhPJydVhYVQplr9ob8iExHsLg/heD2iZQeiyoF2zK3gQ9KqSr1EMIhtlHB/PvQg1QOb8r4EHIfmw== 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=B6nig?= 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__ */