From patchwork Tue Mar 29 23:00:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 555023 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2131C433EF for ; Tue, 29 Mar 2022 23:00:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238637AbiC2XCC (ORCPT ); Tue, 29 Mar 2022 19:02:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238775AbiC2XCC (ORCPT ); Tue, 29 Mar 2022 19:02:02 -0400 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4EB24993B; Tue, 29 Mar 2022 16:00:18 -0700 (PDT) Received: by mail-pg1-x535.google.com with SMTP id z128so16029529pgz.2; Tue, 29 Mar 2022 16:00:18 -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=HO6I2POm0u4zmwdpBLxU6r8WEEIUM7eXGwS51/lbXgI=; b=kEg96PXe7kAMjNNH7hBJWDHdNlDN5mHc9bWx0I2xN9o+wbqkHmapOpDlZDNsc7e33w b2ogxdGajq4JEeGf2XoHa0UH6Zye9U7yOnXOJdt1HYeNs0hI7EPgu9HY4VdHqZuzFxob ofmEXNN5JZBCEEFahP2Jy6ka5N0x+mKrnVWQeDHi8EtLGOozvKtMXF9Ho4FKcMKfeJJk QENhX0mFmBhlXpIHk0UBsVadlH0n7C8ubUm9rj0PvooeXSIV+0jfUlWzfobnMDYBzUUe jb9bxnly6PW5Y0vL6VMZtWS7eAPCvxlYUO5sLPiVgVDoI5dd5XtFSFYKuT0/L5WFQkzn Wmtg== 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=HO6I2POm0u4zmwdpBLxU6r8WEEIUM7eXGwS51/lbXgI=; b=mbGlUFOiJ+fodg7sDUK5Pur9URDP4NaFKIJaVlw+ZKDqwn+ssz7lLedoM2gRZPWLYn pYV0zGhiAJPnESnhJodoItGAg9A8LC7ZVBK0XliqQOnBFjgDlA8rWLG+cqpgo5FUnZer FkAEJLjV4pNEVtNjiUzU/z9XGcVAdfrapiYJZ6trDm3w3H+LTEAr5JtjKMucOODM1Syc JcYfMe7umtZzNz1qZp+zo+jtPnMEYU31eOtZGWRLo6ZxV5STarFwueCX9qmOp4g5efDA lNCUYswhY6uWatA+rZe8SxkCFlL+EpP3s8yST4HG59o9v/gRcABCChY9SVZSXSEd5hNG zR5g== X-Gm-Message-State: AOAM533NTxYw5/iLVgaEK7yTsYEtQRiAFzlyTOBI+EvCdf+UUncObFT0 zg+I4GrHDhYFpjYcmjOJVV0= X-Google-Smtp-Source: ABdhPJz/VyzhfFtTmkbZ9ttUTwWM3Qh9cRS9VCNwxkdTgpEnA9rzY4JZBVLnGdiNnF8Kk/BmZk4/AA== X-Received: by 2002:a63:b20a:0:b0:398:9e3e:d581 with SMTP id x10-20020a63b20a000000b003989e3ed581mr1694271pge.236.1648594818129; Tue, 29 Mar 2022 16:00:18 -0700 (PDT) Received: from localhost ([2a00:79e1:abd:4a00:2703:3c72:eb1a:cffd]) by smtp.gmail.com with ESMTPSA id u18-20020a056a00125200b004fb112ee9b7sm15742821pfi.75.2022.03.29.16.00.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Mar 2022 16:00:17 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, Rob Clark , Rob Clark , Sean Paul , Abhinav Kumar , David Airlie , Daniel Vetter , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/9] drm/msm/gem: Move prototypes Date: Tue, 29 Mar 2022 16:00:49 -0700 Message-Id: <20220329230105.601666-2-robdclark@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220329230105.601666-1-robdclark@gmail.com> References: <20220329230105.601666-1-robdclark@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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 9f68aa685ed7..daf60d219463 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;