Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1529878rdb; Wed, 20 Sep 2023 11:38:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGU8ZJfIZx3WpNeDt9VM8KOQu53QwyfsB8H0pBYmaHJyJUtjkT/Ae6tj+mCtU2FuPbYysqV X-Received: by 2002:a05:6a21:1f1d:b0:14d:cca3:a100 with SMTP id ry29-20020a056a211f1d00b0014dcca3a100mr3010251pzb.36.1695235135615; Wed, 20 Sep 2023 11:38:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695235135; cv=none; d=google.com; s=arc-20160816; b=XQmuCHPAIjxGxXUQCK0bdR2zCi6v2GoWldof3IOyZryN7y//hCGrpkjbhq9jHHtjK2 e8LWF10a67DLk5oEcrBRrSOS1qINLfUPYoPyx9/9v1tt0iXPrKoJwBNeb6Nwg+ykmGbk eG821KKWRqho8TPRs19lf/OTlpDnzV4cduzxGM+Hl2Qdplg4l3iNJl2TEoiKJPjD0boP Lb/ZB6HIzxedZBoQD79Ptm4EqcpAy9hBnfYVamHNPVWWLfcHkbKAIPKgzCfTyxIDOn17 CfJcX9SrOPTug4EyBxkGbk9+luWyY0pGq5RLXbtoRStn1UewBrbeFMWDrqHCaV6hpS+4 R4TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=teKSA/CYnBKR/nhHsoNvbfNEz6ctyEw/xwjCLcFoikc=; fh=dwkrUexBTyIzqDIYfr1juzyRJB3CVRterGzuZbbJmkY=; b=bo1jxrL1hHuNQV1P3/7ES76BtYwFWq/KTHdePVEHBKjgC680iezOb1gQWbWvp5StJT UDhzQyvDg1gLlvwz1HKGTaQ4TLi1dm6aC9ZhkeBX34ZfLTHftPwf+Jzk/ttLFPCu2Jwy bwwUsePNdhlduF2kIGDz+L56f9Ue5ruWQW2l3MNAD3A9wtiT2LQK8Md2SUx5J0rJCWNx I7SZyiSz1wEmI6xZf40POzJ1QoPL2QeoWZleVqhAYLspPOtmYMFWHyyvnxNZOJX1133c 6eR93RbUNl+I1N0DdHAG4syBZC0ID/Kf+BNoUIFa5oDJf+RohpP/xMSLhjvAqk+1dE/2 ZWfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Lm+bisNv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id d18-20020a056a00199200b0068fcc67e73asi12663745pfl.18.2023.09.20.11.38.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 11:38:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Lm+bisNv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id AD27781BB09E; Wed, 20 Sep 2023 07:45:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235153AbjITOpe (ORCPT + 99 others); Wed, 20 Sep 2023 10:45:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236384AbjITOou (ORCPT ); Wed, 20 Sep 2023 10:44:50 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A37ADC for ; Wed, 20 Sep 2023 07:44:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695221039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=teKSA/CYnBKR/nhHsoNvbfNEz6ctyEw/xwjCLcFoikc=; b=Lm+bisNvslbCwcn8Graz9dNFoF6Y7TDsiC/1fWZdfU2JwnsPBPKAv2Eav8FC7E+0IBSkor BoSovd7kQ8FUS3HadKWf5MeZrJYXFCItI0ihKEFSnezxs8pRRfBNw4Ccr43FzkxD4mI8mB GHCyutwWYv5rXv+EPjPoux2IIRQKd3k= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-627-wp7ed_lFM1ey-E_Yvm0Zug-1; Wed, 20 Sep 2023 10:43:58 -0400 X-MC-Unique: wp7ed_lFM1ey-E_Yvm0Zug-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-9a9f282713fso503070566b.3 for ; Wed, 20 Sep 2023 07:43:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695221037; x=1695825837; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=teKSA/CYnBKR/nhHsoNvbfNEz6ctyEw/xwjCLcFoikc=; b=l3l7rIOMfxgo5EdRMb+7BSFrSk9xgVvZVGj5TPmVk1gcNoXVXmhZIp80XqVsXuV3C6 GuE/lSS7MKwH866Y/V8SPclHrrL+brUI1HjvMWyrmyEMiZlaz579116TRHjXB/+ydjVa DiYyL0hREqUvunnkxjV+l9Co5I5aDPfdp2ts47JoBOtCJGnbVuRAT4x3fbD0tmv0D1tb rX0CEuuQuzg3f7nvk+pXZzglXheItMy/S0sCWfSJaRfqvvBICK/Xcuq8cqVgtzzvzk+w 2DQOCTRCnwot9KDneRvRDI+fEoqrUAkwzvV0CUAqQckauemAahp02uVZxfQS7etneiY5 SBFQ== X-Gm-Message-State: AOJu0YyQjfm+9KQ9W8ONghPJBa8JdFuK4qX3CBAYfhNV6mqMkserl9Wx 88VLH8TBsVb5jS84cGYy4RXtEiTjBUjxgc6OVkzBRYFyL45JK7QYeEkiySC4gbp2e05N3X7DrZ8 c8M5Em2zYchNt0M/ZCICy6TV+ X-Received: by 2002:a17:907:75f8:b0:9ae:381a:6c55 with SMTP id jz24-20020a17090775f800b009ae381a6c55mr2155906ejc.15.1695221036914; Wed, 20 Sep 2023 07:43:56 -0700 (PDT) X-Received: by 2002:a17:907:75f8:b0:9ae:381a:6c55 with SMTP id jz24-20020a17090775f800b009ae381a6c55mr2155893ejc.15.1695221036661; Wed, 20 Sep 2023 07:43:56 -0700 (PDT) Received: from cassiopeiae.. ([2a02:810d:4b3f:de9c:642:1aff:fe31:a19f]) by smtp.gmail.com with ESMTPSA id e10-20020a170906248a00b00993928e4d1bsm9337658ejb.24.2023.09.20.07.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 07:43:56 -0700 (PDT) From: Danilo Krummrich To: airlied@gmail.com, daniel@ffwll.ch, matthew.brost@intel.com, thomas.hellstrom@linux.intel.com, sarah.walker@imgtec.com, donald.robson@imgtec.com, boris.brezillon@collabora.com, christian.koenig@amd.com, faith.ekstrand@collabora.com Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, Danilo Krummrich Subject: [PATCH drm-misc-next v4 2/8] drm/gpuvm: allow building as module Date: Wed, 20 Sep 2023 16:42:35 +0200 Message-ID: <20230920144343.64830-3-dakr@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230920144343.64830-1-dakr@redhat.com> References: <20230920144343.64830-1-dakr@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 20 Sep 2023 07:45:46 -0700 (PDT) Currently, the DRM GPUVM does not have any core dependencies preventing a module build. Also, new features from subsequent patches require helpers (namely drm_exec) which can be built as module. Reviewed-by: Christian König Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/Kconfig | 7 +++++++ drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_gpuvm.c | 3 +++ drivers/gpu/drm/nouveau/Kconfig | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index ab9ef1c20349..0f78a03e4e84 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -216,6 +216,13 @@ config DRM_EXEC help Execution context for command submissions +config DRM_GPUVM + tristate + depends on DRM && DRM_EXEC + help + GPU-VM representation providing helpers to manage a GPUs virtual + address space + config DRM_BUDDY tristate depends on DRM diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 7a84b3cddeab..8e1bde059170 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -45,7 +45,6 @@ drm-y := \ drm_vblank.o \ drm_vblank_work.o \ drm_vma_manager.o \ - drm_gpuvm.o \ drm_writeback.o drm-$(CONFIG_DRM_LEGACY) += \ drm_agpsupport.o \ @@ -81,6 +80,7 @@ obj-$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS) += drm_panel_orientation_quirks.o # # obj-$(CONFIG_DRM_EXEC) += drm_exec.o +obj-$(CONFIG_DRM_GPUVM) += drm_gpuvm.o obj-$(CONFIG_DRM_BUDDY) += drm_buddy.o diff --git a/drivers/gpu/drm/drm_gpuvm.c b/drivers/gpu/drm/drm_gpuvm.c index 7074bcad5b28..bfea4a8a19ec 100644 --- a/drivers/gpu/drm/drm_gpuvm.c +++ b/drivers/gpu/drm/drm_gpuvm.c @@ -1723,3 +1723,6 @@ drm_gpuva_ops_free(struct drm_gpuvm *gpuvm, kfree(ops); } EXPORT_SYMBOL_GPL(drm_gpuva_ops_free); + +MODULE_DESCRIPTION("DRM GPUVM"); +MODULE_LICENSE("GPL"); diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig index c52e8096cca4..1e6aaf95ff7c 100644 --- a/drivers/gpu/drm/nouveau/Kconfig +++ b/drivers/gpu/drm/nouveau/Kconfig @@ -11,6 +11,7 @@ config DRM_NOUVEAU select DRM_TTM select DRM_TTM_HELPER select DRM_EXEC + select DRM_GPUVM select DRM_SCHED select I2C select I2C_ALGOBIT -- 2.41.0