From patchwork Tue Nov 10 19:31:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 322874 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp500617ils; Tue, 10 Nov 2020 11:32:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJzNOdv2zm34v1YUTQptSREdW6cjHYOdx5eth7Ug6R6U1jKSlxS0pJI1Tr+SXW1POYXQnwiC X-Received: by 2002:a17:90b:2342:: with SMTP id ms2mr739661pjb.136.1605036721686; Tue, 10 Nov 2020 11:32:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605036721; cv=none; d=google.com; s=arc-20160816; b=p/AMT6rw2M/AIHyNFsP5QqwvwbPkMdanSkcLWg9PQgZSYujw029H6UnehW8ks7dhmp GOM1WS2lT6MFzHXQMNP/NeqArYpGSR034E1oLEEnnBz+BR46gnxIZLMhoYKHPW0owlBw tGJO0yqYSRwUkZ0KYuaVLrPEpbt7uxfGbvvbkE4gNfnGOg1ekA/g/yq0pmslBRJ3kkFL CzLbfqLzwzBDZQge5GcmG4STiqGpW2AEhSLLuaKASnDOUO5b8ChP8IVVmI9nJLe0B5t2 6qzRUH/+f7lJT/7zeaP1hRhF3PHhLDqeUH9CPaMkGvGJGRN0d7PgODkReT1+XGwPVQm6 5AzA== 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=xCvqx/XZMMM42H9DYqiq4FsSjuNxrDXZUrayfHr+gE8=; b=WA5iboKdM/i83wZLezqr/RA9/3SbeNKkSMI7YNvEwdJi9vplwL2yCpVFGO6sRtd1yh CVjN4MgDJpKOs2Z0to8I20D+45FdzjH4CnaoEAJ7uxQfAGEY+v20PI2rclQ2mJ75r4cZ bbBZxAidS9pPKPwdswES6YhhJVvj2DYjioUu+aJNBI9+l7b8Avn6z4gcCBqnyKyl48Gm VabHBhiP3aIWaE3mmQRA3CSOn4862xJ4+0S6DoyM+2QXgK6BbFLz6N92ZN498Mm8WpUC q+Ar8N5nZksVytF6EvPkAP0hNWkJEHyu4azkTo5zEikS7peEQfPpylhnDlrNYTwF0g6j KNQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=NfPbVfYF; 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 w73si12015743pfd.301.2020.11.10.11.32.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 11:32:01 -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=NfPbVfYF; 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 0B3ED89C0D; Tue, 10 Nov 2020 19:31:50 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 054D489C16 for ; Tue, 10 Nov 2020 19:31:45 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id b8so14010791wrn.0 for ; Tue, 10 Nov 2020 11:31:44 -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=FQd0T6EZFrZfchicFX37ZuWoOJNv6vhATW4C3kJNXAM=; b=NfPbVfYFBBBjkxCWTq+m/TLJOAQordAJBmRq0U/vnLCAcBmtoGC1b1qlMvfFXFQrVt p7/xW3rweSPZZwDy2lSQOcqGTViIRaNzSQ1L4gV9a2kgTTxnMUEI/2fB6qRWo6j+p5Xq HOsgh5DQ2J1NLmbacVB/ITLusVLkNvBQ+JSuJx4jaS8YsqR18Z0DjOVsYTlaN5m6dgBj trLQja4ZJ3AGuFfnuSKzfaVj3Y1yJOUTt5vsvDhhP5mhX7/4dFNHIGE6XsfI+slaMeBO CzoZSruaj/XMeNLQysRevchaQDjeznR+Bh1S3yaLc9CJKixBLNMGDpnN4ItSOm69SnGo /QSw== 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=FQd0T6EZFrZfchicFX37ZuWoOJNv6vhATW4C3kJNXAM=; b=nZMVdLFJxlICOt62OaEuxfD1xTDwJhnyQLSID6ANUQqV/WJSCM8pJAXIi1fW3YaKBF 0XhYSDObz+8E4HzqUo3BCnAdCn2kZOUH83amiAIrCQXO3qczpuIl7qxkIQy2Ovjqj8Zn OBjxZGipM+j4x/f96e+Ae+iMWsTQnBNohPzA3nnV1c4uZ5NkPdfiAHh9JrUbPl+vZbXw 9fb8me/EHWcPxa5NByMeiWZ5RBjHW0j9yuXOJMlrqmbTX3l7iZjwKTgwj//jau1I7Fu8 1nQji+CleJXGOJPJfzGTSXG8gUTCbSiAiNM9N9vJ0C9xiIkcSSlFUxhq1uw0xv4QwTZ6 R6jg== X-Gm-Message-State: AOAM531z81zBKCTB9yRQZTPHekZXZmrG09eziVSH19dcEI4aEy/geLjm E/Hx7O9z2vzRlA3G9CJAY5UJkw== X-Received: by 2002:a5d:4248:: with SMTP id s8mr25262268wrr.161.1605036703586; Tue, 10 Nov 2020 11:31:43 -0800 (PST) Received: from dell.default ([91.110.221.139]) by smtp.gmail.com with ESMTPSA id 30sm17635335wrs.84.2020.11.10.11.31.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 11:31:42 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 22/30] drm/radeon/radeon_gem: Move 'radeon_gem_prime_*()'s prototypes to shared header Date: Tue, 10 Nov 2020 19:31:04 +0000 Message-Id: <20201110193112.988999-23-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110193112.988999-1-lee.jones@linaro.org> References: <20201110193112.988999-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 | 9 +------ drivers/gpu/drm/radeon/radeon_prime.c | 1 + drivers/gpu/drm/radeon/radeon_prime.h | 39 +++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 8 deletions(-) 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 0ccd7213e41ff..6db11e357565b 100644 --- a/drivers/gpu/drm/radeon/radeon_gem.c +++ b/drivers/gpu/drm/radeon/radeon_gem.c @@ -34,14 +34,7 @@ #include #include "radeon.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); +#include "radeon_prime.h" static const struct drm_gem_object_funcs radeon_gem_object_funcs; diff --git a/drivers/gpu/drm/radeon/radeon_prime.c b/drivers/gpu/drm/radeon/radeon_prime.c index b9de0e51c0be9..789e076efbdc6 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__ */