[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2009351f-d376-47da-997e-8736b1de84c1@amd.com>
Date: Wed, 30 Apr 2025 14:52:11 +0200
From: "Sharma, Shashank" <shashank.sharma@....com>
To: Christian König <christian.koenig@....com>,
Dan Carpenter <dan.carpenter@...aro.org>,
"Deucher, Alexander" <Alexander.Deucher@....com>
Cc: David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
"Khatri, Sunil" <Sunil.Khatri@....com>, "Yadav, Arvind"
<Arvind.Yadav@....com>,
"Paneer Selvam, Arunpravin" <Arunpravin.PaneerSelvam@....com>,
"amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH] drm/amdgpu/userq: remove unnecessary NULL check
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@...ts.freedesktop.org;
>> dri-devel@...ts.freedesktop.org; linux-kernel@...r.kernel.org; kernel-
>> janitors@...r.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@...aro.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
>>
Powered by blists - more mailing lists