]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amdgpu: Check vcn state before profile switch
authorLijo Lazar <lijo.lazar@amd.com>
Thu, 14 Aug 2025 08:22:50 +0000 (13:52 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 29 Aug 2025 14:09:33 +0000 (10:09 -0400)
commit9c0442286f84a5036958b3d8eb00bf0bb070dbd1
tree89b857837d5bdfa3f547cf7849e7824b818f5b9c
parent37551277dfed796b6749e4fa52bdb62403cfdb42
drm/amdgpu: Check vcn state before profile switch

The patch uses power state of VCN instances for requesting video
profile.

In idle worker of a vcn instance, when there is no outstanding
submisssion or fence, the instance is put to power gated state. When
all instances are powered off that means video profile is no longer
required. A request is made to turn off video profile.

A job submission starts with begin_use of ring, and at that time
vcn instance state is changed to power on. Subsequently a check is
made for active video profile, and if not active, a request is made.

Fixes: 3b669df92c85 ("drm/amdgpu/vcn: adjust workload profile handling")
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c