mirror of
https://github.com/torvalds/linux.git
synced 2026-08-31 21:19:02 +02:00
drm/amd/powerplay: fix the confusing ppfeature mask calculations
Simplify the ppfeature mask calculations. Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Kenneth Feng <kenneth.feng@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
6a7a20ed29
commit
b7d485df66
|
|
@ -4407,9 +4407,9 @@ static int vega10_set_ppfeature_status(struct pp_hwmgr *hwmgr, uint64_t new_ppfe
|
|||
return ret;
|
||||
|
||||
features_to_disable =
|
||||
(features_enabled ^ new_ppfeature_masks) & features_enabled;
|
||||
features_enabled & ~new_ppfeature_masks;
|
||||
features_to_enable =
|
||||
(features_enabled ^ new_ppfeature_masks) ^ features_to_disable;
|
||||
~features_enabled & new_ppfeature_masks;
|
||||
|
||||
pr_debug("features_to_disable 0x%llx\n", features_to_disable);
|
||||
pr_debug("features_to_enable 0x%llx\n", features_to_enable);
|
||||
|
|
|
|||
|
|
@ -2009,9 +2009,9 @@ static int vega12_set_ppfeature_status(struct pp_hwmgr *hwmgr, uint64_t new_ppfe
|
|||
return ret;
|
||||
|
||||
features_to_disable =
|
||||
(features_enabled ^ new_ppfeature_masks) & features_enabled;
|
||||
features_enabled & ~new_ppfeature_masks;
|
||||
features_to_enable =
|
||||
(features_enabled ^ new_ppfeature_masks) ^ features_to_disable;
|
||||
~features_enabled & new_ppfeature_masks;
|
||||
|
||||
pr_debug("features_to_disable 0x%llx\n", features_to_disable);
|
||||
pr_debug("features_to_enable 0x%llx\n", features_to_enable);
|
||||
|
|
|
|||
|
|
@ -3084,9 +3084,9 @@ static int vega20_set_ppfeature_status(struct pp_hwmgr *hwmgr, uint64_t new_ppfe
|
|||
return ret;
|
||||
|
||||
features_to_disable =
|
||||
(features_enabled ^ new_ppfeature_masks) & features_enabled;
|
||||
features_enabled & ~new_ppfeature_masks;
|
||||
features_to_enable =
|
||||
(features_enabled ^ new_ppfeature_masks) ^ features_to_disable;
|
||||
~features_enabled & new_ppfeature_masks;
|
||||
|
||||
pr_debug("features_to_disable 0x%llx\n", features_to_disable);
|
||||
pr_debug("features_to_enable 0x%llx\n", features_to_enable);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user