]> git.itanic.dy.fi Git - linux-stable/commit
drm/amdgpu/sdma5.2: add begin/end_use ring callbacks
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 7 Dec 2023 15:14:41 +0000 (10:14 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Dec 2023 20:23:51 +0000 (15:23 -0500)
commit94b1e028e15c94362420f9f3f711fafbf9d52996
tree382a6b4fbf327ad84aa6f2727626b959cb4dc4ae
parentcca850267d33f1153e16e07dc7c32ce5bc3df1fe
drm/amdgpu/sdma5.2: add begin/end_use ring callbacks

Add begin/end_use ring callbacks to disallow GFXOFF when
SDMA work is submitted and allow it again afterward.

This should avoid corner cases where GFXOFF is erroneously
entered when SDMA is still active.  For now just allow/disallow
GFXOFF in the begin and end helpers until we root cause the
issue.  This should not impact power as SDMA usage is pretty
minimal and GFXOSS should not be active when SDMA is active
anyway, this just makes it explicit.

v2: move everything into sdma5.2 code.  No reason for this
to be generic at this point.
v3: Add comments in new code

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2220
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> (v1)
Tested-by: Mario Limonciello <mario.limonciello@amd.com> (v1)
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 5.15+
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c