From patchwork Wed Apr 19 17:56:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Francois Dugast X-Patchwork-Id: 13217223 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 EF2F4C77B78 for ; Wed, 19 Apr 2023 17:57:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8A42510EA44; Wed, 19 Apr 2023 17:57:19 +0000 (UTC) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6E79D10E1D2; Wed, 19 Apr 2023 17:57:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681927037; x=1713463037; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=f8/nfVdvP4ClyT/k1TwiLHXxVJFhZZaXS4mH/ZZ68U8=; b=HfORQcoihyAr1RkG/4LfTCZsb2KcDZd7NsnwxfrPXmCeR+NrdIy3Zhtm 54irHHkYrJ7XtDiSaxvYVC3dSXEgpJnPrSFyuR8zohncy2eu3h7Gl0bp4 ndke9cFSSvqI4e28TPUw+PoAP8SssYHep/Vljr1l0pcecAnhknLEUUSGS 7bcfsb1NDiKWftBKZby5/0z1DoQSTXY5y0q4DKTU9GkLK1xqyJe51Copm ej+bEY1ifu5+bZ+ejerVk9QnI3QylAtINN+iNuY1D2mwwn8eY67sORBBF pCUXTjpQH4AFmh59/eeS4DCbojwg9ctMMSfYTlw34aUXxlBpX67k7tQ1n w==; X-IronPort-AV: E=McAfee;i="6600,9927,10685"; a="345519858" X-IronPort-AV: E=Sophos;i="5.99,208,1677571200"; d="scan'208";a="345519858" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2023 10:57:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10685"; a="756192632" X-IronPort-AV: E=Sophos;i="5.99,208,1677571200"; d="scan'208";a="756192632" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga008.fm.intel.com with ESMTP; 19 Apr 2023 10:57:14 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 19 Apr 2023 10:57:13 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 19 Apr 2023 10:57:13 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Wed, 19 Apr 2023 10:57:13 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.48) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Wed, 19 Apr 2023 10:57:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eoNaXZIpsxbW2B07CxADPHAvjcDbp6DvUVAzVlTe483YkPmnBYJxWg4mKw+ZndURNuUVAFMPSNkYf9tb9pOAGSSgLZPsrxi2PIJTUNegCJGE6PW6GCVagcha1z0uMPQlOA9y63mNJtvcXU4/xlskNPEGBrWlevL0YXmLPP2iPNPIRU5hltnHAupI1zOXzrpBRd/R0fyVvL3lZfuoq8Zcq77jYRxbwns2F3NuuMEJta81HrDjzazVXvswbJZ4QCJ2lTJlyvGlAkHj6iWkIPYoplsqnqpvUqh14TU2jkO/UgjCvzWBtocwKu/2yh4DmRPjw9usbO/mi+RyQgJilDU0Ag== 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=DIfRB8C7nexqOBgHPddZNEUlOAavYZotyg17KsdxhBA=; b=ADPhvaNsVdI3T60AtYIzo0BeXC4Arrrp7T1bU5gXfa19UKtyChpYNQHNjTlDu1DqAFU06yTaC6edu7RvwjU/iNyHLbALnzKDPjX8tDG6MOFZngPpEFGZe2vUg4glDyS67+e3zVt0Icgn2+3uBQmBisa7jFroWcVxFppJdlkgyZH1EpENbHSD+esYuLnxMuiWRIn/o9d6xdDgK9YkHvyzQUONa/F4j7zU+bIfYrtjJNTgXWPLbJRHBCV9jHInFQoRq4r24m7vfLLgVV6I5W6RfqrR+wUpwCFLa3l4/wstTFsqh3S18RJcr5CcuzmdVpYO2xbLWJa+wh/V+thbAEdulg== 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 DM4PR11MB5389.namprd11.prod.outlook.com (2603:10b6:5:394::17) by SA1PR11MB6848.namprd11.prod.outlook.com (2603:10b6:806:29c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.45; Wed, 19 Apr 2023 17:57:11 +0000 Received: from DM4PR11MB5389.namprd11.prod.outlook.com ([fe80::31f7:5096:35b0:b458]) by DM4PR11MB5389.namprd11.prod.outlook.com ([fe80::31f7:5096:35b0:b458%2]) with mapi id 15.20.6319.020; Wed, 19 Apr 2023 17:57:11 +0000 From: Francois Dugast To: Subject: [PATCH v3 0/3] drm/xe: switch to using drm_exec Date: Wed, 19 Apr 2023 19:56:47 +0200 Message-ID: <20230419175650.3259121-1-francois.dugast@intel.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: LO6P123CA0005.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:338::10) To DM4PR11MB5389.namprd11.prod.outlook.com (2603:10b6:5:394::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB5389:EE_|SA1PR11MB6848:EE_ X-MS-Office365-Filtering-Correlation-Id: bc61d57c-4890-440c-bd59-08db40ff7fe6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ufpzyGI1koBV6hPFrxic/DoWXPExYCveEor3nNRri1+Cs7GQSGjYUsDmZysB7tDh255Gku5hnfg0j1sXtgWB8hvRYrRUc1BXX7QS6+BEfHABDjwwvHH5vLWUKAzXTuhhQ+E5TsWWDFN9L7B1GFwQShj2eyN7gpC4Bt/z6tNh8IUNWXzlNNPfwE7Mw7zkrB9L1p1pQmWb1N9AHXOhoZTwv7ou+t6H1rJ+aXLMxhdmGEd3kd2Oq2QNsozSQTgtEzmbXRH1GkDGfNXPMjzaXU3PhfNoWqfofSfoofFZaS90yX/FvGDqemfG7ybWE+YzhN9r4ftKyN+SNY0K1cUwBOtGKzPRoGjrTakByUoCr9JGdZreYk9AkxTWlCwLJ0zMLgkR9YMy0ox9QhRUOjVZ8wTPo7l1bu/MFROsVxevZOYhe3ytmHwyzydLH0pKQIqaPdMvjct7cTZOJF9VunuSNuIOVaTpCnfCjPeT0xkA0jj7u8cwyMc9n2aUsMiICt6AU5V03mMRM3Bp10G7/JLB3CB+ew== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5389.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(136003)(396003)(376002)(346002)(39860400002)(366004)(451199021)(36756003)(4326008)(316002)(6916009)(66946007)(66556008)(66476007)(966005)(6486002)(41300700001)(6666004)(478600001)(5660300002)(8676002)(8936002)(2906002)(44832011)(86362001)(38100700002)(2616005)(107886003)(6506007)(1076003)(26005)(66574015)(83380400001)(82960400001)(186003)(6512007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?M8TiOg2JNINZz56I2VD1riTuADEh?= =?utf-8?q?8klvPFdz0IWyjHHAk3lxMPRlY4WKQJTUBCi+tFKny9kNpF3zAoopiCMyn2y1ElYlc?= =?utf-8?q?W5AYwWdoA/gcsZeD7d70bhVLjsi29DixA+yRgFh2jFgjbcbTapKqSs/75yW/mGCBu?= =?utf-8?q?PXv4KiAphdfEuEcnpS/3g8LB+ljRAt4foPNjhdj4tX7Ipcq7CkhsEkQiAgKmuVuGK?= =?utf-8?q?nP3La+hZ+Z++nTfDN2g5kbaBpM2HWbl3ohRyzyS2y1AW6f76J6FyIyrfFHYJVfTJg?= =?utf-8?q?arAaCnAZUKQenxYZ0jnIALR4E1Ari1Hz9Um4/Xkk91gejOR8/HPvkM3ZVQCIIHBqC?= =?utf-8?q?C200VGPUL5EvDsjOtbUOdHza6q91iZbuav0eBl5mR+bt5exkmlhc4KyWqruaeJNN5?= =?utf-8?q?NiMoz7KtTUFkMHtXPiOZdHcyTXg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DgSrk84FMa/no5CMNiJ60DmtVL?= =?utf-8?q?J3TuYvoxipSW5fEzt+05eY3KNw2WM42/azHO87vwK66ZGKT8NIuSYRdqa3i8Py2+z?= =?utf-8?q?ruHrMZPvFfhOy8QEjnhhS1sWQVJaZEMypZkl6EP8SABleezzV6IhhL6uhJESFPPU1?= =?utf-8?q?re0CYJiLGMHJ3D3xmvb6KGl3CsGIlpKWJqCwzEhuU20uPhVZW6qeVaejrkPwsk28V?= =?utf-8?q?xWdvrtUw+k2KycacvrMb9FlAMesxeR1zKw=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: bc61d57c-4890-440c-bd59-08db40ff7fe6 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5389.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2023 17:57:11.1873 (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: LFW6NR6pFxVEZK8sEuB6uUoQk1fmWj+0PqGgWnc1V74nvnk+jBt6VKVC0kCxYFHBcQw3AN7IWp2fSQnnXhTGXjXOOZZFt8X4qiod27QgWRI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB6848 X-OriginatorOrg: intel.com 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: , Cc: matthew.brost@intel.com, Francois Dugast , lucas.demarchi@intel.com, dri-devel@lists.freedesktop.org, dakr@redhat.com, christian.koenig@amd.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This makes Xe use the new drm_exec helpers provided by this series, which is not merged yet: https://patchwork.freedesktop.org/series/114464/ with this fix: https://patchwork.freedesktop.org/patch/530670/?series=112994&rev=4 v3 includes code shared by Matthew Brost. v2: add a first patch with squashed dependencies (Lucas De Marchi) v3: - remove "RFC" - add dependencies as original patches - move drm_exec calls to xe_vm_lock_dma_resv/xe_vm_unlock_dma_resv, use new helper functions xe_vm_bo_lock/xe_vm_bo_unlock, fixes in drm_exec calls (Matthew Brost) Christian König (1): drm: execution context for GEM buffers v3 Danilo Krummrich (1): drm_exec: fix double dma_resv unlock Francois Dugast (1): drm/xe: switch to using drm_exec Documentation/gpu/drm-mm.rst | 12 ++ drivers/gpu/drm/Kconfig | 6 + drivers/gpu/drm/Makefile | 2 + drivers/gpu/drm/drm_exec.c | 248 +++++++++++++++++++++++ drivers/gpu/drm/xe/Kconfig | 1 + drivers/gpu/drm/xe/tests/xe_bo.c | 17 +- drivers/gpu/drm/xe/xe_bo.c | 29 +-- drivers/gpu/drm/xe/xe_bo.h | 6 +- drivers/gpu/drm/xe/xe_bo_evict.c | 24 ++- drivers/gpu/drm/xe/xe_bo_types.h | 1 - drivers/gpu/drm/xe/xe_exec.c | 30 +-- drivers/gpu/drm/xe/xe_gt_pagefault.c | 56 +----- drivers/gpu/drm/xe/xe_vm.c | 287 +++++++++++++-------------- drivers/gpu/drm/xe/xe_vm.h | 29 +-- drivers/gpu/drm/xe/xe_vm_madvise.c | 36 ++-- include/drm/drm_exec.h | 115 +++++++++++ 16 files changed, 615 insertions(+), 284 deletions(-) create mode 100644 drivers/gpu/drm/drm_exec.c create mode 100644 include/drm/drm_exec.h