[PATCH 1/4] drm/amd/powerplay: support enabled ppfeatures retrieving and setting

Kuehling, Felix Felix.Kuehling at amd.com
Tue Jan 29 21:59:46 UTC 2019


On 2019-01-14 5:01 a.m., Evan Quan wrote:
> +	features_to_disable =
> +		(features_enabled ^ new_ppfeature_masks) & features_enabled;
> +	features_to_enable =
> +		(features_enabled ^ new_ppfeature_masks) ^ features_to_disable;

This is confusing and unnecessarily complicated. I think you can achieve
the same thing in a more obvious way like this:

    features_to_disable = features_enabled & ~new_pp_feature_masks;
    features_to_enable = ~features_enabled & new_pp_feature_masks;

Regards,
  Felix



More information about the amd-gfx mailing list