drm/amdgpu: respect the abmlevel module parameter value if it is set
authorHamza Mahfooz <hamza.mahfooz@amd.com>
Fri, 9 Feb 2024 19:45:15 +0000 (14:45 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 12 Feb 2024 21:14:05 +0000 (16:14 -0500)
commit040fdcde288a2830edc31dd507963d6aadf990d2
tree1fb65a30e1f3cd9eba541df371e01db0e4771f27
parent2a3cfb9a24a28da9cc13d2c525a76548865e182c
drm/amdgpu: respect the abmlevel module parameter value if it is set

Currently, if the abmlevel module parameter is set, it is possible for
user space to override the ABM level at some point after boot. However,
that is undesirable because it means that we aren't respecting the
user's wishes with regard to the level that they want to use. So,
prevent user space from changing the ABM level if the module parameter
is set to a non-auto value.

Tested-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c