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: 11895147 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 5F17AC388F7 for ; Tue, 10 Nov 2020 19:32:02 +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 EA28E20665 for ; Tue, 10 Nov 2020 19:32:00 +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="NfPbVfYF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EA28E20665 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 0B3ED89C0D; Tue, 10 Nov 2020 19:31:50 +0000 (UTC) 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-Google-Smtp-Source: ABdhPJyWRZfDxpuBUrY4O3jPEFdQHh2/tXUGRGyJsPU87lKC+HnGc+0Ov8H6i8WFesbdAxKyzE7YxA== 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=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 | 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__ */