Article View: org.freedesktop.lists.amd-gfx
Article #1RE: [PATCH v3 3/5] drm/amdgpu: fix the eviction fence dereference
From: Liang, Prike
Date: Tue, 06 May 2025 02:19
Date: Tue, 06 May 2025 02:19
43 lines
15348 bytes
15348 bytes
[Public]
> From: Koenig, Christian <Christian.Koenig@amd.com>
> Sent: Wednesday, April 30, 2025 7:58 PM
> To: Liang, Prike <Prike.Liang@amd.com>; amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian
> <Christian.Koenig@amd.com>
> Subject: Re: [PATCH v3 3/5] drm/amdgpu: fix the eviction fence dereference
>
> On 4/30/25 04:40, Prike Liang wrote:
> > The dma_resv_add_fence() already refers to the added fence.
> > So when attaching the evciton fence to the gem bo, it needn't refer to
> > it anymore.
> >
> > Signed-off-by: Prike Liang <Prike.Liang@amd.com>
> > Reviewed-by: Christian Kรถnig <christian.koenig@amd.com>
>
> This is a bug fix and as such should always come as first patch in a series.
>
> Please make sure to commit this one to amd-staging-drm-next ASAP.
Thank you for the reminder. The eviction fence release total fixes need to include the patch#1, but this fix can be pushed separately. I have pushed it now.
> Regards,
> Christian.
>
> > ---
> > drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c | 7 ++-----
> > 1 file changed, 2 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c
> > index 6c9b2b43a929..7a5f02ef45a7 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c
> > @@ -189,7 +189,6 @@ void amdgpu_eviction_fence_destroy(struct
> > amdgpu_eviction_fence_mgr *evf_mgr) int
> amdgpu_eviction_fence_attach(struct amdgpu_eviction_fence_mgr *evf_mgr,
> > struct amdgpu_bo *bo)
> > {
> > - struct dma_fence *ef;
> > struct amdgpu_eviction_fence *ev_fence;
> > struct dma_resv *resv = bo->tbo.base.resv;
> > int ret;
> > @@ -205,10 +204,8 @@ int amdgpu_eviction_fence_attach(struct
> > amdgpu_eviction_fence_mgr *evf_mgr,
> >
> > spin_lock(&evf_mgr->ev_fence_lock);
> > ev_fence = evf_mgr->ev_fence;
> > - if (ev_fence) {
> > - ef = dma_fence_get(&ev_fence->base);
> > - dma_resv_add_fence(resv, ef, DMA_RESV_USAGE_BOOKKEEP);
> > - }
> > + if (ev_fence)
> > + dma_resv_add_fence(resv, &ev_fence->base,
> DMA_RESV_USAGE_BOOKKEEP);
> > spin_unlock(&evf_mgr->ev_fence_lock);
> >
> > return 0;
Technical Details
Message-ID:
<DS7PR12MB600548A81FE6C675FA062376FB892@DS7PR12MB6005.namprd12.prod.outlook.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf9.newsdeef.eu!nntp.lore.kernel.org!not-for-mailReferences:
<20250430024054.4093239-1-Prike.Liang@amd.com> <20250430024054.4093239-3-Prike.Liang@amd.com> <5f08bb2d-e9c4-4d0d-b333-baf0355c23af@amd.com>Show Full Headers
Complete Article Headers
Message-ID: <DS7PR12MB600548A81FE6C675FA062376FB892@DS7PR12MB6005.namprd12.prod.outlook.com> Subject: RE: [PATCH v3 3/5] drm/amdgpu: fix the eviction fence dereference Date: Tue, 6 May 2025 02:19:13 +0000 From: "Liang, Prike" <Prike.Liang@amd.com> References: <20250430024054.4093239-1-Prike.Liang@amd.com> <20250430024054.4093239-3-Prike.Liang@amd.com> <5f08bb2d-e9c4-4d0d-b333-baf0355c23af@amd.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf9.newsdeef.eu!nntp.lore.kernel.org!not-for-mail Return-Path: <amd-gfx-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 ADD50C3ABB6 Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 259DE10E157; Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="vnybJwhT"; dkim-atps=neutral Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2050.outbound.protection.outlook.com [40.107.92.50]) by gabe.freedesktop.org (Postfix) with ESMTPS id 51EE410E157 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KopUFueKuHzXc4zNkJpgXjdtuWfnvTfagqRy1NYuAeoCubL2c4WYXOTe9sqfVuPypWfR4yxmWbDX0FeS7sJoutdbwWCMNaHeJ9+6fsNtJPNU1YUxMAaiLzRhJtzfEl+3Vpl14CpKmE/FGo22xeGVfLJFZZfz7TFU4TQ7opH4o+c3iy2yALnu7Ln5xZa9Y7ryaMDAnqNDd44VKeLl+qh6cGz+pQb7IA3NhLczbaLed2m1mKIVn9p8DoK4aiyvetOuQSmQwGxGqNEAB23QIsEdLSrzPQQw7o3sdV7Fsy+/Er/rozogqtyWMqw9Yc+T6A/wdMd4w0AGfE4LHTW4hUADPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=50n7laqNoQH0o7OPFWWPhYu4L1Vj6tmsTlxj4j6m9sc=; b=wARKIOv36z5Nuv/S15NYV6OgDTruiv/l7t9C5FpBqbXeSvsCA4juWY33JVCDiAF1I8i/AR/KRh1pvbd9qX/dXTEJUjmbLNvtkjbbzqIL95gzyZJsR9pN3nIkQuS6tRsDnXkufgs2oUsUGQC1pcwGqruN6h/+3GFOdVTUfDNFU4POkBE9T948G61YfRlXPuDMTRxDj0r3EsVT+bYa5l0a8VLBvGX0AiVrqsx1wj9eoTuki9cwWu8PWtg9d37hkZAkkycChGgIsroKdiuqAmTnP29XmTfnJpyESFzMDPq3G98xg8pzscyFyhqVbUagz4/tuglgu+qkG/6nCM9684+2XA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=50n7laqNoQH0o7OPFWWPhYu4L1Vj6tmsTlxj4j6m9sc=; b=vnybJwhTxKsqYJDzgB0CV2w7DvZ/0v1B6v3zpBN3QFLThVeGg2gnfT2QqgIPT8afQitst1X0Geil22ZnxAy4ew2IyOFFWGKvvYqpuEIMbkk5I5MLGQELS4p0NHTJNCPBv6RElxgmJEqkaMdsXyweQibnjOHOdl18PcSVLwX6qxU= Received: from DS7PR12MB6005.namprd12.prod.outlook.com (2603:10b6:8:7c::17) by PH7PR12MB6955.namprd12.prod.outlook.com (2603:10b6:510:1b8::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id Received: from DS7PR12MB6005.namprd12.prod.outlook.com ([fe80::4dc0:f34c:9e7e:ccb]) by DS7PR12MB6005.namprd12.prod.outlook.com ([fe80::4dc0:f34c:9e7e:ccb%4]) with mapi id 15.20.8699.022; Tue, 6 May 2025 To: "Koenig, Christian" <Christian.Koenig@amd.com>, "amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org> CC: "Deucher, Alexander" <Alexander.Deucher@amd.com> Thread-Topic: [PATCH v3 3/5] drm/amdgpu: fix the eviction fence dereference Thread-Index: AQHbuXlWR+Mh1AtXUkqLNaxozVn83bO8G1gAgAjKtWA= In-Reply-To: <5f08bb2d-e9c4-4d0d-b333-baf0355c23af@amd.com> Accept-Language: en-US Content-Language: en-US Msip_labels: MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_ActionId=4b249e16-230e-4c02-ad01-e3f4db71826f; MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_ContentBits=0; MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Enabled=true; MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Method=Privileged; MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Name=Open Source; MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_SetDate=2025-05-06T02:13:59Z; MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Tag=10, 0, 1, 1; Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; X-ms-publictraffictype: Email X-ms-traffictypediagnostic: DS7PR12MB6005:EE_|PH7PR12MB6955:EE_ X-ms-office365-filtering-correlation-id: f91241a2-f35c-4de2-9634-08dd8c446517 X-microsoft-antispam: BCL:0; X-microsoft-antispam-message-info: 9/Lf+IxejpTMv44l4ozv/y9Pve57ur75QowxxmSy3wNP0u0Ra8YHqH9yeVB8Xew/zB4CwD9IB6+Ny1mndmLYkFoAq0Q3aUEmYfbBMJPX+IiepBTPzV+EOIaN6t/2S1W1O8z7QeJ38BAm+ex4ZbGEJ9Ly+AcghFhEwBKNXfi+WbNuBMnyc9A4fp/h6C2d6+rLcl/I3trwOTLzP/W07ithZVEWLrmYndd82WQ7iM2jmgoKl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T2E7chM6/vZh40IGhGx0jLulDJJotWFbL8BGn6bxN4Dm7XJY86bMud5om3bfgMXDunpdWFKAOFUTXyocU0ndz/lWqNWGM4hqr3E0pLcrxrmCr5e3noIGtnzV+Q9rUA+423iflnsqGzK5I+wWMvzTKROEIQWcrWwDQKOC6lKGaiL/JdZUFZmFFpo7BCB/flARtvDjZNlOxcnY1EOLOA= X-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS7PR12MB6005.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014)(7053199007)(38070700018); DIR:OUT; X-ms-exchange-antispam-messagedata-0: IxmBKFXoGRfzoBgBMr79MbpNJJAwWgwUafJjCO5TnbA7qYxFzVskMvNCbo37nmKDEPL6pLLFMad4vZTGKA/2MkPtMS4Tpd7a0IaEjFqNOLR3Zj5n+QCSlaysVhRA6uUyuLHMj8W7oORFtha7m3Bzb7RdD1SV8XiXm2GISZQAjvGWXlXblgosB4Y5pSpHLKTtSbuNvitY3xXG9WO7w9eWN33Rg+VBBLc1yV6Nmcvhhts3egKshhpHpAs6RZZ1irNBFV/M8ZeGj3NTaAW/+lIZGIoQISXK4aqIWxd/RoK2XNwjvq7FvUkHe4tXb/2zcaL8A7DAlCZMwWrQtYxSo9PwvZOzvjCSldQMCuKHo5bSOQHrC3TRXHg5LpxQ0FatBwAOs90a9/iVbdWzGVsi0xLTwI0lo2bGEOOQHhvD6H3wuBuEy312r0BJHQ/Q6yotPxrvNEmFQwYyiQgAZvb5d1hhCzmzZcGOoxgpQk2gqHWDQ24quqs2ECivwyc9VqhYkw7YEVVjw/8fjkCAV9ySk+qHxWlox2JnM+ZlapkqaxV+70/l8hjQ4EqJGbNkqx2DRniBXKsfEhP5lL2sAgSlO3TnHMXicGucTtvziNGb8zwM5qH2fW9EnySCOlcVrUoGgZbxd05QMUXCyG+yAinWd7sba1JAFUIU1Eveq57eS3JFynGrmgBEP55sR7mWlbkBXmjFlwb8IK52fp0Xisq2EDlE2vZlSc5uDegINWWxXHkJU0DmJv9Ls9LiKBy3fGQt/RFxdhy0thMVj5+bLDKdwhODtaVGVqZFufPkUjExKan74z5f2ChLlDLc3Yur30GIskRuYlZ/H+EZTQvEKSBviJSoxaIZMKR2KKT6ohnjNXLlDBWoBb0uqoQhYboynCsRZUkWiyxZBei6wBZwk+uMoy7K3huvmgRdZVTCh2mBLgR4cQ+iXxH6GylwzM77K10fS1vNlXRDb1ylZHQuDZ9BjS61cHsbrrWolLmbWfdtQpwggtF505m1DEWNKSBIMMrtHByO03HFdS1T1OBvkxwNLI+noF1y/trlPN6ack0OY/QdrszxRqlK0piKlsjTlp+hG6dvyrMlAZpalxXIjpDpipRmrEjgkVog7qDWI2Szwcn9pe3Zw7q3Cf0ATkhf0/iS/6um0F5m3PzmxKWPg8chwPbqplS9lCCG7IdduitTHnBD1MlvfmMywmwwPbrkUSy03l897TexLDpF++02t55V3nOALIje4LGZ5XfOUTaLUr3ON8r0uc/fysT4z4W9AwrvtXLgkULj5NZdWXfRR0xx4bkzN/JTtyJHaRYvU8C9p8MupNrtceq3nceDLRSaqEWG135k7QrUgvNtUhBAkFMQR1mrfl+jNwFVckh1xiHf03iF10DAW0X1rFk8dc2VGfLZ7KPgdKUQ3Y/dHi3ETSj4eCdSqY6FQdUlxJKhkWO8u/lWb5kitU0YlhD8wz9fglLvTPwRkQBM6vffb1LNr4PI71ajkzMAwN4uQRTGPI8Z6c6EmU7SkP4bq5tQ3tTJ1d62UD2DXBihgFkadY3lOwK7KzAoAs9on11YEVH39USrMo3Mhlk= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB6005.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f91241a2-f35c-4de2-9634-08dd8c446517 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 May 2025 02:19:13.7872 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: RIRUQMh2pbR78aFjolsH90qMPEYHrfLmkjdRS62dVelO7D3okMpc/g6jxvyLTbDm X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6955 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx <amd-gfx.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/amd-gfx>, <mailto:amd-gfx-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/amd-gfx> List-Post: <mailto:amd-gfx@lists.freedesktop.org> List-Help: <mailto:amd-gfx-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/amd-gfx>, <mailto:amd-gfx-request@lists.freedesktop.org?subject=subscribe> Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" <amd-gfx-bounces@lists.freedesktop.org> Newsgroups: org.freedesktop.lists.amd-gfx