Subject: SYNCOBJ TIMELINE Test failed
From: "Zhang, Jesse(Jie)" <[email-masked]>
To: "Koenig, Christian" <[email-masked]>
Cc: "Zhang, Yifan" <[email-masked]>, "Guo, Shikai" <[email-masked]>
Date: Tue, 28 Jun 2022 10:44:24 +0000

[AMD Official Use Only - General]

Hi Christian,

Our QA find the "Syncobj timeline" test failed on ubuntu22 (kernel version 5.15.0-39).  The relate ticket as following:

https://ontrack-internal.amd.com/browse/SWDEV-343186

We trace the root cause of this issue, and found it cause by your patch.  As the following:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ab66fdace8581ef3b4e7cf5381a168ed4058d779.

I add a patch , please help to review.

diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c

index 7e48dcd1bee4..d5db818f1c76 100644

--- a/drivers/gpu/drm/drm_syncobj.c

+++ b/drivers/gpu/drm/drm_syncobj.c

@@ -887,7 +887,7 @@ static int drm_syncobj_flatten_chain(struct dma_fence **f)

                goto free_fences;

        dma_fence_put(*f);

-       *f = &array->base;

+       *f = array->fences[0];

        return 0;

Attach the patch file.

Thanks

Jesse