From patchwork Thu Jun 13 17:02:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Skeggs X-Patchwork-Id: 13697177 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 28595C27C78 for ; Thu, 13 Jun 2024 17:01:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2242010EB41; Thu, 13 Jun 2024 17:01:50 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.b="ik/JQ/KD"; dkim-atps=neutral Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2043.outbound.protection.outlook.com [40.107.244.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 970CF10EB34; Thu, 13 Jun 2024 17:01:42 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m518ZZEGVXzo5qoaG4TN+Klr95uc5FPLZKLHR5N+xiv/BRXpbzkpiWwrLM0iM7aHKP0Dw8OVlQ34hYpIm1PEbcNbEv0yMl9pNJHPMvq6h8+8GLnq+/FVKdOGM4bRxgmGSGr6GM3MRPY1axYz5BHu4BEN+dCj7wfa12wipHVKb79XHPl8QTMBDL7Yqugqi3fHjiv2oc3Bpow8671/yItZW1KIsBm8imsZYqB/JkXirTahvJy/pCuOT6sbWqxlxoJyhbqFi7qPbR5aoMgqFNyuc4Yn5a9/M+Uzgl3fHTQ/gPnMaYNsDMg9acgpDqJBTw60UgZbbkP9bbcJIfkNLC5/Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CvVqjXhdVDF/VhpBDgneO3tVZp0jZCLlVU73cyweN5w=; b=DCVpiNgOJRVAgbHksUY7slAwHreDM0rrVRDuPoQIZ4P9GALu716LZ/zJd0z0bMLVY9GMiLnJxYnwRxV8GKKc03mmlRt0tOwFhZbrnZ+aieP5yByVhEuFKKdr59ifFKP4uQFK7l/aRSTjbYySib8UJUTxZyvT2YRQIAlbDOA7cbJvxc9sw2K5fX1EBaLN+xkuexpkbgvGLSnWx4OeU8nDsV6Ts+g5p6G1i3KklwwPBNRjLXgA01tmnPCV2u3R87o7appoMPoS5skNN1SVk60z6wibrQX8GWTgcYmfXJ1CrBIGqa7iKWqfZlJ44uLLQaydkDShs9hUnexQ4ViRdslb0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CvVqjXhdVDF/VhpBDgneO3tVZp0jZCLlVU73cyweN5w=; b=ik/JQ/KDDvbjJtWeaHUMm9ZcuTWpsqeO3liUZN5XXf9bdj02LFlPxE5lZLCp2FojNA5e1wo3My3xxvJ86KRjpq4ZTuY3puF8DBdGfIgxtsV8ZjVZtSLRxcVti+Ht7g3/KgAeoAmtzp0JPVSRo6MJRusiKiwpgl4iGDwID8ZYbgaf5Jzrxe5zMQvzuXgQC+cgqo3Yh7wFiK9H20bxyHCVz07TCUjCz/YBCkgG//cL60RuuMndhrm3ZM8bKeBgx8azEG3WeRhHKPP6xV6SOTs8lHkPbH3boVwM6LUUFboUdxbumYUSusnXnU29SzSZ3teym8RV/Ju7/SlAQv4PS+YR+g== Received: from MN2PR08CA0024.namprd08.prod.outlook.com (2603:10b6:208:239::29) by SN7PR12MB7810.namprd12.prod.outlook.com (2603:10b6:806:34c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.37; Thu, 13 Jun 2024 17:01:36 +0000 Received: from BL6PEPF00022573.namprd02.prod.outlook.com (2603:10b6:208:239:cafe::68) by MN2PR08CA0024.outlook.office365.com (2603:10b6:208:239::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.24 via Frontend Transport; Thu, 13 Jun 2024 17:01:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BL6PEPF00022573.mail.protection.outlook.com (10.167.249.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.15 via Frontend Transport; Thu, 13 Jun 2024 17:01:35 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 13 Jun 2024 10:01:05 -0700 Received: from fedora.mshome.net (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 13 Jun 2024 10:01:03 -0700 From: Ben Skeggs To: , CC: Ben Skeggs Subject: [PATCH 1/2] drm/nouveau/nvkm: export symbols needed by the drm driver Date: Fri, 14 Jun 2024 03:02:10 +1000 Message-ID: <20240613170211.88779-2-bskeggs@nvidia.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240613170211.88779-1-bskeggs@nvidia.com> References: <20240613170211.88779-1-bskeggs@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF00022573:EE_|SN7PR12MB7810:EE_ X-MS-Office365-Filtering-Correlation-Id: 12df4ce9-ef44-41ee-6475-08dc8bca7c1c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230035|376009|1800799019|82310400021|36860700008; X-Microsoft-Antispam-Message-Info: AZEHGhM6SNk/ZR4m5tpBPhbAxYfnzHQpjpQiUp1QuYp7Uv3Z4A3QwC3+Pgj1bo1DnD95+2WeSyed4pqKySY3yrdXbP+BI9is3wL3+/xaNWTiBMkQReWBIAg7sBRfyOXnneqHHRH6x28ulorDXqHGVFJY962sbfCfNYKtWUdQ1FbTsXcfu3qmHcu1HPezs7Q/RJbH8uN7UMEILwJ1bSyCfJTK1H97MBiylbOjuWFKmA+UcAP5189s0yvF1v0b0eDhLzx4l88ztm5C2wFCHxhFQUb/b8DaK+egjbu6B3ljhBPHSqe7aqmdSJaIpLjzjU2zxZ3uzXZATSGW1uPIn0yEy3JBefcmqVdJfs9EP3FUH5VLhAK1AkpkQeI5ZvpNxhRrprN5zs6+sdCRB5mK3QptJgQNkgWC23dE9eZeQHtPz0zP/OGVLlYPCcTb1AXlRXZaMSDqpp1vk0x7GYc65BEatFXJTrB8eaAboxHvrB4Kxlko4hq3oBhZEIy/Cfdk3jCyx9QCPciHu8ObCjUquyPSnowSs0ZPOPo/URb0yDQ870XHs1GQlp1hV9tTI/+ogxCfLB8cKW/E8bCxzfss3ml4sWbI5xF/ICo6UAk4aZwQub3/nW4w1op7tW/KqZb8C/PU7nrNmZuVRN7UUXm7OkxnfNLNJzEiU5tkLXSjW4ZIiMAzJSpLVJ/al6hSG+XwCrH2hdcRsvnqpfnR+dYHwFVNHNlYVhh9MobdbpBMXATqlqpb50trH8uqsAcMUe/zj5vewEq1q+jRp3Pvazx/8It20FaUZTxU1skU48RBI4UsRMpqwdhy0ZOuwAx++Bovk134qw6CQ8l0ClA98d7mv+jzGJBqxdJq7dKEeNx/k12kyA7VbCJ3U+KqyyDL7keHcwEznUFMYLVB9jDFX/dagmGrfTF2uMo9j4rXvhEEjuh8ZbG/r/Oh1awW5KN30xw030BWGSyTvvS0J6Ks5BhlE+rCbcOfROOuh4ct6hKiHZSD3pJP0NFXqOYl07IHNomQ/u3O4wsXcsInXZo4Po+yvxxLe4yTlpD0Vob2JyA8K9kg5ZbkvK044FFnns+oz7mNbF8jo1vXB6oUeF1B2Ubl9lVdE0fzjzTTJX4ykqTrIfmZoLwWBisqW0t1pWXhlulB063wNd4mtFWrE7jG9703xUIbiFho3heHaYqUUp/MCZnvTbOcf6YZDQvvFWiQn97G+5eV8hXZx2JQy5GmaHVFGH//ilp6FGF4fCUak5a6k52T0RnRGmjTX6CiurlFWutnLCHKqBFD/3YFcK2qbsd0A5lHIzBcqWv1DsUCm6vz6N9/QC8/KtALsm7AJNMOhQhE19Ayd1zNblswQRQoQRtPEVkyY2Kk7v8UYGyWQbGPed0/W3b+HlZuL22TxClJD+cPaK62ixxyXesOaU0eX/G6a2tUUw== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230035)(376009)(1800799019)(82310400021)(36860700008); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2024 17:01:35.9782 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 12df4ce9-ef44-41ee-6475-08dc8bca7c1c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF00022573.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7810 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The primary interfaces to NVKM are through NVIF, but there are a small number of functions which are called directly. Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/nvkm/core/driver.c | 1 + drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/core/mm.c | 4 ++++ drivers/gpu/drm/nouveau/nvkm/device/acpi.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/base.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/bios/pll.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c | 3 +++ drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c | 3 +++ drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c | 1 + 15 files changed, 24 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nvkm/core/driver.c b/drivers/gpu/drm/nouveau/nvkm/core/driver.c index dcc5dc7f246e..d6e8117a2a74 100644 --- a/drivers/gpu/drm/nouveau/nvkm/core/driver.c +++ b/drivers/gpu/drm/nouveau/nvkm/core/driver.c @@ -78,3 +78,4 @@ nvkm_driver_ctor(struct nvkm_device *device, const struct nvif_driver **pdrv, *pdrv = &nvkm_driver; return 0; } +EXPORT_SYMBOL(nvkm_driver_ctor); diff --git a/drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c b/drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c index d6de2b3ed2c3..a06ced74fb10 100644 --- a/drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c +++ b/drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c @@ -224,6 +224,7 @@ nvkm_gpuobj_del(struct nvkm_gpuobj **pgpuobj) *pgpuobj = NULL; } } +EXPORT_SYMBOL(nvkm_gpuobj_del); int nvkm_gpuobj_new(struct nvkm_device *device, u32 size, int align, bool zero, @@ -240,6 +241,7 @@ nvkm_gpuobj_new(struct nvkm_device *device, u32 size, int align, bool zero, nvkm_gpuobj_del(pgpuobj); return ret; } +EXPORT_SYMBOL(nvkm_gpuobj_new); /* the below is basically only here to support sharing the paged dma object * for PCI(E)GART on <=nv4x chipsets, and should *not* be expected to work diff --git a/drivers/gpu/drm/nouveau/nvkm/core/mm.c b/drivers/gpu/drm/nouveau/nvkm/core/mm.c index f78a06a6b2f1..c2a66cfe2a1e 100644 --- a/drivers/gpu/drm/nouveau/nvkm/core/mm.c +++ b/drivers/gpu/drm/nouveau/nvkm/core/mm.c @@ -81,6 +81,7 @@ nvkm_mm_free(struct nvkm_mm *mm, struct nvkm_mm_node **pthis) *pthis = NULL; } +EXPORT_SYMBOL(nvkm_mm_free); static struct nvkm_mm_node * region_head(struct nvkm_mm *mm, struct nvkm_mm_node *a, u32 size) @@ -156,6 +157,7 @@ nvkm_mm_head(struct nvkm_mm *mm, u8 heap, u8 type, u32 size_max, u32 size_min, return -ENOSPC; } +EXPORT_SYMBOL(nvkm_mm_head); static struct nvkm_mm_node * region_tail(struct nvkm_mm *mm, struct nvkm_mm_node *a, u32 size) @@ -278,6 +280,7 @@ nvkm_mm_init(struct nvkm_mm *mm, u8 heap, u32 offset, u32 length, u32 block) mm->heap_nodes++; return 0; } +EXPORT_SYMBOL(nvkm_mm_init); int nvkm_mm_fini(struct nvkm_mm *mm) @@ -305,3 +308,4 @@ nvkm_mm_fini(struct nvkm_mm *mm) mm->heap_nodes = 0; return 0; } +EXPORT_SYMBOL(nvkm_mm_fini); diff --git a/drivers/gpu/drm/nouveau/nvkm/device/acpi.c b/drivers/gpu/drm/nouveau/nvkm/device/acpi.c index ff8a3027c1bc..941e7d2a29a8 100644 --- a/drivers/gpu/drm/nouveau/nvkm/device/acpi.c +++ b/drivers/gpu/drm/nouveau/nvkm/device/acpi.c @@ -109,6 +109,7 @@ void nvkm_acpi_switcheroo_set_powerdown(void) NOUVEAU_DSM_OPTIMUS_SET_POWERDOWN, &result); } +EXPORT_SYMBOL(nvkm_acpi_switcheroo_set_powerdown); /* * On some platforms, _DSM(nvkm_op_dsm_muid, func0) has special diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/base.c index f5e68f09df76..151c10558c82 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/base.c @@ -76,6 +76,7 @@ nvkm_gr_units(struct nvkm_gr *gr) return gr->func->units(gr); return 0; } +EXPORT_SYMBOL(nvkm_gr_units); int nvkm_gr_tlb_flush(struct nvkm_gr *gr) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c index b54f044c4483..3ac3dbc0c03a 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c @@ -2317,6 +2317,7 @@ nvbios_exec(struct nvbios_init *init) init->nested--; return 0; } +EXPORT_SYMBOL(nvbios_exec); int nvbios_post(struct nvkm_subdev *subdev, bool execute) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/pll.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/pll.c index 2ec84b8a3b3a..1cd5b1996489 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/pll.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/pll.c @@ -438,3 +438,4 @@ nvbios_pll_parse(struct nvkm_bios *bios, u32 type, struct nvbios_pll *info) return 0; } +EXPORT_SYMBOL(nvbios_pll_parse); diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c index 8a286a9349ac..b1fab6332ed1 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c @@ -36,6 +36,7 @@ nvkm_fb_tile_fini(struct nvkm_fb *fb, int region, struct nvkm_fb_tile *tile) { fb->func->tile.fini(fb, region, tile); } +EXPORT_SYMBOL(nvkm_fb_tile_fini); void nvkm_fb_tile_init(struct nvkm_fb *fb, int region, u32 addr, u32 size, @@ -43,6 +44,7 @@ nvkm_fb_tile_init(struct nvkm_fb *fb, int region, u32 addr, u32 size, { fb->func->tile.init(fb, region, addr, size, pitch, flags, tile); } +EXPORT_SYMBOL(nvkm_fb_tile_init); void nvkm_fb_tile_prog(struct nvkm_fb *fb, int region, struct nvkm_fb_tile *tile) @@ -56,6 +58,7 @@ nvkm_fb_tile_prog(struct nvkm_fb *fb, int region, struct nvkm_fb_tile *tile) nvkm_engine_tile(device->mpeg, region); } } +EXPORT_SYMBOL(nvkm_fb_tile_prog); static void nvkm_fb_sysmem_flush_page_init(struct nvkm_device *device) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c index b196baa376dc..f93ce38afd16 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c @@ -75,6 +75,7 @@ nvkm_gpio_find(struct nvkm_gpio *gpio, int idx, u8 tag, u8 line, return -ENOENT; } +EXPORT_SYMBOL(nvkm_gpio_find); int nvkm_gpio_set(struct nvkm_gpio *gpio, int idx, u8 tag, u8 line, int state) @@ -91,6 +92,7 @@ nvkm_gpio_set(struct nvkm_gpio *gpio, int idx, u8 tag, u8 line, int state) return ret; } +EXPORT_SYMBOL(nvkm_gpio_set); int nvkm_gpio_get(struct nvkm_gpio *gpio, int idx, u8 tag, u8 line) @@ -107,6 +109,7 @@ nvkm_gpio_get(struct nvkm_gpio *gpio, int idx, u8 tag, u8 line) return ret; } +EXPORT_SYMBOL(nvkm_gpio_get); static void nvkm_gpio_intr_fini(struct nvkm_event *event, int type, int index) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c index 731b2f68d3db..845e7f41076e 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c @@ -71,6 +71,7 @@ nvkm_i2c_bus_find(struct nvkm_i2c *i2c, int id) return NULL; } +EXPORT_SYMBOL(nvkm_i2c_bus_find); struct nvkm_i2c_aux * nvkm_i2c_aux_find(struct nvkm_i2c *i2c, int id) @@ -84,6 +85,7 @@ nvkm_i2c_aux_find(struct nvkm_i2c *i2c, int id) return NULL; } +EXPORT_SYMBOL(nvkm_i2c_aux_find); static void nvkm_i2c_intr_fini(struct nvkm_event *event, int type, int id) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c index ed50cc3736b9..47fade442d14 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c @@ -189,6 +189,7 @@ nvkm_i2c_bus_probe(struct nvkm_i2c_bus *bus, const char *what, BUS_DBG(bus, "no devices found."); return -ENODEV; } +EXPORT_SYMBOL(nvkm_i2c_bus_probe); void nvkm_i2c_bus_del(struct nvkm_i2c_bus **pbus) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c index 8f0ccd3664eb..6e6d7bc0ea1f 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c @@ -126,6 +126,7 @@ nvkm_iccsense_read_all(struct nvkm_iccsense *iccsense) } return result; } +EXPORT_SYMBOL(nvkm_iccsense_read_all); static void * nvkm_iccsense_dtor(struct nvkm_subdev *subdev) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c index fc5ee118e910..2a32559b38f4 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c @@ -33,6 +33,7 @@ nvkm_therm_temp_get(struct nvkm_therm *therm) return therm->func->temp_get(therm); return -ENODEV; } +EXPORT_SYMBOL(nvkm_therm_temp_get); static int nvkm_therm_update_trip(struct nvkm_therm *therm) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c index f8fa43c8a7d2..418f441897f1 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c @@ -164,6 +164,7 @@ nvkm_therm_fan_sense(struct nvkm_therm *therm) } else return 0; } +EXPORT_SYMBOL(nvkm_therm_fan_sense); int nvkm_therm_fan_user_get(struct nvkm_therm *therm) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c index a17a6dd8d3de..07d861440232 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c @@ -46,6 +46,7 @@ nvkm_volt_get(struct nvkm_volt *volt) } return ret; } +EXPORT_SYMBOL(nvkm_volt_get); static int nvkm_volt_set(struct nvkm_volt *volt, u32 uv) From patchwork Thu Jun 13 17:02:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Skeggs X-Patchwork-Id: 13697178 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 121D4C27C75 for ; Thu, 13 Jun 2024 17:02:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 59AAA10EB3F; Thu, 13 Jun 2024 17:02:03 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.b="DZc9zivm"; dkim-atps=neutral Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2046.outbound.protection.outlook.com [40.107.244.46]) by gabe.freedesktop.org (Postfix) with ESMTPS id 21CA010EB44; Thu, 13 Jun 2024 17:01:54 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=czpqpIW6QUPJlQhQAskPV/NWHbGcm6VfL0clxXSu/mQu3JXrA2oGdeDhPeXQVDIKVeJTIR31SBuWbkwVxi3I5lHD/0Pfd1n0R2OZ2DJnjB609IpX1lEmFRmDDUu8g2ld90UNC0X3QXWUElyBsKapwNBWd3dHrYI5jF/QXX/mdSY8WgV+jWtwnFHjh+v9Y6T1rDK+1UXAMXBJ2VyKq/snAnuIj9nNImfWNlWfBCJHVLHXm2j3DKTmPKE/1Ap7WZKZgVZdSMeDwLeke6kN9hAc79vAUlmv2zZrdLvNzaN3XbN0UO8Nkc0gOtSUnZyAd/B3+PBZjxlDTCnjCTQQdoOsCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=17WkeGr7r7HhCghj1PZIUJ0et2wAnD3ZVaHDMHv4z6Q=; b=hI+jevuPTU+leMTwWXJVlm1ybGY+761+OW7kimODYRonasncOAYBUvNWBfbm8bwNaFnZyKYOVQVRVs8POjHHExvDGbyf/fxHEihU3+cMTuaV0rrseQC+R07GHUBrkoRIiZKEJblTcywn2dFZ/DRVPA/zcc/YET+d+/yFe1o2L0J2pqqws6FS6ZETk3MZ/bEoY1qmrkWnVQWHCF3kyA2F03iZ385f1NYu5X2tHpEHnREbAMQ47TalUDR1/9CqFny7HD6ABKygQhxuntYY1/WGgxrfyB/luYYkVtjZysntHaK9r1rTJE96LexaFL1JI6ylic2HXIIfxImSa7ebKATFyQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=17WkeGr7r7HhCghj1PZIUJ0et2wAnD3ZVaHDMHv4z6Q=; b=DZc9zivmERZnYCYprjt+jQvmJEHi82dZ3SrbfliCIl6rrQANSQv0fBsfgyfDBBtqtzWAZ6iPwhVQAzRP1Tkzpur36Y8GSK1xkMOMOI1Ur9Ga0pLWBlojbZoFJoZF9riMkpbJqRMZWIAnX0Webp+6KRnYrb/HahsYZqlqJ8qdTKSCtMWYjaHTDUirB8QjBz8LKh7XYeXF6gjnOytV0JyYs7OJUx6ndwkWJbveT9QVREAhXbVoZOUXSg/zNWAkqnQri29O3TmyNrNcZpPER1SRoham2ElPGTDc24qrGXovSN/vJnWx7Ylw0a2zjDIAAbhHwN4wdnN+wW5p80HoOr7msQ== Received: from BL1PR13CA0095.namprd13.prod.outlook.com (2603:10b6:208:2b9::10) by DS7PR12MB6119.namprd12.prod.outlook.com (2603:10b6:8:99::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.37; Thu, 13 Jun 2024 17:01:45 +0000 Received: from BL6PEPF0002256F.namprd02.prod.outlook.com (2603:10b6:208:2b9:cafe::c4) by BL1PR13CA0095.outlook.office365.com (2603:10b6:208:2b9::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.20 via Frontend Transport; Thu, 13 Jun 2024 17:01:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BL6PEPF0002256F.mail.protection.outlook.com (10.167.249.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.15 via Frontend Transport; Thu, 13 Jun 2024 17:01:37 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 13 Jun 2024 10:01:06 -0700 Received: from fedora.mshome.net (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 13 Jun 2024 10:01:05 -0700 From: Ben Skeggs To: , CC: Ben Skeggs Subject: [PATCH 2/2] drm/nouveau/nvkm: separate out into nvkm.ko Date: Fri, 14 Jun 2024 03:02:11 +1000 Message-ID: <20240613170211.88779-3-bskeggs@nvidia.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240613170211.88779-1-bskeggs@nvidia.com> References: <20240613170211.88779-1-bskeggs@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0002256F:EE_|DS7PR12MB6119:EE_ X-MS-Office365-Filtering-Correlation-Id: dd29f3d9-99a6-405f-b783-08dc8bca7ceb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230035|376009|1800799019|82310400021|36860700008; X-Microsoft-Antispam-Message-Info: ZuOaVEZDYjPkvOsruQ9UUcNX8dZEN+ULkFubwYd57kvtdM3h8nrkJA6YgD/u3vCW5CQUcpgWNUtsbe/5eiEGQx+oHIteM+4CKxdk7LcUWZAGWcXf6Rzf75/SLY2K5b9d/hVxL4aBUr9vszSiIviFSybgkNY2a2sHg/IeJV909GWjzvfL2aFMAwKNutrmzldF8bf8L6lDttsw2NQ3av9CzsxK6pVsmz2cw4z30HctdyUrXycBB3HOfArgZoi0gOpP6VJbiHw9eJtpKlvP4nnKmfzWZzEE0/ikZgaR68ULbYkQqAVpA5uG4P1aOibJSxhfGRuBta8Fo9PWJacWNyVUUmEnAsGDEo1af0U36cGQ24WqvvGYFuj9YhuTtVIsGxYDE/WVCoDsNzzMueYy89arUJpVaLJS0SKnZO86vawPxS2seH7adzAju2ZgioA7ORsBrfeIuv9WUplV4PzHa0FUL+GyEV0EAS3qIiIX05psmeayiEQCMVQTCDB+esmseTx8x5vxFiUmS1kGwk+sDWgOyvwODRwZhbjidXMs5uzthZ6OaDmGGwDHiSYRCG5Zr0zrssCRsgiqfIAifOOYkyLbJwC6H81cEyAy97hvOMJRkmgzEd/J4QbQjNfqKO+6XxfrYtVgJlnzsLM8gbDEbTTQOLRTovI/SXxj1yGvTULmkh+rFHOO6fBOvPMrNpFTmA4inwITesbvQsPeSprrvoLHalvJHSl5WzK5iaZNTeYaWgfyh1cUq3RabEo3lGHjH99Z07ahP0mz+6QAr00mjVWw06OuF6sgEN1nsJ5B2m/RAw+r1onkd3RXsn4rk46v6NrosqkWMrgeoqh8HTw0UODloQd5rPhqjXP4YLkCbVcawfORm8/7q/zrPdLwukn4xRF19Czs9mC7Q9v4dh9HUq1e7KwmjB2fZ3cOt10IaG766Yctmum/CLIj+DzTr7V9sK+ecMM6QzdMlePGySh8XniofG8THoFN0Z7jGHzpfHHgVnBvsLaaIyYhan+nyVwcMEGFqHecC/oUIBNbDVtfLGKPj/qou/75KZnK7HJiY97x3PyZr5tWS+XTAnEVYzFCUALjymOtaDQPQ07SkhVAO+UdnlvwYq4jCMKR97uMTsfI+eNt0A2z7K/AuK2UqPFcpU41hrsPkqM66CxAHn6/avDwSo9X6pnrUgdXOzcqXatPwQzzw5V6r11B2+rE5lF1Nvr7WZevPTemaSop49NDvMbK8z/ugHcCE5HEC/y8tI4Z9WaNo3lbm8zqRrqiwWaM9IxmaBkG/PrGOJjbWv30JX/2XDMlSp5fKy9JnCHnA2zL4DtPNa7f5cRwBA1e1ShFJP6xdQ6qus9XJC0zUH+B3slQ/jWJx3I1/HJXUZ27SpkjbEczM7P/F4Vxf66wuPmucclq1SirIfteV2crQT6NFQPaHg== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230035)(376009)(1800799019)(82310400021)(36860700008); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2024 17:01:37.3213 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dd29f3d9-99a6-405f-b783-08dc8bca7ceb X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF0002256F.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6119 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/Kbuild | 4 ++-- drivers/gpu/drm/nouveau/include/nvkm/core/module.h | 3 --- drivers/gpu/drm/nouveau/nouveau_drm.c | 10 +--------- drivers/gpu/drm/nouveau/nvkm/module.c | 8 ++++++-- 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/nouveau/Kbuild b/drivers/gpu/drm/nouveau/Kbuild index cc471ab6a7ec..b62c6858fb7b 100644 --- a/drivers/gpu/drm/nouveau/Kbuild +++ b/drivers/gpu/drm/nouveau/Kbuild @@ -8,11 +8,11 @@ ccflags-y += -I $(NOUVEAU_PATH)/$(src) # NVKM - HW resource manager include $(src)/nvkm/Kbuild -nouveau-y := $(nvkm-y) +obj-$(CONFIG_DRM_NOUVEAU) += nvkm.o # NVIF - NVKM interface library (NVKM user interface also defined here) include $(src)/nvif/Kbuild -nouveau-y += $(nvif-y) +nouveau-y := $(nvif-y) # DRM - general ifdef CONFIG_X86 diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/module.h b/drivers/gpu/drm/nouveau/include/nvkm/core/module.h index fc42ace93a1c..d1ad6aae9911 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/module.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/module.h @@ -3,8 +3,5 @@ #define __NVKM_MODULE_H__ #include -int __init nvkm_init(void); -void __exit nvkm_exit(void); - extern int nvkm_runpm; #endif diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 7e77e950eba2..4f55cd73d1b3 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -1174,7 +1174,7 @@ static const struct dev_pm_ops nouveau_pm_ops = { static const struct auxiliary_device_id nouveau_drm_id_table[] = { - { .name = "nouveau.device" }, + { .name = "nvkm.device" }, {} }; @@ -1190,8 +1190,6 @@ nouveau_auxdrv = { static int __init nouveau_drm_init(void) { - int ret; - nouveau_display_options(); if (nouveau_modeset == -1) { @@ -1202,10 +1200,6 @@ nouveau_drm_init(void) if (!nouveau_modeset) return 0; - ret = nvkm_init(); - if (ret) - return ret; - nouveau_backlight_ctor(); return auxiliary_driver_register(&nouveau_auxdrv); @@ -1223,8 +1217,6 @@ nouveau_drm_exit(void) if (IS_ENABLED(CONFIG_DRM_NOUVEAU_SVM)) mmu_notifier_synchronize(); - - nvkm_exit(); } module_init(nouveau_drm_init); diff --git a/drivers/gpu/drm/nouveau/nvkm/module.c b/drivers/gpu/drm/nouveau/nvkm/module.c index c14dd7fa15c2..d0ae023cdc74 100644 --- a/drivers/gpu/drm/nouveau/nvkm/module.c +++ b/drivers/gpu/drm/nouveau/nvkm/module.c @@ -26,7 +26,7 @@ int nvkm_runpm = -1; -void __exit +static void __exit nvkm_exit(void) { #ifdef CONFIG_PCI @@ -39,7 +39,7 @@ nvkm_exit(void) #endif } -int __init +static int __init nvkm_init(void) { int ret; @@ -60,3 +60,7 @@ nvkm_init(void) return 0; } + +MODULE_LICENSE("GPL and additional rights"); +module_init(nvkm_init); +module_exit(nvkm_exit);