From patchwork Tue Jun 20 12:03:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13285767 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 06B2FEB64D7 for ; Tue, 20 Jun 2023 12:12:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FwyjwKvlUaPnbkVK0COha8S6AasQYyAP1Io3qiscNmg=; b=cRAZFpYkqG6P9b qkU4XLOD/4kvVI1feh0SAFLiCrDFnhSlugaeSDw4GBZg4fBm+DCOU5PI8DgaHBMJbw9RkVPqTxVKZ Ls/d+9gcCbUW+qrYczPdYnjVBZ4x5CafCak1zDG9zwVM8GNck21s5G9BTH5obYeQZBlenZRVBmYRd ia2Epm8jo+ryQlzFSkWgamHboexPDp8YJQlmBWAa6N+cDzHrdk9TUy64+mVSUcRio+E3KkArlkGRH q4mojl2vqqBJWxaDX7vN6zDm6SW+cJsXWbh5ndsmH7EpCRYeFZUhO6lceQFZyUlHAT0HqdPC27oWz mJg4ChyEFxMjQ81BqHjw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qBaDr-00BDKo-1n; Tue, 20 Jun 2023 12:12:35 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qBaDV-00BDA2-1D; Tue, 20 Jun 2023 12:12:15 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id F2F9C1F38A; Tue, 20 Jun 2023 12:12:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1687263125; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M0StLaEV9t2bJwgKygVMZYw7cxkeD85gCdMq65G977o=; b=Ay//wprv7O21AW5J+hlW74XI+t4LeXz4puYQl0kA1RdHz4cZfFxdViDgWGebwqy/de+ezG E3gsuXCa+aWbYTQeWm5tDxXuC30xORNcizHZ/ekF8ho/kZcGYtJMXDiAx0ddhncHPeKiLV MQuKDYJzlh7d0Q7jUPIG3qMyNhd8n9Y= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1687263125; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M0StLaEV9t2bJwgKygVMZYw7cxkeD85gCdMq65G977o=; b=3lwNBgmHAodF4AoGrOwavr97ZrO5qBME48sSYQJas4o7FYoiQndEDUaTNbxv13+NfLvczG /wAgcgYsjHou0CCg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B14DF139C7; Tue, 20 Jun 2023 12:12:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id YLBbKpSXkWSwEQAAMHmgww (envelope-from ); Tue, 20 Jun 2023 12:12:04 +0000 From: Thomas Zimmermann To: maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, laurent.pinchart@ideasonboard.com, kieran.bingham+renesas@ideasonboard.com, hjc@rock-chips.com, heiko@sntech.de Cc: dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Thomas Zimmermann Subject: [PATCH 1/3] drm/rcar-du: Import buffers with GEM DMA's helpers Date: Tue, 20 Jun 2023 14:03:21 +0200 Message-ID: <20230620121202.28263-2-tzimmermann@suse.de> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230620121202.28263-1-tzimmermann@suse.de> References: <20230620121202.28263-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230620_051213_562531_308B78EB X-CRM114-Status: GOOD ( 13.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Call __drm_gem_dma_create() to create an object for imported buffers, instead of reimplementing the function within the driver. Reduces code duplication and will later allow to un-export a number of symbols from the GEM DMA helpers. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/drm_gem_dma_helper.c | 5 +-- drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c | 33 +++---------------- include/drm/drm_gem_dma_helper.h | 3 ++ 3 files changed, 10 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/drm_gem_dma_helper.c b/drivers/gpu/drm/drm_gem_dma_helper.c index 870b90b78bc4e..e9aa3ac140654 100644 --- a/drivers/gpu/drm/drm_gem_dma_helper.c +++ b/drivers/gpu/drm/drm_gem_dma_helper.c @@ -67,8 +67,8 @@ static const struct drm_gem_object_funcs drm_gem_dma_default_funcs = { * A struct drm_gem_dma_object * on success or an ERR_PTR()-encoded negative * error code on failure. */ -static struct drm_gem_dma_object * -__drm_gem_dma_create(struct drm_device *drm, size_t size, bool private) +struct drm_gem_dma_object *__drm_gem_dma_create(struct drm_device *drm, + size_t size, bool private) { struct drm_gem_dma_object *dma_obj; struct drm_gem_object *gem_obj; @@ -112,6 +112,7 @@ __drm_gem_dma_create(struct drm_device *drm, size_t size, bool private) kfree(dma_obj); return ERR_PTR(ret); } +EXPORT_SYMBOL_GPL(__drm_gem_dma_create); /** * drm_gem_dma_create - allocate an object with the given size diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c index adfb36b0e8154..ea7487e270f13 100644 --- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c @@ -356,49 +356,24 @@ const struct rcar_du_format_info *rcar_du_format_info(u32 fourcc) * Frame buffer */ -static const struct drm_gem_object_funcs rcar_du_gem_funcs = { - .free = drm_gem_dma_object_free, - .print_info = drm_gem_dma_object_print_info, - .get_sg_table = drm_gem_dma_object_get_sg_table, - .vmap = drm_gem_dma_object_vmap, - .mmap = drm_gem_dma_object_mmap, - .vm_ops = &drm_gem_dma_vm_ops, -}; - struct drm_gem_object *rcar_du_gem_prime_import_sg_table(struct drm_device *dev, struct dma_buf_attachment *attach, struct sg_table *sgt) { struct rcar_du_device *rcdu = to_rcar_du_device(dev); struct drm_gem_dma_object *dma_obj; - struct drm_gem_object *gem_obj; - int ret; if (!rcar_du_has(rcdu, RCAR_DU_FEATURE_VSP1_SOURCE)) return drm_gem_dma_prime_import_sg_table(dev, attach, sgt); - /* Create a DMA GEM buffer. */ - dma_obj = kzalloc(sizeof(*dma_obj), GFP_KERNEL); - if (!dma_obj) - return ERR_PTR(-ENOMEM); - - gem_obj = &dma_obj->base; - gem_obj->funcs = &rcar_du_gem_funcs; - - drm_gem_private_object_init(dev, gem_obj, attach->dmabuf->size); - dma_obj->map_noncoherent = false; - - ret = drm_gem_create_mmap_offset(gem_obj); - if (ret) { - drm_gem_object_release(gem_obj); - kfree(dma_obj); - return ERR_PTR(ret); - } + dma_obj = __drm_gem_dma_create(dev, attach->dmabuf->size, true); + if (IS_ERR(dma_obj)) + return ERR_CAST(dma_obj); dma_obj->dma_addr = 0; dma_obj->sgt = sgt; - return gem_obj; + return &dma_obj->base; } int rcar_du_dumb_create(struct drm_file *file, struct drm_device *dev, diff --git a/include/drm/drm_gem_dma_helper.h b/include/drm/drm_gem_dma_helper.h index 61da596780b64..3877cbf0e927c 100644 --- a/include/drm/drm_gem_dma_helper.h +++ b/include/drm/drm_gem_dma_helper.h @@ -32,6 +32,9 @@ struct drm_gem_dma_object { #define to_drm_gem_dma_obj(gem_obj) \ container_of(gem_obj, struct drm_gem_dma_object, base) +struct drm_gem_dma_object *__drm_gem_dma_create(struct drm_device *drm, + size_t size, bool private); + struct drm_gem_dma_object *drm_gem_dma_create(struct drm_device *drm, size_t size); void drm_gem_dma_free(struct drm_gem_dma_object *dma_obj); From patchwork Tue Jun 20 12:03:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13285764 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1DE52EB64D8 for ; Tue, 20 Jun 2023 12:12:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=c6qrZRIZN+h+NCtWB/HXUS4/ykY6GCuTRlC7BiA6oVM=; b=JOfVgzSO46yifd lRet2fPBMnpT6SJWr6agREq2UJgSJKSD3NTjZbvk418HPRSi54Sj8WQ8tzZxV9alohkY3Xi+xDdap 8/XLRlFfHiyawbr9gCQ+JV5B+ZjmvLawcahoyMxYsaZQcPAhFmncxs6cQciU4y/rsnS/chHypq14a MOmxMrhRib0l7cFaAYFx9dC1DLbUunZwTwEXOZnAOqkqdoS5H96bHwGVY4Ceb/3t0QSCsGOJFKpkZ ZENllM3dvu4E1B5DOHMYpMDa2cjGpu/35I1J1U7ciA/GdqdogEUeHrp7SR04JwNzgrcTGl5Wgcxqf 1GfdpM7BKmpSk8PMV2fA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qBaDX-00BDCm-2Q; Tue, 20 Jun 2023 12:12:15 +0000 Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qBaDU-00BD9z-2B; Tue, 20 Jun 2023 12:12:14 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 474801F37C; Tue, 20 Jun 2023 12:12:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1687263125; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r6XkXAfdTUAGyLfwxszMC+bPXZ6kElStSDtG0UQxN1E=; b=A6beC6BVgirwu2Nw6CAZoiZ+VtfjqlphCPYhDWtl086Q2zysAjHpUJR52bxGml3sE/LPtP fC/Q9d8KdGkR4PrsuycQq34ZK9WEf24S6Glm5hnKGjNKK2tBclijN2Ro50jfnloE7G/SFp 4GZSglu94+iYKv4/Pr6MJBbr5gXwMI4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1687263125; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r6XkXAfdTUAGyLfwxszMC+bPXZ6kElStSDtG0UQxN1E=; b=ddLksiyxF2xqH1d02sVvi1XsKFHI/V32xC1Bne50Xs5i2I3cUnMz8dHj0IMYK3dvKj+7X8 be2p7SWOimda1cAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 04C8B133A9; Tue, 20 Jun 2023 12:12:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id IFqQO5SXkWSwEQAAMHmgww (envelope-from ); Tue, 20 Jun 2023 12:12:04 +0000 From: Thomas Zimmermann To: maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, laurent.pinchart@ideasonboard.com, kieran.bingham+renesas@ideasonboard.com, hjc@rock-chips.com, heiko@sntech.de Cc: dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Thomas Zimmermann Subject: [PATCH 2/3] drm/rockchip: Resolve dependency in GEM DMA helpers Date: Tue, 20 Jun 2023 14:03:22 +0200 Message-ID: <20230620121202.28263-3-tzimmermann@suse.de> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230620121202.28263-1-tzimmermann@suse.de> References: <20230620121202.28263-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230620_051212_863602_5559FB8E X-CRM114-Status: GOOD ( 14.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Remove the dependency on the GEM DMA helper library. Rockchip comes with its own implementation of the GEM interface. It only uses the VM callbacks in drm_gem_dma_vm_ops from the GEM DMA helpers. These are not DMA specific. Duplicate drm_gem_dma_vm_ops in rockchip and remove all dependencies on the GEM DMA helper library. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/rockchip/Kconfig | 1 - drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 8 ++++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/rockchip/Kconfig b/drivers/gpu/drm/rockchip/Kconfig index 1bf3e2829cd07..5f49cd0210e6b 100644 --- a/drivers/gpu/drm/rockchip/Kconfig +++ b/drivers/gpu/drm/rockchip/Kconfig @@ -2,7 +2,6 @@ config DRM_ROCKCHIP tristate "DRM Support for Rockchip" depends on DRM && ROCKCHIP_IOMMU - select DRM_GEM_DMA_HELPER select DRM_KMS_HELPER select DRM_PANEL select VIDEOMODE_HELPERS diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index b8cf89f0cc566..b090b8abb6637 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c index b8f8b45ebf594..acb6f122a2dca 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c @@ -11,13 +11,17 @@ #include #include #include -#include #include #include #include "rockchip_drm_drv.h" #include "rockchip_drm_gem.h" +static const struct vm_operations_struct rockchip_gem_vm_ops = { + .open = drm_gem_vm_open, + .close = drm_gem_vm_close, +}; + static int rockchip_gem_iommu_map(struct rockchip_gem_object *rk_obj) { struct drm_device *drm = rk_obj->base.dev; @@ -276,7 +280,7 @@ static const struct drm_gem_object_funcs rockchip_gem_object_funcs = { .vmap = rockchip_gem_prime_vmap, .vunmap = rockchip_gem_prime_vunmap, .mmap = rockchip_drm_gem_object_mmap, - .vm_ops = &drm_gem_dma_vm_ops, + .vm_ops = &rockchip_gem_vm_ops, }; static struct rockchip_gem_object * From patchwork Tue Jun 20 12:03:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13285766 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E3200EB64D7 for ; Tue, 20 Jun 2023 12:12:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fKgz0qOblHpBuBsc0Aoy6MMt4JbuEJkjyaP0AGzxg8g=; b=p6OV+ouoajQh6Y zMAnXQdlKz4fY5G75jGJ8JF/XuLqzvz4yDBIjDCCEL1nXrB2mDw53CuVcFZF/EaU2uLLOsGA2+qgo ReXMJX4ag6CQkvDFh2ne8aLnGMCy75R+MF6DXpFLS+asJ4AyC6U+uSshqcI/cCj/WJ43WoGlgQi3H 55aX/bi8LH7xhuNKb10OjFTg2g9+pTtZS4oO2X0zkXiCYVgRyRcpWxwnsEjiX2HdS+o78UJhuF5xP bytnpRTA8f7IUqXRH2kJqA6xmfYIFTUx19xRuIfCOrehj8ZoG4P5FB/u7nLaPZRle+L3ynlanjOig N6mKu0R0rGEElsGXMHaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qBaDk-00BDHy-1J; Tue, 20 Jun 2023 12:12:28 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qBaDV-00BDA0-1D; Tue, 20 Jun 2023 12:12:15 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 91E14218BB; Tue, 20 Jun 2023 12:12:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1687263125; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q0Y3PkLzO5C8O1e77DfS9r0CpVVFDaovCyRftFBwQK4=; b=t4mWsyIr3KeqwKvkcKjmqVYgZPiZjuGzbQ30wGX0U6y0Mg+nJbJ1A0OMGsw9rMN/xowWSd jAMt17ppzl1lgAQkD7BVvQNm2udXaR3s/yapd1PkHcIUVmV8y0cqvXZzzKGAzoPCXVZPQo DYLl5nwalG6Ss8XGnw+3Cz1XusSl7T0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1687263125; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q0Y3PkLzO5C8O1e77DfS9r0CpVVFDaovCyRftFBwQK4=; b=/fMlEQ84LVNetCmTd7ax38tUic15tIua892kh7iGlH0yQS8rLGCuQah4f7YWmPjAFv/8ic CQ/P4xPMLPgsAvBQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 4CEEC133A9; Tue, 20 Jun 2023 12:12:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id cC+QEZWXkWSwEQAAMHmgww (envelope-from ); Tue, 20 Jun 2023 12:12:05 +0000 From: Thomas Zimmermann To: maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, laurent.pinchart@ideasonboard.com, kieran.bingham+renesas@ideasonboard.com, hjc@rock-chips.com, heiko@sntech.de Cc: dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Thomas Zimmermann Subject: [PATCH 3/3] drm/gem-dma: Unexport drm_gem_dma_vm_ops Date: Tue, 20 Jun 2023 14:03:23 +0200 Message-ID: <20230620121202.28263-4-tzimmermann@suse.de> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230620121202.28263-1-tzimmermann@suse.de> References: <20230620121202.28263-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230620_051213_560931_3F91C4A1 X-CRM114-Status: GOOD ( 10.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org There are no external users of drm_gem_dma_vm_ops. Unexport the symbol. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/drm_gem_dma_helper.c | 11 +++++------ include/drm/drm_gem_dma_helper.h | 2 -- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/drm_gem_dma_helper.c b/drivers/gpu/drm/drm_gem_dma_helper.c index e9aa3ac140654..d8a415c3d156c 100644 --- a/drivers/gpu/drm/drm_gem_dma_helper.c +++ b/drivers/gpu/drm/drm_gem_dma_helper.c @@ -45,6 +45,11 @@ * drm_gem_dma_vmap()). These helpers perform the necessary type conversion. */ +static const struct vm_operations_struct drm_gem_dma_vm_ops = { + .open = drm_gem_vm_open, + .close = drm_gem_vm_close, +}; + static const struct drm_gem_object_funcs drm_gem_dma_default_funcs = { .free = drm_gem_dma_object_free, .print_info = drm_gem_dma_object_print_info, @@ -315,12 +320,6 @@ int drm_gem_dma_dumb_create(struct drm_file *file_priv, } EXPORT_SYMBOL_GPL(drm_gem_dma_dumb_create); -const struct vm_operations_struct drm_gem_dma_vm_ops = { - .open = drm_gem_vm_open, - .close = drm_gem_vm_close, -}; -EXPORT_SYMBOL_GPL(drm_gem_dma_vm_ops); - #ifndef CONFIG_MMU /** * drm_gem_dma_get_unmapped_area - propose address for mapping in noMMU cases diff --git a/include/drm/drm_gem_dma_helper.h b/include/drm/drm_gem_dma_helper.h index 3877cbf0e927c..88a810f954fce 100644 --- a/include/drm/drm_gem_dma_helper.h +++ b/include/drm/drm_gem_dma_helper.h @@ -45,8 +45,6 @@ int drm_gem_dma_vmap(struct drm_gem_dma_object *dma_obj, struct iosys_map *map); int drm_gem_dma_mmap(struct drm_gem_dma_object *dma_obj, struct vm_area_struct *vma); -extern const struct vm_operations_struct drm_gem_dma_vm_ops; - /* * GEM object functions */