mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/i915/gem: Reset err for each fence entry
@ 2026-10-27  7:28 yaolu
  2026-10-28 11:39 ` Andi Shyti
  0 siblings, 1 reply; 5+ messages in thread
From: yaolu @ 2026-10-27  7:28 UTC (permalink / raw)
  To: jani.nikula, joonas.lahtinen, rodrigo.vivi, tursulin
  Cc: simona, chris, lionel.g.landwerlin, intel-gfx, dri-devel,
	linux-kernel, Lu Yao

From: Lu Yao <yaolu@kylinos.cn>

If dma_fence_chain_find_seqno() failed once, 'err' will store val in
the following loop. May causing returns '-EINVAL' even though that
entry never called dma_fence_chain_find_seqno() at all.

Fixes: 13149e8bafc4 ("drm/i915: add syncobj timeline support")
Signed-off-by: Lu Yao <yaolu@kylinos.cn>
---
 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
index 1b7f5bf13e50..c41e1b9a40bc 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
@@ -2805,7 +2805,6 @@ add_timeline_fence_array(struct i915_execbuffer *eb,
 	u64 __user *user_values;
 	struct eb_fence *f;
 	u64 nfences;
-	int err = 0;
 
 	nfences = timeline_fences->fence_count;
 	if (!nfences)
@@ -2843,6 +2842,7 @@ add_timeline_fence_array(struct i915_execbuffer *eb,
 		struct drm_syncobj *syncobj;
 		struct dma_fence *fence = NULL;
 		u64 point;
+		int err = 0;
 
 		if (__copy_from_user(&user_fence,
 				     user_fences++,
-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/i915/gem: Reset err for each fence entry
  2026-10-27  7:28 [PATCH] drm/i915/gem: Reset err for each fence entry yaolu
@ 2026-10-28 11:39 ` Andi Shyti
  2026-10-29  7:31   ` Joonas Lahtinen
  0 siblings, 1 reply; 5+ messages in thread
From: Andi Shyti @ 2026-10-28 11:39 UTC (permalink / raw)
  To: yaolu
  Cc: jani.nikula, joonas.lahtinen, rodrigo.vivi, tursulin, simona,
	chris, lionel.g.landwerlin, intel-gfx, dri-devel, linux-kernel

Hi Lu,

On Tue, Oct 27, 2026 at 03:28:32PM +0800, yaolu@kylinos.cn wrote:
> From: Lu Yao <yaolu@kylinos.cn>
> 
> If dma_fence_chain_find_seqno() failed once, 'err' will store val in
> the following loop. May causing returns '-EINVAL' even though that
> entry never called dma_fence_chain_find_seqno() at all.
> 
> Fixes: 13149e8bafc4 ("drm/i915: add syncobj timeline support")
> Signed-off-by: Lu Yao <yaolu@kylinos.cn>

pushed to drm-intel-gt-next.

Thanks,
Andi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/i915/gem: Reset err for each fence entry
  2026-10-28 11:39 ` Andi Shyti
@ 2026-10-29  7:31   ` Joonas Lahtinen
  2026-10-29  8:36     ` Andi Shyti
  0 siblings, 1 reply; 5+ messages in thread
From: Joonas Lahtinen @ 2026-10-29  7:31 UTC (permalink / raw)
  To: Andi Shyti, yaolu
  Cc: jani.nikula, rodrigo.vivi, tursulin, simona, chris,
	lionel.g.landwerlin, intel-gfx, dri-devel, linux-kernel

Quoting Andi Shyti (2026-10-28 13:39:14)
> Hi Lu,
> 
> On Tue, Oct 27, 2026 at 03:28:32PM +0800, yaolu@kylinos.cn wrote:
> > From: Lu Yao <yaolu@kylinos.cn>
> > 
> > If dma_fence_chain_find_seqno() failed once, 'err' will store val in
> > the following loop. May causing returns '-EINVAL' even though that
> > entry never called dma_fence_chain_find_seqno() at all.
> > 
> > Fixes: 13149e8bafc4 ("drm/i915: add syncobj timeline support")
> > Signed-off-by: Lu Yao <yaolu@kylinos.cn>
> 
> pushed to drm-intel-gt-next.

This was pushed without any R-b, DIM should have given you a warning
when applying the patch.

I've reverted it for now, please use DIM and check the warnings before
merging stuff.

Regards, Joonas

