From patchwork Mon Jan 24 13:03:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_K=C3=B6nig?= X-Patchwork-Id: 12722172 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 C03C1C433EF for ; Mon, 24 Jan 2022 13:32:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 69DEE10EC6B; Mon, 24 Jan 2022 13:32:47 +0000 (UTC) Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by gabe.freedesktop.org (Postfix) with ESMTPS id 03B2510EC02; Mon, 24 Jan 2022 13:03:42 +0000 (UTC) Received: by mail-wr1-x435.google.com with SMTP id l25so13441364wrb.13; Mon, 24 Jan 2022 05:03:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=32x746+aqRVJfpOzq5mPUyMArnAKR0oshZjP3RNr6L8=; b=d7GdV3zrFFYVKk31SMgh4ZYGFlJFqcDxuu45uUfdQqmIpu6BoD/+/68mq9J+1fTVme PL30RKTL/FL+RA+y/j4gc4axOLMkl1kPB7Nnhd7jqCA2Es2Kuqb5MbOL51/dhebD9dBE 2iqeY0IPGfcMahD3j8CdmBvITrq4EdnC83Ljj75bpiN6f9zam9x2HtK8fKahWPyrpw5j GCWRZcCTJqVHbqy/QyKUvAlY8cNPQVjx3AuB/B2mnQsbjLqhPQQosBCQduhjQQ99sRmx 7ZI+Npxk11LDL39q775wx1nKvklgsow9cilzlWln0mMBJBC5L43bn6rwFmqibzN981kX 3eJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=32x746+aqRVJfpOzq5mPUyMArnAKR0oshZjP3RNr6L8=; b=tdadE2wHb/11kLG1Gi3a26jv9XQMzkkiUXs1RmYSeQK52JXtwM6RPegl3Rk+sHRep9 oi2T54Jp/oFBwH5nhJ976smn8evOV1/zf1im33sjvEdwe8CvoTOpl0sYHCxuiG4leeyW SWqP/dhoEQR4+bAP2Hl5MTLsOFlodojtQpKuGv3qjLtftYN2X+TzwdSkYn/HteqjJ0xN IFP4CJlesNWfnojjWcirbzvg18qHkLQME/iZPv5VlCXZz62TeDWRewoS7FUDCHrEK8fE fIrtQD7bQ3ZjWA9FWzDQThSjySxEHuZqaLE8wpFkQWxV6Ux2VwTV6hpA5cb900gt5si9 yA/w== X-Gm-Message-State: AOAM532v9aBxHEUpSMWGCg3NLDaMKMzj5sgsQ/BroUwI1QYBBcNti+3D Vh9bItQltjsOyfFAlvf2N/M= X-Google-Smtp-Source: ABdhPJxvdjWU3RM8A6b76whKwGja3Vlgl4pegYkdp0qNNsZaMEJtD/HoOG09RzcoyFzY95O1xToLfA== X-Received: by 2002:adf:e112:: with SMTP id t18mr8103522wrz.293.1643029420441; Mon, 24 Jan 2022 05:03:40 -0800 (PST) Received: from abel.fritz.box (p57b0bff8.dip0.t-ipconnect.de. [87.176.191.248]) by smtp.gmail.com with ESMTPSA id g4sm16543554wrd.12.2022.01.24.05.03.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 05:03:40 -0800 (PST) From: " =?utf-8?q?Christian_K=C3=B6nig?= " X-Google-Original-From: =?utf-8?q?Christian_K=C3=B6nig?= To: thomas.hellstrom@linux.intel.com, sumit.semwal@linaro.org, gustavo@padovan.org, daniel.vetter@ffwll.ch, zackr@vmware.com, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Date: Mon, 24 Jan 2022 14:03:26 +0100 Message-Id: <20220124130328.2376-10-christian.koenig@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220124130328.2376-1-christian.koenig@amd.com> References: <20220124130328.2376-1-christian.koenig@amd.com> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 24 Jan 2022 13:32:09 +0000 Subject: [Intel-gfx] [PATCH 09/11] drm/amdgpu: use dma_fence_chain_contained X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Instead of manually extracting the fence. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c index f7d8487799b2..40e06745fae9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c @@ -261,10 +261,9 @@ int amdgpu_sync_resv(struct amdgpu_device *adev, struct amdgpu_sync *sync, dma_resv_for_each_fence(&cursor, resv, true, f) { dma_fence_chain_for_each(f, f) { - struct dma_fence_chain *chain = to_dma_fence_chain(f); + struct dma_fence *tmp = dma_fence_chain_contained(f); - if (amdgpu_sync_test_fence(adev, mode, owner, chain ? - chain->fence : f)) { + if (amdgpu_sync_test_fence(adev, mode, owner, tmp)) { r = amdgpu_sync_fence(sync, f); dma_fence_put(f); if (r)