From patchwork Mon Apr 11 21:58:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 12809689 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E47A7C433EF for ; Mon, 11 Apr 2022 21:58:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D237F10E0C9; Mon, 11 Apr 2022 21:58:15 +0000 (UTC) Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3E98210E2B3; Mon, 11 Apr 2022 21:58:13 +0000 (UTC) Received: by mail-pl1-x633.google.com with SMTP id t12so2672487pll.7; Mon, 11 Apr 2022 14:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4TY916nBD4Ut+Nhr5Owf/4x969nS99vGSEISx8LykC4=; b=kyNzCdHMJPcd4hJH7AQc8Gpz/MclC6AHAJiehCgiLNxFCGInpWCNyvJKKgbo0VhBnx 0FGig+BWvOL8Qc0awyjk4qxqrN5estwjOH52K5TK03SHa6GLF0HqKqtLu3GDr46JCnJj uqX6TSwOEAihCeAa/botKWD1Wxur5GMb1eo45AFIhE4TMblBF36IDamY2jkxhm0gotrd CND4IY0T8bMa/Jp7WUhtRfynXUb+uXRlPG3kQRtkFtG2gnSF5GgT60+IvryXDfllqu52 MieIK71wc9e2qxO/VOtYVn18jpuh8ACsALXEqtLoQpk9aVzTrdb0UJN5sS7iDIX3SwGH sY8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4TY916nBD4Ut+Nhr5Owf/4x969nS99vGSEISx8LykC4=; b=ZZoAT+d026lHmRpOzryYrfyNzh4KGw+y6smJsz3CjcsrBBYrXvJ/EGZfgCBKoC88yh 4raX0IaOWNTKaxPMoPVxTno4EQOEdZt6smqIZRnmx1smK4V74CvWVP8bUC55TaaDoZwk zZK0qHPuCB3kZH+cSKmpnUegLS4A5iEL0cxLBfpERCQg2wmBh5vYhNrU/Q7AF911ZdGA WxJauWScLvmZR7Rey6fy1/zk4Cqi6Oj9JzvqXqW0RzVZesxJkruoMpk0v2DXjXqIkJvr xaTU8CFOV102ZtirCGIaoXrMzQywcHxF/yPDsE6OurZ9xY4a5tRmsif1cvXp9AAMlaxf ZSeQ== X-Gm-Message-State: AOAM531h2w0baLv0/cKUZ5Chx0Xul6/XPvP/5XBic4yuPWC6DOl26vve a16R6Y2Jhnm3sWHq+pHAiEEiQcQ8bzc= X-Google-Smtp-Source: ABdhPJxrOIZtbvK9nXOtwQ0+1ehpWH4ePlZ075+QwJVaP0bMMgI3AWmB3e2Dpu8t6E4F7cqQK1Q3+Q== X-Received: by 2002:a17:90b:4b01:b0:1cb:a81a:dc4c with SMTP id lx1-20020a17090b4b0100b001cba81adc4cmr1350348pjb.193.1649714292224; Mon, 11 Apr 2022 14:58:12 -0700 (PDT) Received: from localhost ([2a00:79e1:abd:4a00:2703:3c72:eb1a:cffd]) by smtp.gmail.com with ESMTPSA id kx3-20020a17090b228300b001cb7ed57660sm419261pjb.52.2022.04.11.14.58.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Apr 2022 14:58:11 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [PATCH v4 01/10] drm/msm/gem: Move prototypes Date: Mon, 11 Apr 2022 14:58:30 -0700 Message-Id: <20220411215849.297838-2-robdclark@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411215849.297838-1-robdclark@gmail.com> References: <20220411215849.297838-1-robdclark@gmail.com> 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: Rob Clark , David Airlie , linux-arm-msm@vger.kernel.org, Abhinav Kumar , open list , Sean Paul , Dmitry Osipenko , Dmitry Baryshkov , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Rob Clark These belong more cleanly in the gem header. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_drv.h | 23 ----------------------- drivers/gpu/drm/msm/msm_gem.h | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h index d661debb50f1..000fe649a0ab 100644 --- a/drivers/gpu/drm/msm/msm_drv.h +++ b/drivers/gpu/drm/msm/msm_drv.h @@ -250,29 +250,6 @@ void msm_atomic_state_free(struct drm_atomic_state *state); int msm_crtc_enable_vblank(struct drm_crtc *crtc); void msm_crtc_disable_vblank(struct drm_crtc *crtc); -int msm_gem_init_vma(struct msm_gem_address_space *aspace, - struct msm_gem_vma *vma, int npages, - u64 range_start, u64 range_end); -void msm_gem_purge_vma(struct msm_gem_address_space *aspace, - struct msm_gem_vma *vma); -void msm_gem_unmap_vma(struct msm_gem_address_space *aspace, - struct msm_gem_vma *vma); -int msm_gem_map_vma(struct msm_gem_address_space *aspace, - struct msm_gem_vma *vma, int prot, - struct sg_table *sgt, int npages); -void msm_gem_close_vma(struct msm_gem_address_space *aspace, - struct msm_gem_vma *vma); - - -struct msm_gem_address_space * -msm_gem_address_space_get(struct msm_gem_address_space *aspace); - -void msm_gem_address_space_put(struct msm_gem_address_space *aspace); - -struct msm_gem_address_space * -msm_gem_address_space_create(struct msm_mmu *mmu, const char *name, - u64 va_start, u64 size); - int msm_register_mmu(struct drm_device *dev, struct msm_mmu *mmu); void msm_unregister_mmu(struct drm_device *dev, struct msm_mmu *mmu); diff --git a/drivers/gpu/drm/msm/msm_gem.h b/drivers/gpu/drm/msm/msm_gem.h index 58e11c282928..947ff7d9b471 100644 --- a/drivers/gpu/drm/msm/msm_gem.h +++ b/drivers/gpu/drm/msm/msm_gem.h @@ -40,6 +40,15 @@ struct msm_gem_address_space { int faults; }; +struct msm_gem_address_space * +msm_gem_address_space_get(struct msm_gem_address_space *aspace); + +void msm_gem_address_space_put(struct msm_gem_address_space *aspace); + +struct msm_gem_address_space * +msm_gem_address_space_create(struct msm_mmu *mmu, const char *name, + u64 va_start, u64 size); + struct msm_gem_vma { struct drm_mm_node node; uint64_t iova; @@ -49,6 +58,19 @@ struct msm_gem_vma { int inuse; }; +int msm_gem_init_vma(struct msm_gem_address_space *aspace, + struct msm_gem_vma *vma, int npages, + u64 range_start, u64 range_end); +void msm_gem_purge_vma(struct msm_gem_address_space *aspace, + struct msm_gem_vma *vma); +void msm_gem_unmap_vma(struct msm_gem_address_space *aspace, + struct msm_gem_vma *vma); +int msm_gem_map_vma(struct msm_gem_address_space *aspace, + struct msm_gem_vma *vma, int prot, + struct sg_table *sgt, int npages); +void msm_gem_close_vma(struct msm_gem_address_space *aspace, + struct msm_gem_vma *vma); + struct msm_gem_object { struct drm_gem_object base;