mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-23 17:46:33 -04:00
drm/amd/display: Remove redundant IPS mode case for DCN 4.2
[WHAT] Remove the redundant IP_VERSION(4, 2, 0) case from dm_get_default_ips_mode() since it only reassigns the same DMUB_IPS_ENABLE value already set at initialization. Also remove the corresponding KUnit test. Reviewed-by: Chenyu Chen <chen-yu.chen@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -453,10 +453,6 @@ enum dmub_ips_disable_type dm_get_default_ips_mode(
|
||||
case IP_VERSION(3, 5, 1):
|
||||
ret = DMUB_IPS_RCG_IN_ACTIVE_IPS2_IN_OFF;
|
||||
break;
|
||||
case IP_VERSION(4, 2, 0):
|
||||
case IP_VERSION(4, 2, 1):
|
||||
ret = DMUB_IPS_ENABLE;
|
||||
break;
|
||||
default:
|
||||
/* ASICs older than DCN35 do not have IPSs */
|
||||
if (amdgpu_ip_version(adev, DCE_HWIP, 0) < IP_VERSION(3, 5, 0))
|
||||
|
||||
@@ -350,23 +350,6 @@ static void dm_test_get_default_ips_mode_dcn36(struct kunit *test)
|
||||
DMUB_IPS_RCG_IN_ACTIVE_IPS2_IN_OFF);
|
||||
}
|
||||
|
||||
/**
|
||||
* dm_test_get_default_ips_mode_dcn42 - Test Get default ips mode dcn42
|
||||
* @test: The KUnit test context
|
||||
*/
|
||||
static void dm_test_get_default_ips_mode_dcn42(struct kunit *test)
|
||||
{
|
||||
struct amdgpu_device *adev;
|
||||
|
||||
adev = kunit_kzalloc(test, sizeof(*adev), GFP_KERNEL);
|
||||
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, adev);
|
||||
|
||||
adev->ip_versions[DCE_HWIP][0] = IP_VERSION(4, 2, 0);
|
||||
|
||||
KUNIT_EXPECT_EQ(test, dm_get_default_ips_mode(adev),
|
||||
DMUB_IPS_DISABLE_ALL);
|
||||
}
|
||||
|
||||
/**
|
||||
* dm_test_get_default_ips_mode_older_than_dcn35 - Test Get default ips mode older than dcn35
|
||||
* @test: The KUnit test context
|
||||
@@ -572,7 +555,6 @@ static struct kunit_case amdgpu_dm_dmub_tests[] = {
|
||||
KUNIT_CASE(dm_test_get_default_ips_mode_dcn35),
|
||||
KUNIT_CASE(dm_test_get_default_ips_mode_dcn351),
|
||||
KUNIT_CASE(dm_test_get_default_ips_mode_dcn36),
|
||||
KUNIT_CASE(dm_test_get_default_ips_mode_dcn42),
|
||||
KUNIT_CASE(dm_test_get_default_ips_mode_older_than_dcn35),
|
||||
KUNIT_CASE(dm_test_get_default_ips_mode_newer_default),
|
||||
/* dm_dmub_hw_init() */
|
||||
|
||||
Reference in New Issue
Block a user