From mboxrd@z Thu Jan 1 00:00:00 1970 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 2738DC433F5 for ; Tue, 29 Mar 2022 08:55:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 42C7310E7C1; Tue, 29 Mar 2022 08:55:12 +0000 (UTC) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9067910E780; Tue, 29 Mar 2022 08:55:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648544110; x=1680080110; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=tDLiIM4fM4aVooDuS+m3AxIYkSfzmE5NwOQk6eQG/k8=; b=A6ApYhKpdo9hY2pJSwyXpvcJPnHIr3CFKluDdVc265R17Huz5S0E2Gxj HYdpj1VeGhk2DNHNgZUGF1mA5/Z4ybPSaDd9GWMfxC+oRvXCFnqOMpcC8 5phP6xkM2XX1Wac0FGaJpamiSrSTQNFtZ9/ePVZybERqNHIafrlTvSMDn QMkCiC1s3e4NYWIND7Yo85skpNitlmQ18BbK8wh+cjQeGlSXSsn641UMZ Rm/ulcLB28ufQY7w1gMWbBg89h+yhFhgUryrXkhOWrbHN77WEIxQum8t0 yJf3jWLavxeyhOL/UE5NJjTidDOh7xzktaoc/pJJVR56vkIjXVLOhvoFd g==; X-IronPort-AV: E=McAfee;i="6200,9189,10300"; a="239132171" X-IronPort-AV: E=Sophos;i="5.90,219,1643702400"; d="scan'208";a="239132171" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2022 01:55:09 -0700 X-IronPort-AV: E=Sophos;i="5.90,219,1643702400"; d="scan'208";a="546301604" Received: from nirmoyda-mobl.ger.corp.intel.com (HELO [10.252.38.4]) ([10.252.38.4]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2022 01:55:07 -0700 Message-ID: Date: Tue, 29 Mar 2022 10:55:05 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Content-Language: en-US To: =?UTF-8?Q?Christian_K=c3=b6nig?= , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, ville.syrjala@linux.intel.com, daniel@ffwll.ch References: <20220329070001.134180-1-christian.koenig@amd.com> From: "Das, Nirmoy" In-Reply-To: <20220329070001.134180-1-christian.koenig@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Intel-gfx] [PATCH 1/2] dma-buf/sync-file: fix logic error in new fence merge code 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: , Cc: =?UTF-8?Q?Christian_K=c3=b6nig?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" I finally managed to find a machine and tested this series. If it is not too late The series is Tested-by: Nirmoy Das On 3/29/2022 9:00 AM, Christian König wrote: > When the array is empty because everything is signaled we can't use > add_fence() to add something because that would filter the signaled > fence again. > > Signed-off-by: Christian König > Fixes: 519f490db07e ("dma-buf/sync-file: fix warning about fence containers") > --- > drivers/dma-buf/sync_file.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c > index b8dea4ec123b..514d213261df 100644 > --- a/drivers/dma-buf/sync_file.c > +++ b/drivers/dma-buf/sync_file.c > @@ -262,7 +262,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a, > } > > if (index == 0) > - add_fence(fences, &index, dma_fence_get_stub()); > + fences[index++] = dma_fence_get_stub(); > > if (num_fences > index) { > struct dma_fence **tmp;