Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2622322rbb; Wed, 28 Feb 2024 07:33:26 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWL0u/OQ0fz8l5F5gPtBmA4QRJb8DJcGLmvXOgZpBb1mX/Yn8ZUFnr0ipEHCwaNtMZTL39c1XdvFH9p2LZLXL9uZVjzYa1s1ZdkQaHCCA== X-Google-Smtp-Source: AGHT+IG6T8xk9L3SvCdm1ETRYQUqjfNVbZKk459FUjV9cIvyz+jkwJgwlA3xGlMei+bD/HToPxvs X-Received: by 2002:a0c:f052:0:b0:68f:44eb:b947 with SMTP id b18-20020a0cf052000000b0068f44ebb947mr4358851qvl.14.1709134405736; Wed, 28 Feb 2024 07:33:25 -0800 (PST) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id q10-20020a05621419ea00b0068cb950df8asi9817667qvc.5.2024.02.28.07.33.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 07:33:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85265-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=e0BQcjV6; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-85265-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85265-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6ECA31C22B4D for ; Wed, 28 Feb 2024 15:33:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 528A015CD4E; Wed, 28 Feb 2024 15:33:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="e0BQcjV6" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6500415B990 for ; Wed, 28 Feb 2024 15:33:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.10 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709134402; cv=fail; b=WNWBoz541dR0vSiGxb6ocw1o2JFd0DVDzVnwHPOeX9vT4/1cHxr5eVoHUHPxm620ZQ3OcV1pl6tLh8fOJ5ndjMMaScZTQE1RJDaFHJtFX1TRgTPL4+8/v0BORfdxyepRhTzAodvlZwDBNuAe3SQeAimCmo3+UuPeo51JFM8IOaU= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709134402; c=relaxed/simple; bh=pl3eBVgjj4BkV56v9nqCFbyT3cYJzMnm4TdUVBFrDnU=; h=Date:From:To:CC:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=mrSl6bFSpZ0sDBid+8VMULTS6Z8PUWW7pN5IEgCPZjMVq8ip3ueTxm1DfRDTHqlFfsN/Ra4owZFsIKJUwqqrPLPfkAUJ8x1SWQW1oB9SJVIGERHWt+QHEXSe4atngGTnv/t5TE4uuZ8WE9kH8FZLRELHjcdJwPV5BN/QSjzAI/Q= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=e0BQcjV6; arc=fail smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709134400; x=1740670400; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=pl3eBVgjj4BkV56v9nqCFbyT3cYJzMnm4TdUVBFrDnU=; b=e0BQcjV6oI2u/t1yIg+vlAq6DetWWo2BzPmLCrji/+PRiiYu4gvGRoqb lf6ZUi7thzP7lTQbb4u9APA95oQPBva+3p++xGKTVD8mtVNqsoghtu3Lj XQ+V7eyRGI1twfaWkQOdh4A/YSXZTrDF3oYJ0sIoSEy+DmtpUXJINvfCT K8bbBY5NdkHE5dNIj69cPYskbZ9+92q9wvwXDeWYDFqu3jr2pRCIBVT1J w6mHPKiemL3q8o2sJxVNNEZRQc6m7/sLLIdCZDW+AnL7RCceVh/2FpPq2 tysfDlxGcjQemlHJpRJnfHdzs63V1J1EfHM0YQRHa12yMBqBUH/PU+5Pt g==; X-IronPort-AV: E=McAfee;i="6600,9927,10998"; a="20993138" X-IronPort-AV: E=Sophos;i="6.06,190,1705392000"; d="scan'208";a="20993138" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2024 07:33:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,190,1705392000"; d="scan'208";a="12186789" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 28 Feb 2024 07:33:16 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 28 Feb 2024 07:33:15 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Wed, 28 Feb 2024 07:33:15 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 28 Feb 2024 07:33:15 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=muNb1sEHWIJHvrHbyMMWTGf9aZ4OCGFVB7+b8YWvfJkBW77H5lRCXIz5l9hpd0i8Pu1l/VmmqzHSoJJ2rCR6dmOcOB0PmBeg+hFAydycHPAEEvfwDaIWb1tF6KPTM0j1xkUDD9VrMmlvvXoxl3ITnrhTUhbSPerhBVAX+3+m2WqMhkEXAcSxsY6XGc32IUvaquwArXIHIi7Z1JeM50cxijrjhZXa9SUA0t0nkYZ6n2bwcWE4tKdSaAtTqWq3zbLSv8OGUVB8Iyon22fAAxLfwf29r2cuUgnqg0hhVnhOP5HP/I32el35pbnupJUVLT+q5b/046g49p5+y6B9tQI/JQ== 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=p6OEk8ODhyMjYhY+xxPu6W2z8SEw+pcljv27pqW6ajg=; b=B3Xid9AIRVN2yNLMj7RqRUrux1zv57eSpCi1bduPQn5f57c7KX/m1NyBOohphPFofb74wg1FI9RTNy4sas+ECxu0w4RWBfG3fbemsCraekgsDAEb0fYEK486KATIiSbJeYmtnZyr6GmdblrokjuwFDe4zm/w7piJ1wY6ZHVGrKiVT73eJ3Oj+mLvLpKatgPE9WZK4LW/Oc1+bLJXoYZHDOXgcqmg75nd/tJtFEYOjxa4TOkyKoTD/mmpn6ASDpcxVmhJrXAdzOXrAGaMl+yuKpNLGsqvZLTIdPg2+EJt7U6+AgtaVgmxCNfdUXCXlFvBhm/6jy6k13wT46wl1t5krw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from CY5PR11MB6139.namprd11.prod.outlook.com (2603:10b6:930:29::17) by PH0PR11MB5951.namprd11.prod.outlook.com (2603:10b6:510:145::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.24; Wed, 28 Feb 2024 15:33:13 +0000 Received: from CY5PR11MB6139.namprd11.prod.outlook.com ([fe80::7352:aa4b:e13e:cb01]) by CY5PR11MB6139.namprd11.prod.outlook.com ([fe80::7352:aa4b:e13e:cb01%7]) with mapi id 15.20.7339.024; Wed, 28 Feb 2024 15:33:13 +0000 Date: Wed, 28 Feb 2024 09:33:01 -0600 From: Lucas De Marchi To: Arnd Bergmann CC: Oded Gabbay , Thomas =?utf-8?Q?Hellstr=C3=B6m?= , Arnd Bergmann , "Maarten Lankhorst" , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rodrigo Vivi , Matthew Brost , "Jani Nikula" , Matt Roper , , , Subject: Re: [PATCH 1/3] [v2] drm/xe/kunit: fix link failure with built-in xe Message-ID: References: <20240226124736.1272949-1-arnd@kernel.org> Content-Type: text/plain; charset="us-ascii"; format=flowed Content-Disposition: inline In-Reply-To: <20240226124736.1272949-1-arnd@kernel.org> X-ClientProxiedBy: BYAPR08CA0043.namprd08.prod.outlook.com (2603:10b6:a03:117::20) To CY5PR11MB6139.namprd11.prod.outlook.com (2603:10b6:930:29::17) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY5PR11MB6139:EE_|PH0PR11MB5951:EE_ X-MS-Office365-Filtering-Correlation-Id: 9407e3b5-9cec-4d84-6cc4-08dc3872937c X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 61nrZdOegrUHWhPkBtyCk6eX7HnZmKwtTYOYGn5gh2xnRTv9wXMmRqDBPHlXnU5wr2P0y88vTA7JxkSKMTd12+PRXAoaNDEs+JkCnzQv54IQmNxC69xdWKYthz9B1pblB+iNbSkKXJEeSsoh+AArphtVHys/JakbdcJKt52PZNedy1XTU2K1PW+tyCz6DmS206z5XwRoH1TdqP5ijDsyrBfzUQOLkwfK9M1N0H8GOpE74FS/nkD///lzTyiWIfjjJOq+dxWGmYBO0WSuh0AJyWsktrQB4PuUEcp6Uji7ftQTsCnl4SbqLPfxU4AsP68jsQpkPGQYrq32GDO9r03BZjYf8op7Lp0gYCY0yWjyU5/layi1lMPU4DnlmfdN0z8AkLbtD/XJyo+ai83S51aNLVML/xU2BA7bdQoleHKEcL/1O+rxBxso4mx7SWQJTIXJry6dRoP1+u9Dc+cI1uoxR5eLYtK0J3mFUzgFWBkO0n3BGtvCDGkYapYQEFjBrAubsR/jBDfQBUbabOFqTqzgdIZ4UC09/+W4RiDVKuJvHrOtoIlfqb9APR+3I/BZCpygq8uPJU7dbPymI8ZH60PqGPPixh9nlZcRUXaRpOkqoJWlv+LTJIiJPaiR8kF1EOiG X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY5PR11MB6139.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?7sQabO7rEqhvt2Tb4/HKF5t9nKLH7Q0Bs7/PTUftKicYuP0IhcagQNVLEFJl?= =?us-ascii?Q?SnWD/EuhbaR0qb1sB6W5lgJQBCIUQruA9YbTPfKZSqPpWJxD3t18OjXbDUFl?= =?us-ascii?Q?DCis+6A3as40AbsmZFbL0yqzV49RD5m/aVYUVqiTsK8Qeu29T6wtjYZ/WZOk?= =?us-ascii?Q?5USj3CApkdZInTceI2OJcQuer0OsQ3GZ+FRiDL4BXYZh+BBDruhM4RE/jCHx?= =?us-ascii?Q?AUDsrrAmehznAseJNpB3ujlfmo3hHcpAJ+ivHny8qAelPzA977KalMi8qay3?= =?us-ascii?Q?kYnyYP0+5kxv6koaQXSK5IyjCPxpt8Ux2gGVnmaRGryb1VIYNFlaFCXgVxpg?= =?us-ascii?Q?k+9xZqtbjnayr/LvPuR8YVPshAVQ5UneH9U4FSlmKEQGb5gL/zXh6EyemEHL?= =?us-ascii?Q?clraP3766ojCUO9i/44itjbESbgSX0F/X7QlOHg60wGitNjDU7eTHwQvMM81?= =?us-ascii?Q?LXPkSEf8rUbllS+Q4WkPbEQw3HGW9OG9YWL9driuz3ej8jlbyYqAZ9zVodyh?= =?us-ascii?Q?a/PHXg1hB8ztXZOnZts+txecmha6aqbhiJMpKZEriqN1YCCvwOW8oneLVb//?= =?us-ascii?Q?y2tEJohC3a0MhhX0zOKa0G74IVk1fv9Vwk/8X3IVvBFpSPVKIxdmvraThcI1?= =?us-ascii?Q?SNsaypnH1bDKXmI/wWSl45J1VmgAhtNnHiKv+881S+oD6MfKq//I3Kd8pkp9?= =?us-ascii?Q?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o5rfrHr+KATpLV?= =?us-ascii?Q?IQ=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 9407e3b5-9cec-4d84-6cc4-08dc3872937c X-MS-Exchange-CrossTenant-AuthSource: CY5PR11MB6139.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Feb 2024 15:33:13.3015 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rJRoMM3vygbHs85FJ9qfPxlOYJWj/xgZlwTr6ngwyqbsLGEiU/x1q4e8TykSRvsz9onQ5c2opCw7VPk+Ja9bQGgfDJ7MRn1SuHgAI3O8A2I= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5951 X-OriginatorOrg: intel.com On Mon, Feb 26, 2024 at 01:46:36PM +0100, Arnd Bergmann wrote: >From: Arnd Bergmann > >When the driver is built-in but the tests are in loadable modules, >the helpers don't actually get put into the driver: > >ERROR: modpost: "xe_kunit_helper_alloc_xe_device" [drivers/gpu/drm/xe/tests/xe_test.ko] undefined! > >Change the Makefile to ensure they are always part of the driver >even when the rest of the kunit tests are in loadable modules. > >Fixes: 5095d13d758b ("drm/xe/kunit: Define helper functions to allocate fake xe device") >Signed-off-by: Arnd Bergmann Reviewed-by: Lucas De Marchi thanks Lucas De Marchi >--- >v2: don't remove KUNIT dependency >--- > drivers/gpu/drm/xe/Kconfig | 1 + > drivers/gpu/drm/xe/Kconfig.debug | 1 - > drivers/gpu/drm/xe/Makefile | 6 ++++-- > 3 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig >index 6d4428b19a4c..c3a3b204ae5b 100644 >--- a/drivers/gpu/drm/xe/Kconfig >+++ b/drivers/gpu/drm/xe/Kconfig >@@ -11,6 +11,7 @@ config DRM_XE > select DRM_BUDDY > select DRM_EXEC > select DRM_KMS_HELPER >+ select DRM_KUNIT_TEST_HELPERS if DRM_XE_KUNIT_TEST != n > select DRM_PANEL > select DRM_SUBALLOC_HELPER > select DRM_DISPLAY_DP_HELPER >diff --git a/drivers/gpu/drm/xe/Kconfig.debug b/drivers/gpu/drm/xe/Kconfig.debug >index 549065f57a78..df02e5d17d26 100644 >--- a/drivers/gpu/drm/xe/Kconfig.debug >+++ b/drivers/gpu/drm/xe/Kconfig.debug >@@ -76,7 +76,6 @@ config DRM_XE_KUNIT_TEST > depends on DRM_XE && KUNIT && DEBUG_FS > default KUNIT_ALL_TESTS > select DRM_EXPORT_FOR_TESTS if m >- select DRM_KUNIT_TEST_HELPERS > help > Choose this option to allow the driver to perform selftests under > the kunit framework >diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile >index 4c6ffe4b2172..b596e4482a9b 100644 >--- a/drivers/gpu/drm/xe/Makefile >+++ b/drivers/gpu/drm/xe/Makefile >@@ -158,8 +158,10 @@ xe-$(CONFIG_PCI_IOV) += \ > xe_lmtt_2l.o \ > xe_lmtt_ml.o > >-xe-$(CONFIG_DRM_XE_KUNIT_TEST) += \ >- tests/xe_kunit_helpers.o >+# include helpers for tests even when XE is built-in >+ifdef CONFIG_DRM_XE_KUNIT_TEST >+xe-y += tests/xe_kunit_helpers.o >+endif > > # i915 Display compat #defines and #includes > subdir-ccflags-$(CONFIG_DRM_XE_DISPLAY) += \ >-- >2.39.2 >