drm/amdgpu: optimize the padding for gfx12
authorSunil Khatri <sunil.khatri@amd.com>
Wed, 31 Jul 2024 12:57:28 +0000 (18:27 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 6 Aug 2024 14:44:37 +0000 (10:44 -0400)
commitf59902ffcc43ce7e1db5d0c4dfee37ec2a1bae0c
treef111d07aba1900521bf20bc92690766d3c997617
parent28574b08c70e56d34d6f6379326a860b96749051
drm/amdgpu: optimize the padding for gfx12

Adding NOP packets one by one in the ring
does not use the CP efficiently.

Solution:
Use CP optimization while adding NOP packet's so PFP
can discard NOP packets based on information of count
from the Header instead of fetching all NOP packets
one by one.

Reviewed-by: Christian König <christian.koenig@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Cc: Tvrtko Ursulin <tursulin@igalia.com>
Cc: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c