> 
> Thanks,
> Andi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/i915/gem: Reset err for each fence entry
  2026-10-29  7:31   ` Joonas Lahtinen
@ 2026-10-29  8:36     ` Andi Shyti
  2026-10-29  8:52       ` Andi Shyti
  0 siblings, 1 reply; 5+ messages in thread
From: Andi Shyti @ 2026-10-29  8:36 UTC (permalink / raw)
  To: Joonas Lahtinen
  Cc: yaolu, jani.nikula, rodrigo.vivi, tursulin, simona, chris,
	lionel.g.landwerlin, intel-gfx, dri-devel, linux-kernel

Hi Joonas,

On Thu, Oct 29, 2026 at 09:31:50AM +0200, Joonas Lahtinen wrote:
> Quoting Andi Shyti (2026-10-28 13:39:14)
> > Hi Lu,
> > 
> > On Tue, Oct 27, 2026 at 03:28:32PM +0800, yaolu@kylinos.cn wrote:
> > > From: Lu Yao <yaolu@kylinos.cn>
> > > 
> > > If dma_fence_chain_find_seqno() failed once, 'err' will store val in
> > > the following loop. May causing returns '-EINVAL' even though that
> > > entry never called dma_fence_chain_find_seqno() at all.
> > > 
> > > Fixes: 13149e8bafc4 ("drm/i915: add syncobj timeline support")
> > > Signed-off-by: Lu Yao <yaolu@kylinos.cn>
> > 
> > pushed to drm-intel-gt-next.
> 
> This was pushed without any R-b, DIM should have given you a warning
> when applying the patch.

I forgot to add it, or rather, I remembered it too late. Since
it's a simple and straightforward patch (most likely LLM
generated), I didn't want to make a fuss about it.

> I've reverted it for now, please use DIM and check the warnings before
> merging stuff.

I used dim and apparently dim is not enforcing it.

I'll push it again with my r-b.

Thanks,
Andi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/i915/gem: Reset err for each fence entry
  2026-10-29  8:36     ` Andi Shyti
@ 2026-10-29  8:52       ` Andi Shyti
  0 siblings, 0 replies; 5+ messages in thread
From: Andi Shyti @ 2026-10-29  8:52 UTC (permalink / raw)
  To: Joonas Lahtinen
  Cc: yaolu, jani.nikula, rodrigo.vivi, tursulin, simona, chris,
	lionel.g.landwerlin, intel-gfx, dri-devel, linux-kernel

Hi Joonas,

On Thu, Oct 29, 2026 at 09:36:05AM +0100, Andi Shyti wrote:
> Hi Joonas,
> 
> On Thu, Oct 29, 2026 at 09:31:50AM +0200, Joonas Lahtinen wrote:
> > Quoting Andi Shyti (2026-10-28 13:39:14)
> > > Hi Lu,
> > > 
> > > On Tue, Oct 27, 2026 at 03:28:32PM +0800, yaolu@kylinos.cn wrote:
> > > > From: Lu Yao <yaolu@kylinos.cn>
> > > > 
> > > > If dma_fence_chain_find_seqno() failed once, 'err' will store val in
> > > > the following loop. May causing returns '-EINVAL' even though that
> > > > entry never called dma_fence_chain_find_seqno() at all.
> > > > 
> > > > Fixes: 13149e8bafc4 ("drm/i915: add syncobj timeline support")
> > > > Signed-off-by: Lu Yao <yaolu@kylinos.cn>
> > > 
> > > pushed to drm-intel-gt-next.
> > 
> > This was pushed without any R-b, DIM should have given you a warning
> > when applying the patch.
> 
> I forgot to add it, or rather, I remembered it too late. Since
> it's a simple and straightforward patch (most likely LLM
> generated), I didn't want to make a fuss about it.
> 
> > I've reverted it for now, please use DIM and check the warnings before
> > merging stuff.
> 
> I used dim and apparently dim is not enforcing it.
> 
> I'll push it again with my r-b.

Now it's pushed with my r-b.

Thanks, Joonas for looking into this.

Andi

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-29  8:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-27  7:28 [PATCH] drm/i915/gem: Reset err for each fence entry yaolu
2026-10-28 11:39 ` Andi Shyti
2026-10-29  7:31   ` Joonas Lahtinen
2026-10-29  8:36     ` Andi Shyti
2026-10-29  8:52       ` Andi Shyti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®