Message ID | 20240115171351.504264-4-michal.winiarski@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> 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 8DEDFC47422 for <dri-devel@archiver.kernel.org>; Mon, 15 Jan 2024 17:14:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 015D110E056; Mon, 15 Jan 2024 17:14:20 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by gabe.freedesktop.org (Postfix) with ESMTPS id E613110E056; Mon, 15 Jan 2024 17:14: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=1705338858; x=1736874858; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=l5jgVpTX7BgM1wV0yfftev5dmoEkscpbjIvJLex704s=; b=gBlkkAi0WCvhkAWMenE674IE7ZRv9tznp9tZ7aOwjTOZ+WWf7CnVoMnj /7q6ajcc3N3ditJz3K6hdxEtLThn43/uHQ6A0AclEHzn+yF3uEwWe/Un6 w5OxcnIz44sI5XGYwyn8w0akAKN98IJrlcdSW6TLEXTtFNnvcqs90uPo9 YFFh2skmTx8jow5E8YZRwEXjo+uGLzqaiBLKNy3MxCWJ1nms1I5NtXIOQ La7vPRi9ua6CCKLobNs3BLly3jqZZqdrfz49U7pbtwmWHxJyDjLmRZ5f2 2tukDJSAXUhBYgHV10ALpg9jpcjsjZpfZmk6Ht24h2c8Af/317MTXY1ZV g==; X-IronPort-AV: E=McAfee;i="6600,9927,10954"; a="21139050" X-IronPort-AV: E=Sophos;i="6.04,197,1695711600"; d="scan'208";a="21139050" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2024 09:14:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10954"; a="854063853" X-IronPort-AV: E=Sophos;i="6.04,197,1695711600"; d="scan'208";a="854063853" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga004.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 15 Jan 2024 09:14:17 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 15 Jan 2024 09:14:16 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 15 Jan 2024 09:14:16 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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; Mon, 15 Jan 2024 09:14:16 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.169) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 15 Jan 2024 09:14:16 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D3SAmul7HmyKTzpnDG0mWEI9tmoxyxM9TzoII0ltO3IVk5TyOWk+Ijus0HwwmifJsLH893LZO+LSQHMSwUd0HpPbKkGMk0tUiyuyej3CEvauraTdEEOAQZsEeTgI+mS89Y2x4VQNtIRASB5++s/nDlagKaA+AwZRYuELcd3IUWuYDhascrgYzv7YW6m/+FRWcdsgiK1629DOfk2WZ5aao30CxD5Dhw2x2BJg4YL54/wcV0AKc/S/Tz9VBAfY23Mlsp5To1fr3nX/LGrWsWvYjysx2K6jeQN6Vf8+T796+WFZI5/MeB8FLCLpu8DeQ0ONA/ur8HqChcSSDFKTmbuqFg== 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=TKmUpEHsTAA5LmPQv0vhb4Dg/mkUpxJtyPu13qA2vcs=; b=QMKAPeiNVQ8a1mjuR3vjGx9YzH+ciWano6VcywvBJA69s7zu8LbXecndsz+A9rGwr1o12nltaODalUsWrk4lHrBAnF0l/fgfkt/NSo7wKdcSSgskkergrbLVh5Fwq3lxaqCVxxZOOA/U1PcAjolOyTUJgh3wmjINNhOuNtAYV2d/eJayBr4DQ57QDbMO/P7s4leHb7U3EuQyZEswofOLmlF6FoAI/3wCKEVmYuzt/s6jO82M3+JbzXgTKe9ssCGm47wn9WV12RC/u9JmTEm46DKSPu6nlM9RMAOvFVcGS6B26j7jbJofpsEulC2RRFTmVyEtmiEFhzqbaIHl4kj9bg== 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 DM4PR11MB5373.namprd11.prod.outlook.com (2603:10b6:5:394::7) by CY5PR11MB6391.namprd11.prod.outlook.com (2603:10b6:930:38::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.18; Mon, 15 Jan 2024 17:14:14 +0000 Received: from DM4PR11MB5373.namprd11.prod.outlook.com ([fe80::f105:47dd:6794:6821]) by DM4PR11MB5373.namprd11.prod.outlook.com ([fe80::f105:47dd:6794:6821%4]) with mapi id 15.20.7181.020; Mon, 15 Jan 2024 17:14:14 +0000 From: =?utf-8?q?Micha=C5=82_Winiarski?= <michal.winiarski@intel.com> To: <intel-xe@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH v5 3/5] drm/tests: managed: Add comments about test intent Date: Mon, 15 Jan 2024 18:13:49 +0100 Message-ID: <20240115171351.504264-4-michal.winiarski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240115171351.504264-1-michal.winiarski@intel.com> References: <20240115171351.504264-1-michal.winiarski@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: FR3P281CA0166.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a0::9) To DM4PR11MB5373.namprd11.prod.outlook.com (2603:10b6:5:394::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB5373:EE_|CY5PR11MB6391:EE_ X-MS-Office365-Filtering-Correlation-Id: 0a9afb84-5494-468e-d523-08dc15ed6630 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bsagvStO+ebbMnoPwyEnj96TDRiNFHNRZgOiDltMQbw20m1cGOb4tP0c5aV4TSG7+mRMCsCSHTIwHaxUFCHINSj44ejr/+l4pMtqOTABrbKEvv9af94uQDn+GkAMDEUNzhn7XhLdYjrzhKL5C1Ly2BNI4AB5NasfPhoDdvHV6g+iYYBjgFAIw2CFUhZ/+4QzRkIJuEC68uhM4Kn/oVYnuxr431qr9Ktn0qFkEIT0rLAXJ+AaVwlshm+if9cIbHOVg189Jm6INKD6oiSmoydBNADmUhQwj85Z8RdHCIdeGoiRxBJfOjSUDp0U2hUwWxYod+AVHdFIrvUP0J2ZeZt2DT4HjBaVJ9Yhn+ZV8WlmGgbJVgyYGj83nxxE7kLAdL+tnbPgNxpJ4KIjh5O4oYaHurfLAOnFwshtqzJ5ykcfkavRDKqNbJF6PXSYmUbAPf98qlaryJk+cS5kFiP3tTq9eZ7XHax2Vg2ji8vz+VSLPRBXhjbhKYJODA7VfJOd+vnz0/YztTjrUKTJprkfnnAlDbIGj/PQ1pyuEGJypKgqOr/5uz8HXKw0RVmVOM7BwKdR X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5373.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(136003)(346002)(39860400002)(366004)(376002)(396003)(230922051799003)(451199024)(186009)(64100799003)(1800799012)(66946007)(6506007)(1076003)(6666004)(2616005)(478600001)(82960400001)(66476007)(86362001)(316002)(6486002)(66556008)(26005)(54906003)(5660300002)(8676002)(36756003)(6512007)(41300700001)(7416002)(38100700002)(4326008)(8936002)(2906002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?M7bdD4PWeWWsGMtA1tTuccucUuws?= =?utf-8?q?kHKi6VLEo0DU4EOlo/zWqRlk6Aac8gSExQsg/j/ypLlAbehZ3Q2VtKSbb8J40qRJh?= =?utf-8?q?/L7gPxaO3kAdhlmqRxUp9g775m242TozQOlT2wvJ7prt9LCFSMPkropUC351wc1pO?= =?utf-8?q?h7YD23hr+DZQUo+KtNPUHtZanYo2jvGHVqQTQJqTLZBC8HHq+2c/KXu4fXhtdUWii?= =?utf-8?q?/lZF0fix7n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rivfp+zVC3bQiWsRdomB7ODTw9RYFSFvZWR23+t0p7GajY8+?= =?utf-8?q?pIswGK+nwqlt58u7VSzo+AL/IO9fiBGyM8g3QSio3wWXXtVBBYBD02iGBFnglgzFF?= =?utf-8?q?qnaygkUPejvQbj0bbVgQZk1T3ghfRus30NQvaigjGjmfadHRJstwlYw4Hiwg3Kdnf?= =?utf-8?q?3KqxmCweWdn6Hozf28F9SyywUqiMcjfu/fRjriditgzEiGT3xfdwe4QMhpeW1A9gl?= =?utf-8?q?KvTvkSjhF9vsXqnvky2tYWhESlh/qfck44/qHkzscNDOzaFq268xkvOFAMPHtk+rR?= =?utf-8?q?1O7nT87CQ3n5Lv4vmwysr4WuCsYZSp/AtLJpuDknqIgUfQsiKGDxvPqpwqwr5m9mQ?= =?utf-8?q?Lbv1rRItPG69rtUiahoeMGi0T6wX4UhAx1ofAEQFTDfXzwkiOb79KdPFi0GlWjFUr?= =?utf-8?q?EtAD7stbtWyLPr0JkGihL1lSdZLlA20Atw=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 0a9afb84-5494-468e-d523-08dc15ed6630 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5373.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2024 17:14:14.6721 (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: y7+5XYVt1wlySRf5RpGAJUcmoWB+5Wxqg7LjPPqAO3AKSDu79/7ncg2Aw8yeEDf7OEcDIYt/rALN5mzUYvwkNFdjj6Htz5yiVmMSWA+VCCM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR11MB6391 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 <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: =?utf-8?q?Micha=C5=82_Winiarski?= <michal.winiarski@intel.com>, =?utf-8?q?Ma=C3=ADra_Canal?= <mcanal@igalia.com>, Javier Martinez Canillas <javierm@redhat.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, Rodrigo Vivi <rodrigo.vivi@intel.com>, David Airlie <airlied@gmail.com>, Michal Wajdeczko <michal.wajdeczko@intel.com> Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> |
Series |
drm/managed: Add drmm_release_action
|
expand
|
On Mon, 15 Jan 2024 18:13:49 +0100, Michał Winiarski wrote: > Add comments explaining the intention behind the test and certain > implementation details related to device lifetime. > > Applied to drm/drm-misc (drm-misc-next). Thanks! Maxime
diff --git a/drivers/gpu/drm/tests/drm_managed_test.c b/drivers/gpu/drm/tests/drm_managed_test.c index f85dada4de0a9..b5cf46d9f5cf8 100644 --- a/drivers/gpu/drm/tests/drm_managed_test.c +++ b/drivers/gpu/drm/tests/drm_managed_test.c @@ -24,6 +24,10 @@ static void drm_action(struct drm_device *drm, void *ptr) wake_up_interruptible(&priv->action_wq); } +/* + * The test verifies that the release action is called automatically when the + * device is released. + */ static void drm_test_managed_run_action(struct kunit *test) { struct managed_test_priv *priv; @@ -38,6 +42,11 @@ static void drm_test_managed_run_action(struct kunit *test) dev = drm_kunit_helper_alloc_device(test); KUNIT_ASSERT_NOT_ERR_OR_NULL(test, dev); + /* + * DRM device can't be embedded in priv, since priv->action_done needs + * to remain allocated beyond both parent device and drm_device + * lifetime. + */ drm = __drm_kunit_helper_alloc_drm_device(test, dev, sizeof(*drm), 0, DRIVER_MODESET); KUNIT_ASSERT_NOT_ERR_OR_NULL(test, drm);
Add comments explaining the intention behind the test and certain implementation details related to device lifetime. Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> --- drivers/gpu/drm/tests/drm_managed_test.c | 9 +++++++++ 1 file changed, 9 insertions(+)