From: "Sharma, Shashank" <shashank.sharma@amd.com>
To: "Christian König" <christian.koenig@amd.com>,
"Dan Carpenter" <dan.carpenter@linaro.org>,
"Deucher, Alexander" <Alexander.Deucher@amd.com>
Cc: David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
"Khatri, Sunil" <Sunil.Khatri@amd.com>,
"Yadav, Arvind" <Arvind.Yadav@amd.com>,
"Paneer Selvam, Arunpravin" <Arunpravin.PaneerSelvam@amd.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] drm/amdgpu/userq: remove unnecessary NULL check
Date: Wed, 30 Apr 2025 14:52:11 +0200 [thread overview]
Message-ID: <2009351f-d376-47da-997e-8736b1de84c1@amd.com> (raw)
In-Reply-To: <8409b02a-811a-4bf6-a4a0-2eb63778a79c@amd.com>
On 30/04/2025 14:35, Christian König wrote:
> On 4/30/25 11:28, Sharma, Shashank wrote:
>> [AMD Official Use Only - AMD Internal Distribution Only]
>>
>>
>> Hello Dan,
>>
>> --------------------------------------------------------------------------------
>> *From:* Dan Carpenter
>> *Sent:* Wednesday, April 30, 2025 10:05 AM
>> *To:* Deucher, Alexander
>> *Cc:* Koenig, Christian; David Airlie; Simona Vetter; Sharma, Shashank; Khatri,
>> Sunil; Yadav, Arvind; Paneer Selvam, Arunpravin; amd-gfx@lists.freedesktop.org;
>> dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org; kernel-
>> janitors@vger.kernel.org
>> *Subject:* [PATCH] drm/amdgpu/userq: remove unnecessary NULL check
>>
>> The "ticket" pointer points to in the middle of the &exec struct so it
>> can't be NULL. Remove the check.
>>
>> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/
>> amdgpu/amdgpu_userq.c
>> index b0e8098a3988..7505d920fb3d 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
>> @@ -631,7 +631,7 @@ amdgpu_userq_validate_bos(struct amdgpu_userq_mgr *uq_mgr)
>> clear = false;
>> unlock = true;
>> /* The caller is already holding the reservation lock */
>> - } else if (ticket && dma_resv_locking_ctx(resv) == ticket) {
>> + } else if (dma_resv_locking_ctx(resv) == ticket) {
>>
>> Its a Nack for me, There are a few situations (particularly during the first
>> launch of the desktop, and also when eviction fence and new queue creation are
>> working in parallel) where this ticket can be NULL, we observed it during the
>> stress validation and hence added this check,
> What that maybe before the code was moved around?
>
> As far as I can see the ticket can't be NULL any more.
Yes, that was before we sync'ed the locks between the two threads and
moved the code. The NULL check was probably a leftover from the code
carried forward.
- Shashank
> Regards,
> Christian.
>
>
>> Regards,
>> Shashank
>>
>>
>> clear = false;
>> unlock = false;
>> /* Somebody else is using the BO right now */
>> --
>> 2.47.2
>>
next prev parent reply other threads:[~2025-04-30 12:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-30 8:05 Dan Carpenter
2025-04-30 12:28 ` Christian König
[not found] ` <MW4PR12MB566769E097E394ED607DBD9CF2832@MW4PR12MB5667.namprd12.prod.outlook.com>
2025-04-30 9:49 ` Dan Carpenter
2025-04-30 12:50 ` Sharma, Shashank
2025-04-30 12:35 ` Christian König
2025-04-30 12:52 ` Sharma, Shashank [this message]
2025-04-30 14:20 ` Alex Deucher
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=2009351f-d376-47da-997e-8736b1de84c1@amd.com \
--to=shashank.sharma@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Arunpravin.PaneerSelvam@amd.com \
--cc=Arvind.Yadav@amd.com \
--cc=Sunil.Khatri@amd.com \
--cc=airlied@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dan.carpenter@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=simona@ffwll.ch \
/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
all inboxes | Powered by JetHome®