From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=80.241.56.171 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796216045; b=f3BxK6m0EVpGNpwHyPPwiEAwAgBXbKRwao9om52DPGUZ+we4uZcXkX0O8PyXljqZQfqS omYN0fKMvybFoJRsTX3S8HXP1W5ASHsqgZXv2ObsLyTSy0cDCEdhexQxzAbBBtxH1GFX8 T0iPlVJHsliQGzrMpc8LMnCHWxJoUT3tAu49bkZV5dIhieMn2lj1tOPPL8ej9Fba8fTzX nJiVEhI+rCd2rRTvUlj5H4CSwHPuwKpXm9HRRYzO0Ksp+eS8lf2dEIHhUxeynGRxR0Nvk CEMF+L8ie9xDja8QhyayMX9aHLFjWqePgZLFCsGHCc8N/9lOY4pMRkLIP5pyMPKy3kg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796216045; h=DMARC-Filter:Received:DKIM-Signature:Message-ID:Subject:From: Reply-To:To:Cc:Date:In-Reply-To:References:Content-Type: Content-Transfer-Encoding:User-Agent:MIME-Version:X-MBO-RS-ID: X-MBO-RS-META; bh=wD/y6WmMKPKSbtEHCA0QI185XNcoeXSgqFS4rGc7tfU=; b=3qaRdLb2ADtvoabThFMo9ylApLJwm0H596Els70Jonu3wWKRtHj74YvqQBluIpSaPhBk OkIhVGcAeEIWk5OQujhmKaPTG+I3OTq/WqHOLDhmNL/LqcC2n1GhzlMyHCLnM4AeutAdM qGytJcGUo+qGshoXIZh64FHUqJKRobDvETTIPX06/8PemeBecvt29Z70gWETiOUbzdvzV rr40CSVRAsKE1Ws7MkrRROVssEQiPSHq+6H9iSkBJfCA0qSqEQy3M8Jlj3Ljbuuql9GTr bZWGjNCq5S7CXXKnUqOidaayGE+lspvHu6L40SbiIEZK54EoSXqpy7+0Qvg0NEwJ9UQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256 header.s=mail20150812 header.b=HwXIv4p+; arc=none smtp.remote-ip=80.241.56.171 Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8777B606A323; Wed, 2 Dec 2026 12:54:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8777B606A323 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256 header.s=mail20150812 header.b=HwXIv4p+ Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4jfd486PGQzMllQ; Wed, 02 Dec 2026 13:54:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1796216040; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wD/y6WmMKPKSbtEHCA0QI185XNcoeXSgqFS4rGc7tfU=; b=HwXIv4p+OcmxDEn5In9b+kM3W8HAQfj1Bk11A6QkXxZ4wcj3GTzabW5J6PcN5HhaLLeWj4 I3luE8Tr0gr17tdaXa+nNDT44mjmOktVs1km1LaatpvvS9z4bh5UQRBGXJVWb7gWoJNc4j gBY8oJ2ePsYPc7BgY7QrW1kJvc3u1JgrVLe8/b5e90hZai2aD/DI+I6EkTKTPuTeSsPzOq vKx0LTbCfTXG7WGba/Ux4EWmKfqGcWFaGF63ZaLHU4d3I/y4LdhCPP3nNm9lcodWgrt3bj CLNl5xGaShVW7El3fCgpz0tnWHx1lxDqREbw3nMjr7U4ZIElzk7ovtBsP9Te9A== Message-ID: <812d4ff157dfab49a019e85b04f609f10cfcbc5d.camel@mailbox.org> Subject: Re: [PATCH v4 2/3] drm/sched: Add a drm_sched_job_add_dependency_unwrapped() helper From: Philipp Stanner Reply-To: phasta@kernel.org To: Boris Brezillon , Steven Price , Liviu Dudau , Akash Goel , Karunika Choo , Lukas Zapolskas , Chris Diamand Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Sumit Semwal , Christian =?ISO-8859-1?Q?K=F6nig?= , Philipp Stanner , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, Xianzhong Li Date: Wed, 02 Dec 2026 13:53:58 +0100 In-Reply-To: <20261202-panhtor-dep-skip-v4-2-f84482d7a49c@collabora.com> References: <20261202-panhtor-dep-skip-v4-0-f84482d7a49c@collabora.com> <20261202-panhtor-dep-skip-v4-2-f84482d7a49c@collabora.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.60.2 (3.60.2-3.fc44) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-MBO-RS-ID: ac88e06489544a04de6 X-MBO-RS-META: xif3keozzherjkouhpt9g5pgdk8ekhp8 On Wed, 2026-12-02 at 12:34 +0100, Boris Brezillon wrote: >=20 [=E2=80=A6] > +/** > + * drm_sched_job_add_dependency_unwrapped - unwrap the fence (if this is= a > + * container) and add the resulting fences as job dependencies > + * @job: scheduler job to add the dependencies to > + * @fence: the dma_fence to add to the list of dependencies. Not entirely true, this is the container containing the dependencies, not the actual dependency. Right? Maybe just call it "dependencies" or "deps" and below "fence" then singular, "dep"? > + * > + * Note that @fence is consumed in both the success and error cases. > + * > + * Returns: same nit, "Return: " > + * 0 on success, or an error on failing to expand the array. > + */ > +int drm_sched_job_add_dependency_unwrapped(struct drm_sched_job *job, > + =C2=A0=C2=A0 struct dma_fence *fence) > +{ > + struct dma_fence *inner_fence; > + int ret; > + > + dma_fence_unwrap_for_each(inner_fence, fence) { > + ret =3D drm_sched_job_add_dependency(job, dma_fence_get(inner_fence)); > + if (ret) > + break; > + } > + > + dma_fence_put(fence); > + return ret; > +} > +EXPORT_SYMBOL(drm_sched_job_add_dependency_unwrapped); But makes sense to me. With the docu: Reviewed-by: Philipp Stanner