Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp3095881rdb; Mon, 4 Dec 2023 17:22:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IE7gW3MrXcuKQtgP013b5ulfSEwnMmoVwHIVTmQBpa4z9rJXLZ9AFWIeoJbxMhw/MzQb5WE X-Received: by 2002:a17:90b:1d11:b0:27d:12e1:94e0 with SMTP id on17-20020a17090b1d1100b0027d12e194e0mr422546pjb.36.1701739365473; Mon, 04 Dec 2023 17:22:45 -0800 (PST) Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id y7-20020a17090a134700b00286a26df523si2960217pjf.188.2023.12.04.17.22.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 17:22:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=G6JZ+St9; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 65ECD80477BD; Mon, 4 Dec 2023 17:22:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343831AbjLEBWf (ORCPT + 99 others); Mon, 4 Dec 2023 20:22:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229575AbjLEBWd (ORCPT ); Mon, 4 Dec 2023 20:22:33 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0C58AF for ; Mon, 4 Dec 2023 17:22:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701739359; x=1733275359; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=/KRnXauEAOtxAh8pRgl7NtYOoKySCCtw3a7e+b3zVG0=; b=G6JZ+St9HScEWCU4jZc80EP4PGZM9O0yyA99zWu7YMRR8TJcl/lw4k2N GyEc0grlYOrH1bp6uWfyvRZ2n6e6UFVpvIBgA7paLthohAqDwYcmepuuJ TUM05OPwMGzGufRJdnHrw4mdTebZuWgbl1hAtVQGQvYRILjW6Cc4Qn5PR +ej01rIMW8O0NdSu1Mulyc/cMKqlLSkrEBrcZMFAzm8IEeqo88+SE5zjN zvFj7dgvs1BTGiXX8tmLIkQ+dacdE/Fx+hU4R7o+VaHopvz0OlBN7hz6g ywKtP99BdIyaLwxXx9CJiopn9/ljqr+YLTP7Z5QYc/BS/PxBAfvcDH8QS Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="424982891" X-IronPort-AV: E=Sophos;i="6.04,251,1695711600"; d="scan'208";a="424982891" 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=20Winiarski?= To: , , CC: Rodrigo Vivi , Michal Wajdeczko , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Javier Martinez Canillas , =?UTF-8?q?Ma=C3=ADra=20Canal?= , =?UTF-8?q?Micha=C5=82=20Winiarski?= 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit 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?B?K0JvL3RtUHExUDdXSDlFTmFGbTNTSll4aitUMnVqSXNxdUZSdGZBbVIxK2Fh?= =?utf-8?B?MTFydjh6N2tnSytlMFJXMDl5aVJsSlh1R1NtdDE5clczV0tabUVmRTl3VVR0?= =?utf-8?B?R3NxcTlSYVVIQ2ZyOHRPcmhPN2tWaXBtaFdzMjZhcDg4R1dscmlnSmtocGIx?= =?utf-8?B?TzNZZktMcVB6YUF2OExqQXNlUmZmUUdNZ0NZaFJ4QS83TDM5WkJCNUltVnox?= =?utf-8?B?aE9RRm5zdkxWcnh4Z3hmMUZjbXNmZTNQMWRPZWZRYWZQcXJqRERGT3ZoNW1G?= =?utf-8?B?dHpXYU9YdW50ZGZBa3R6SlVoYU1NNy8reGdxMVhCZ1dmSXF3ZGFMa0Y1c291?= =?utf-8?B?M2lzNWQyYnR0VWQ2clJEUkJkWllnVEc0R091WmdQV3Q3L3NoRURWR1FtcDI5?= =?utf-8?B?anE3VjZNL21nOFFyeGd6MjdvS1NnVklDcTdNMDJ5Y1M2Z3d3NFEzdmlnSGhr?= =?utf-8?B?RFg1QTB2aC9ZL0dudGt2QVFHU2JnVDZoa0hvWGE2ejNRU1gwbDhINEJMZVZV?= =?utf-8?B?emlRUWFBS21ZSUcxK1loRjZ1OFNYM0VRL1NQcGR1N3dCdXJ3T0hLaUxydm9B?= =?utf-8?B?a1lZVnJJWXRUTzM0OU5zajY5d0J0MGhSbTh5L1c2ci9ycGpCdXpaa2MyL0cz?= =?utf-8?B?VjY4WEtDQkI5aDhzVXhKU256bnppR0xGZlpLVWRieUc3dWFDVGEzUlVqTXh4?= =?utf-8?B?aHZkeXUv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ymh3bWd5?= =?utf-8?B?VmJjcEJxOFNkdkRvVDJlTVJnNjR3QkhmYVU5VzBLL2gwS1E1T0w1MGoyU2hU?= =?utf-8?B?VlpqUEVNVVZDdytvLzRWL1FsNVBSTEpsL0RleUFUVjF0c2VKMzFzY1B1VDh5?= =?utf-8?B?VlNxOThnQXVhdjRPNmhWNDI5ZnVsWVQ1bHh6cDZQb3FuR1RqWHJCOUg3enIy?= =?utf-8?B?dUNld2VlOGhhbmpOaUk3emlTakt1L2NKeUp4bHJXT04xcFBUSkR2WjBlYUdy?= =?utf-8?B?NkRiVGs2SndjTFpVOFZIcVBJaEd1U0NWWEdLYjdKQXUrYkpXYiszSDhReG4v?= =?utf-8?B?YXJ4TDI5TVVuV1J6aVRQYy81ejJXOGxIZFpMWEgrN0xMU0ptRHV3bjJVZlR2?= =?utf-8?B?SnkvWGorSHhsY210bXhPZWV4STdkdnNta0pRUnFJaHN6MzFGNzlZUlRTNUdR?= =?utf-8?B?djJBb28wdG82STEySEMvSlBCbjVmWDJzQ21oc2Q1UERQWkcrelZMbkpFTGpB?= =?utf-8?B?UEt6N0FLWUtvVVpveEcrU2NPekgwQTZaY0RkU0tCcGhoZGVHY1pkVVYyczBm?= =?utf-8?B?bnc9PQ==?= 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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 04 Dec 2023 17:22:44 -0800 (PST) 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(-) -- 2.43.0