From mboxrd@z Thu Jan 1 00:00:00 1970 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 ADD4FC4828F for ; Thu, 1 Feb 2024 15:50:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 44EAC10E704; Thu, 1 Feb 2024 15:50:58 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="EwI/8Yl4"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 31F1B10EF50 for ; Thu, 1 Feb 2024 15:50:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706802656; x=1738338656; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=DXaj2B0igSZXEc9pbqUJHH/3mhS5A/diESH3W0rFbYc=; b=EwI/8Yl4ZFxoD2bhTEvNvCPHv8awsh7x5oU4nRmFzUICLtkH97JAuI4A NUBo5uWNNS8vssuOape3MP5ppktnp62mG6oKOYikFesIyEAbujUaPJ4OL kGH34dwcRZtlmZ/Jxdqb/PqBB5BeoMi+YNbLbP7D98WIXPvgbI2J2wrLb MEf6mfRs4B3OItGdOOLJNjaSIaNYOTvWMt+pmXWG71pUKZ1z3Eq2EIN1O RCFI1S3KjR858WDoIqIVsCdZ4+Pic/j28xl80L+nF9kw6QTUjvOw4138P bzpSs1SLZ4X1sI/dU0HnTYhX5rWte8fiFgIcnIVkc5f62cM4WS4PFiFoU A==; X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="108362" X-IronPort-AV: E=Sophos;i="6.05,234,1701158400"; d="scan'208";a="108362" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2024 07:50:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="822950294" X-IronPort-AV: E=Sophos;i="6.05,234,1701158400"; d="scan'208";a="822950294" Received: from msterni-mobl.ger.corp.intel.com (HELO localhost) ([10.245.112.128]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2024 07:50:51 -0800 From: Kamil Konieczny To: igt-dev@lists.freedesktop.org Cc: Kamil Konieczny , Janusz Krzysztofik Subject: [PATCH i-g-t v6 0/8] introduce Xe multigpu and other multi-GPU helpers Date: Thu, 1 Feb 2024 16:50:39 +0100 Message-ID: <20240201155047.48608-1-kamil.konieczny@linux.intel.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: igt-dev@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development mailing list for IGT GPU Tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" Introduce some multi-gpu function helpers and macros. Change in drmtest base opening function allows it to use __drm_open_driver_another(N, ...) out of order, for example on board with three discrete GPUs: __drm_open_driver_another(2, DRIVER_INTEL); __drm_open_driver_another(0, DRIVER_INTEL); Second solution for Xe is based on filtered views. Both allows to quickly write tests. There is still drawback of not printing in children logs for first opened device. I renamed lib from lib/i915/igt_multigpu.* to lib/intel_multigu.* as I do not know of any non Intel developer using igt for such tests. v2: corrected two patches which introduced multigpu lib (Dominik) rebased patch intoducing Xe multigpu macro, corrected description v3: corrected include in first multigpu patch (Dominik) fixed typo (Dominik), refactoring code with Xe and gem macro (Kamil) v4: corrected typo in macro (Dominik) v5: removed cached names and relaxing checks for filtered devices in 3/8 patch, added Janusz to cc in 1/8...5/8 (Kamil) v6: extended description of patches 1 and 2, fixed bug in 3/8 (Janusz) improved usage of _is_already_opened() (Kamil) Cc: Janusz Krzysztofik Dominik Karol PiÄ…tkowski (4): lib/igt_device_scan: Introduce filtering out non-PCI devices lib/drmtest: Introduced drm_open_driver_another lib/intel_multigpu: Introduce library for multi-GPU scenarios lib/intel_multigpu: Introduced gem_multigpu_count_class and igt_multi_fork_foreach_gpu Kamil Konieczny (4): lib/drmtest: allow opening cards out of order lib/intel_multigpu: Add xe_multi_fork_foreach_gpu tests/intel/xe_exec_basic: add multigpu subtests tests/intel/gem_mmap: add basic multi-GPU subtest lib/drmtest.c | 85 ++++++++++++++++++----- lib/drmtest.h | 1 + lib/igt_device_scan.c | 21 ++++++ lib/igt_device_scan.h | 2 + lib/intel_multigpu.c | 135 ++++++++++++++++++++++++++++++++++++ lib/intel_multigpu.h | 36 ++++++++++ lib/meson.build | 1 + tests/intel/gem_mmap.c | 77 ++++++++++++-------- tests/intel/xe_exec_basic.c | 36 ++++++++++ 9 files changed, 350 insertions(+), 44 deletions(-) create mode 100644 lib/intel_multigpu.c create mode 100644 lib/intel_multigpu.h -- 2.42.0