public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Mengchi Cheng <mengcc@amazon.com>, sumit.semwal@linaro.org
Cc: linux-media@vger.kernel.org, kamatam@amazon.com
Subject: Re: Inconsistent fence info between 6.1 and 5.15 kernel
Date: Tue, 21 Nov 2023 09:17:47 +0100	[thread overview]
Message-ID: <b450abbd-8dca-4ff4-8b20-0b7ecaebe96e@amd.com> (raw)
In-Reply-To: <20231121005014.4074003-1-mengcc@amazon.com>

Am 21.11.23 um 01:50 schrieb Mengchi Cheng:
> Hello,
>                                                                          
> We are upleveling kernel from 5.15.32 to 6.1.62 for our system. The
> kernels we use are all vanila kernel from upstream without any extra
> patches. But we see our graphics application crashed in the 6.1.
>                                                                          
> And later we found that 6.1 has DMA_BUF_IOCTL_EXPORT_SYNC_FILE option
> added into dma_buf_ioctl. It initialized dma_fence_stub and returned
> with a sync_file. So then our app called sync_file_ioctl_fence_info to
> inquire fence info, it returns info of dma_fence_stub, which was not
> expected. As the result, the app aborted because of it.
>                                                                          
> Meanwhile, with the 5.15 kernel, our app somehow also called
> DMA_BUF_IOCTL_EXPORT_SYNC_FILE. Since it returned -ENOTTY, the app did
> not further ask for fence info.
>                                                                          
> I am not a graphics engineer. I do not know if userspace is handling
> dma_fence_stub correctly. But since the addition of
> DMA_BUF_IOCTL_EXPORT_SYNC_FILE is causing differnet behavior, I am
> wondering if there is a way to keep things consistent in the kernel.
> For example, add a macro to provide a choice disabling it? There is
> probably a better solution to it. Look forward to your reply.

At least of hand that simply sounds like incorrect behavior of the 
application.

You can't blame the kernel if the application tried to call an IOCTL 
which didn't existed on older kernels and get some undefined behavior on 
newer kernels.

Question is why exactly is the application not happy with the results of 
the sync_file? We had some fixing around the reported timestamps after a 
sync_file merge.

Regards,
Christian.

>                                                                          
>                                                                          
> Best,
> Mengchi Cheng
>


      reply	other threads:[~2023-11-21  8:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21  0:50 Inconsistent fence info between 6.1 and 5.15 kernel Mengchi Cheng
2023-11-21  8:17 ` Christian König [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b450abbd-8dca-4ff4-8b20-0b7ecaebe96e@amd.com \
    --to=christian.koenig@amd.com \
    --cc=kamatam@amazon.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mengcc@amazon.com \
    --cc=sumit.semwal@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox