From patchwork Tue Dec 5 01:22:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Micha=C5=82_Winiarski?= X-Patchwork-Id: 13479276 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 C3838C10DC1 for ; Tue, 5 Dec 2023 01:22:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C9B1D10E458; Tue, 5 Dec 2023 01:22:41 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3341C10E376; Tue, 5 Dec 2023 01:22:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701739360; x=1733275360; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=/KRnXauEAOtxAh8pRgl7NtYOoKySCCtw3a7e+b3zVG0=; b=CV3F0PPAOsMBLfzegQGHCk+vFpMPwl2eVkuDvyZ3Vv+MsSCM39KJJx8p u4lmF/CCJOQrrKKEMDkUTKtFaE2zBO5jMhB0P4DhRxK+Y9q/3aTsJagIQ aoAteJhUiThoxhnRip0Sn40u13/7AA3/bcSkuGBdGohufr/jEDUBo522A ZXIQeFyA56uBe+SRQPkitV6fmtUiE87CdZcZGYSv3vEsjJRZ7FyfsZGGB iWszRWIioCZH3RmNFtMRt98oQo0G4K6ljfdqZBrTcGalZvH9Qgdy1wU5X Y87xS6y+O1CAT0RqjAE87uK1u/THe4Xb8siuGd9fxDpwPetv0qurhUi5N A==; X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="424982890" X-IronPort-AV: E=Sophos;i="6.04,251,1695711600"; d="scan'208";a="424982890" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2023 17:22:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="805089160" X-IronPort-AV: E=Sophos;i="6.04,251,1695711600"; d="scan'208";a="805089160" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 04 Dec 2023 17:22:39 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 4 Dec 2023 17:22:38 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.34 via Frontend Transport; Mon, 4 Dec 2023 17:22:38 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Mon, 4 Dec 2023 17:22:38 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i9EKMXhHTORsLHGaQs1tPev0O57QIBgotAHu28spi3pvl7pXOrdS1lnJ21eN3LadJUj/P+L69gMOXpi10HsMVeZGzOb38voVlxMnuZVdB0PKQAzro/SiAy67C+aUS/t9ZWF9NlBbvFuxwh1XSbVTrRn33dpbdmRSk5PF/l0ongrOu9lFg4ihH8LIx1R06u9ZjyL1jV51AAtGB9bx6oJ5M+M7Sy2a75ANNHp2/oaDSXFAVdi1x95XVZD1xxxVfamcsxI/l3YssL4LV6sqU3TeEqLeSjP6DtCP6mNkUc8KLfPlXUNY8AhwVFVM3EcIbrkGEQ9BUStyKLtTIHnyG0ZRAA== 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=rsoveNRYj9IEnYsjpcmWWEMQ1KU94lp3NVfwmulhFNs=; b=QjihE/5ZUJXzBBxzri00WJDs9jS/JfIq1Pzm/8LugV5odMVpgp6QNl7ej92LY/XjMLliY308ZTsw1C2Frmb0WArFcAsW18aLVfVPFjB1n3bM+Iy1pugxNxSwfvume6a6oGZdQfNkK9X7LZ2rgb8VawfVQbnjkAU9X3nOnBy8bxd4/5rK3XYvKjWOIFYWe9HOF6XpFq2Qb/T/par8f+cTUdLecf9qsB6tRTWalBew1fROS8KPt5EHV3rD7Ua5sIEFmNLbJWpEeRddupAoW1YUq50oHa80qhbzUxJ41ureI67oLUa5lcXCiOBw4oHl6tW6k238ek6LYQaO3FJFXDxDlg== 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 SJ2PR11MB7618.namprd11.prod.outlook.com (2603:10b6:a03:4cc::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.33; Tue, 5 Dec 2023 01:22:36 +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.7046.033; Tue, 5 Dec 2023 01:22:36 +0000 From: =?utf-8?q?Micha=C5=82_Winiarski?= To: , , Subject: [PATCH v2 0/3] drm/managed: Add drmm_release_action Date: Tue, 5 Dec 2023 02:22:07 +0100 Message-ID: <20231205012210.1491532-1-michal.winiarski@intel.com> X-Mailer: git-send-email 2.43.0 X-ClientProxiedBy: FR5P281CA0038.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:f3::8) To BL1PR11MB5365.namprd11.prod.outlook.com (2603:10b6:208:308::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB5373:EE_|SJ2PR11MB7618:EE_ X-MS-Office365-Filtering-Correlation-Id: e7ba5a4f-a4c3-4963-2cee-08dbf530a9b2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Qa8mQnIJvFCvhBsh6c8J3wUkoCg7lQwWjxXFhWH/MdeiPxod6PqfP2hxme5egNWWR6TupxqQStZ91hbkjioSooMzr66GnxrRhirUQPIk0cTeSR06xVyw+w/RN51RGapu7JRctqMa7U6XCmRnZtWRMHkGr910STdnmyuTvLRNckGDQXSD76bqKdyaRdNyM6kke9eterAAVTmcaBhsPqHMOzwweDETYUJaGIgbLHg4YTp+kFXVKmkgBMkQ8S3EPHhofEtRUZmqdU3tFC8210nFZyX0nws52YTfLQY1VTv5qbsvKwdDQ+UFWeVo17vFBg1pxsK36xlUzs2eMZWkH8nOTzWCuKbl4JUo3e5bnukWRsJU5ageqf6m2ASFQS7VpaIlXjKh2p8sLbGwY/2x9wPbjpLsfwwgX3d96TebzeQEOCRtWbau4P41Nu+/muvXPkgI/laqHQMiPfSrSqjMRzsSC/VJLpSWZif52BQK10lIWuiYTF+q6oRU3JO2HsBk3YgJfahoTNai/2ICBMzjrYB3ARWlm0kzSV+45A5ZnD/xAnc= 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)(396003)(39860400002)(346002)(376002)(366004)(230922051799003)(451199024)(64100799003)(186009)(1800799012)(5660300002)(4744005)(86362001)(4326008)(8676002)(8936002)(2906002)(7416002)(41300700001)(6512007)(36756003)(1076003)(6506007)(2616005)(82960400001)(6666004)(83380400001)(6486002)(478600001)(26005)(38100700002)(316002)(54906003)(66476007)(66556008)(66946007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?+Bo/tmPq1P7WH9ENaFm3SJYxj+T2?= =?utf-8?q?ujIsquFRtfAmR1+aa11rv8z7kgK+e0RW09yiRlJXuGSmt19rW3WKZmEfE9wUTtGsq?= =?utf-8?q?q9RaUHCfr8tOrhO7kVipmhWs26ap88GWlrigJkhpb1O3YfKLqPzaAv8LjAseRffQG?= =?utf-8?q?MgCYhRxA/7L39ZBB5ImVz1hOQFnsvLVrxxgxf1Fcmsfe3P1dOefQafPqrjDDFOvh5?= =?utf-8?q?mFtzWaOXuntdfAktzJUhaMM7/+xgq1XBgWfIqwdaLkF5sou3is5d2bttUd6rRDRBd?= =?utf-8?q?ZYgTG4GOuZgPWt7/shEDVGQmp29jq7V6M/mg8Qrxgz27oKSgVICq7M02ycS6gww4Q?= =?utf-8?q?3vigHhkDX5A0vh/Y/GntkvAQGSbgT6hkHoXa6z3QSX0l8H4BLeVUziQQaAKmYIG1+?= =?utf-8?q?YhF6u8SX3EQ/SPpdu7wBurwOHKiLrvoAkYYVrIYtTO349Nsj69wBt0hRm8y/W6r/r?= =?utf-8?q?pjBuzZkc2/G3V68XKCBB9h8sUxJS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Kb7JAu+bJWb+3H8Qxn/arxL29MUnWRziTPc/5?= =?utf-8?q?z2W8lHdZLXH+7LLSJmDuwn2UfTvJy/Xj+HxlcmtmxOeexI7dvsmkJQRqIhsz31F79?= =?utf-8?q?YRTS5GQv2Aoo0to6I12HC/JPBn5fX2sCmhsd5PDPZG+zVLnJELjAPKz7AKYKoUZox?= =?utf-8?q?G+ScOzH0A6ZcDdSKBphhdeGcZdUV2s0fnw=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: e7ba5a4f-a4c3-4963-2cee-08dbf530a9b2 X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5365.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2023 01:22:36.6552 (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: PMUHkZFOxJ+Y5i/yfACQu1DezGz1YYcNnyEoQm97l6Ls4YusfDhIQqW6b+syRC4xkaI2K3K0MWI/LiaM6r9vzzzoa5lsKALB1bI74idb1go= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB7618 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: =?utf-8?q?Micha=C5=82_Winiarski?= , =?utf-8?q?Ma=C3=ADra_Canal?= , Javier Martinez Canillas , Maxime Ripard , Thomas Zimmermann , Rodrigo Vivi , Michal Wajdeczko Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Upcoming Intel Xe driver will need to have a more fine-grained control over DRM managed actions - namely, the ability to release a given action, triggering it manually at a different point in time than the final drm_dev_put(). This series adds a drmm_release_action function (which is similar to devres devm_release_action) and a simple test that uses it. v1 -> v2: - Split the test changes (Maxime) - Simplify priv lifetime management (Maxime) MichaƂ Winiarski (3): drm/managed: Add drmm_release_action drm/tests: managed: Extract device initialization into test init drm/tests: managed: Add a simple test for drmm_managed_release drivers/gpu/drm/drm_managed.c | 39 +++++++++++++++ drivers/gpu/drm/tests/drm_managed_test.c | 63 ++++++++++++++++++------ include/drm/drm_managed.h | 4 ++ 3 files changed, 91 insertions(+), 15 deletions(-)