Lines Matching refs:feature
53 const char *smu_get_feature_name(struct smu_context *smu, enum smu_feature_mask feature) in smu_get_feature_name() argument
55 if (feature < 0 || feature >= SMU_FEATURE_COUNT) in smu_get_feature_name()
57 return __smu_feature_names[feature]; in smu_get_feature_name()
549 struct smu_feature *feature = &smu->smu_feature; in smu_feature_init_dpm() local
555 mutex_lock(&feature->mutex); in smu_feature_init_dpm()
556 bitmap_zero(feature->allowed, SMU_FEATURE_MAX); in smu_feature_init_dpm()
557 mutex_unlock(&feature->mutex); in smu_feature_init_dpm()
564 mutex_lock(&feature->mutex); in smu_feature_init_dpm()
565 bitmap_or(feature->allowed, feature->allowed, in smu_feature_init_dpm()
567 feature->feature_num); in smu_feature_init_dpm()
568 mutex_unlock(&feature->mutex); in smu_feature_init_dpm()
611 struct smu_feature *feature = &smu->smu_feature; in smu_feature_is_enabled() local
622 WARN_ON(feature_id > feature->feature_num); in smu_feature_is_enabled()
624 mutex_lock(&feature->mutex); in smu_feature_is_enabled()
625 ret = test_bit(feature_id, feature->enabled); in smu_feature_is_enabled()
626 mutex_unlock(&feature->mutex); in smu_feature_is_enabled()
634 struct smu_feature *feature = &smu->smu_feature; in smu_feature_set_enabled() local
643 WARN_ON(feature_id > feature->feature_num); in smu_feature_set_enabled()
647 mutex_lock(&feature->mutex); in smu_feature_set_enabled()
653 test_and_set_bit(feature_id, feature->enabled); in smu_feature_set_enabled()
655 test_and_clear_bit(feature_id, feature->enabled); in smu_feature_set_enabled()
658 mutex_unlock(&feature->mutex); in smu_feature_set_enabled()
665 struct smu_feature *feature = &smu->smu_feature; in smu_feature_is_supported() local
673 WARN_ON(feature_id > feature->feature_num); in smu_feature_is_supported()
675 mutex_lock(&feature->mutex); in smu_feature_is_supported()
676 ret = test_bit(feature_id, feature->supported); in smu_feature_is_supported()
677 mutex_unlock(&feature->mutex); in smu_feature_is_supported()
686 struct smu_feature *feature = &smu->smu_feature; in smu_feature_set_supported() local
694 WARN_ON(feature_id > feature->feature_num); in smu_feature_set_supported()
696 mutex_lock(&feature->mutex); in smu_feature_set_supported()
698 test_and_set_bit(feature_id, feature->supported); in smu_feature_set_supported()
700 test_and_clear_bit(feature_id, feature->supported); in smu_feature_set_supported()
701 mutex_unlock(&feature->mutex); in smu_feature_set_supported()