From patchwork Wed Oct 31 17:05:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jordan Crouse X-Patchwork-Id: 10662967 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BD96814BD for ; Wed, 31 Oct 2018 17:05:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADE462872E for ; Wed, 31 Oct 2018 17:05:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A17D92B37A; Wed, 31 Oct 2018 17:05:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D5352872E for ; Wed, 31 Oct 2018 17:05:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729623AbeKACEu (ORCPT ); Wed, 31 Oct 2018 22:04:50 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:42834 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729425AbeKACEu (ORCPT ); Wed, 31 Oct 2018 22:04:50 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D66B76076A; Wed, 31 Oct 2018 17:05:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1541005557; bh=wdO4kn4WxJVvifv0SOG8WiCIJoF9abToearU+lghIYs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SQOY/7SXEXJMuMdq0vDBaLbq144RzhryFmwSSk9EHTfh841DrtbX0L1C09+UESsSg tUHl/KbZSJTZgeSdWKOCEcTf88ejiArIGhvpsaj/bqY7f4L3t8x2uI+O/WsG0tBJno QcQfHSa52J8pl8BJMVWgEUT+vvc7XUlo8d6/UqcE= Received: from jcrouse-lnx.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jcrouse@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0C9356019F; Wed, 31 Oct 2018 17:05:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1541005557; bh=wdO4kn4WxJVvifv0SOG8WiCIJoF9abToearU+lghIYs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SQOY/7SXEXJMuMdq0vDBaLbq144RzhryFmwSSk9EHTfh841DrtbX0L1C09+UESsSg tUHl/KbZSJTZgeSdWKOCEcTf88ejiArIGhvpsaj/bqY7f4L3t8x2uI+O/WsG0tBJno QcQfHSa52J8pl8BJMVWgEUT+vvc7XUlo8d6/UqcE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0C9356019F Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=jcrouse@codeaurora.org From: Jordan Crouse To: freedreno@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, hoegsberg@chromium.org, linux-arm-msm@vger.kernel.org Subject: [PATCH 2/6] drm/msm: Remove sgt from the mmu unmap function Date: Wed, 31 Oct 2018 11:05:48 -0600 Message-Id: <20181031170552.32542-3-jcrouse@codeaurora.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181031170552.32542-1-jcrouse@codeaurora.org> References: <20181031170552.32542-1-jcrouse@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The scatter gather table doesn't need to be passed in for the MMU unmap function. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_drv.h | 2 +- drivers/gpu/drm/msm/msm_gem.c | 2 +- drivers/gpu/drm/msm/msm_gem_vma.c | 4 ++-- drivers/gpu/drm/msm/msm_iommu.c | 3 +-- drivers/gpu/drm/msm/msm_mmu.h | 3 +-- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h index 3225f8fbd8c9..3a0f2119127b 100644 --- a/drivers/gpu/drm/msm/msm_drv.h +++ b/drivers/gpu/drm/msm/msm_drv.h @@ -242,7 +242,7 @@ void msm_atomic_state_clear(struct drm_atomic_state *state); void msm_atomic_state_free(struct drm_atomic_state *state); void msm_gem_unmap_vma(struct msm_gem_address_space *aspace, - struct msm_gem_vma *vma, struct sg_table *sgt); + struct msm_gem_vma *vma); int msm_gem_map_vma(struct msm_gem_address_space *aspace, struct msm_gem_vma *vma, struct sg_table *sgt, int npages); diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index 855f5721a14e..ff75e557b708 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c @@ -352,7 +352,7 @@ put_iova(struct drm_gem_object *obj) WARN_ON(!mutex_is_locked(&msm_obj->lock)); list_for_each_entry_safe(vma, tmp, &msm_obj->vmas, list) { - msm_gem_unmap_vma(vma->aspace, vma, msm_obj->sgt); + msm_gem_unmap_vma(vma->aspace, vma); del_vma(vma); } } diff --git a/drivers/gpu/drm/msm/msm_gem_vma.c b/drivers/gpu/drm/msm/msm_gem_vma.c index ffbec224551b..704ae7e69500 100644 --- a/drivers/gpu/drm/msm/msm_gem_vma.c +++ b/drivers/gpu/drm/msm/msm_gem_vma.c @@ -40,14 +40,14 @@ void msm_gem_address_space_put(struct msm_gem_address_space *aspace) void msm_gem_unmap_vma(struct msm_gem_address_space *aspace, - struct msm_gem_vma *vma, struct sg_table *sgt) + struct msm_gem_vma *vma) { if (!aspace || !vma->iova) return; if (aspace->mmu) { unsigned size = vma->node.size << PAGE_SHIFT; - aspace->mmu->funcs->unmap(aspace->mmu, vma->iova, sgt, size); + aspace->mmu->funcs->unmap(aspace->mmu, vma->iova, size); } spin_lock(&aspace->lock); diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/drivers/gpu/drm/msm/msm_iommu.c index b23d33622f37..9c313cb129ee 100644 --- a/drivers/gpu/drm/msm/msm_iommu.c +++ b/drivers/gpu/drm/msm/msm_iommu.c @@ -71,8 +71,7 @@ static int msm_iommu_map(struct msm_mmu *mmu, uint64_t iova, return (ret == len) ? 0 : -EINVAL; } -static int msm_iommu_unmap(struct msm_mmu *mmu, uint64_t iova, - struct sg_table *sgt, unsigned len) +static int msm_iommu_unmap(struct msm_mmu *mmu, uint64_t iova, unsigned len) { struct msm_iommu *iommu = to_msm_iommu(mmu); diff --git a/drivers/gpu/drm/msm/msm_mmu.h b/drivers/gpu/drm/msm/msm_mmu.h index aa2c5d4580c8..94c0b83d8026 100644 --- a/drivers/gpu/drm/msm/msm_mmu.h +++ b/drivers/gpu/drm/msm/msm_mmu.h @@ -25,8 +25,7 @@ struct msm_mmu_funcs { void (*detach)(struct msm_mmu *mmu, const char * const *names, int cnt); int (*map)(struct msm_mmu *mmu, uint64_t iova, struct sg_table *sgt, unsigned len, int prot); - int (*unmap)(struct msm_mmu *mmu, uint64_t iova, struct sg_table *sgt, - unsigned len); + int (*unmap)(struct msm_mmu *mmu, uint64_t iova, unsigned len); void (*destroy)(struct msm_mmu *mmu); };