Lines Matching refs:cal_blob

22 	struct cirrus_amp_efi_data *cal_blob;  member
46 priv->cal_blob = kunit_kzalloc(test, blob_size, GFP_KERNEL); in cs_amp_lib_test_init_dummy_cal_blob()
47 KUNIT_ASSERT_NOT_NULL(test, priv->cal_blob); in cs_amp_lib_test_init_dummy_cal_blob()
49 priv->cal_blob->size = blob_size; in cs_amp_lib_test_init_dummy_cal_blob()
50 priv->cal_blob->count = num_amps; in cs_amp_lib_test_init_dummy_cal_blob()
52 get_random_bytes(priv->cal_blob->data, sizeof(struct cirrus_amp_cal_data) * num_amps); in cs_amp_lib_test_init_dummy_cal_blob()
56 priv->cal_blob->data[i].calTime[0] |= 1; in cs_amp_lib_test_init_dummy_cal_blob()
60 *(u8 *)&priv->cal_blob->data[i].calTarget[0] = i + 1; in cs_amp_lib_test_init_dummy_cal_blob()
69 uid = priv->cal_blob->data[param->amp_index].calTarget[1]; in cs_amp_lib_test_get_target_uid()
71 uid |= priv->cal_blob->data[param->amp_index].calTarget[0]; in cs_amp_lib_test_get_target_uid()
122 *size = priv->cal_blob->size - 1; in cs_amp_lib_test_get_efi_variable_bad_count()
126 memcpy(buf, priv->cal_blob, priv->cal_blob->size - 1); in cs_amp_lib_test_get_efi_variable_bad_count()
198 *size = priv->cal_blob->size; in cs_amp_lib_test_get_efi_variable()
202 KUNIT_ASSERT_GE_MSG(test, ksize(buf), priv->cal_blob->size, "Buffer to small"); in cs_amp_lib_test_get_efi_variable()
204 memcpy(buf, priv->cal_blob, priv->cal_blob->size); in cs_amp_lib_test_get_efi_variable()
234 priv->cal_blob->data[param->amp_index].calTime[0]); in cs_amp_lib_test_get_efi_cal_by_uid_test()
236 priv->cal_blob->data[param->amp_index].calTime[1]); in cs_amp_lib_test_get_efi_cal_by_uid_test()
238 priv->cal_blob->data[param->amp_index].calAmbient); in cs_amp_lib_test_get_efi_cal_by_uid_test()
240 priv->cal_blob->data[param->amp_index].calStatus); in cs_amp_lib_test_get_efi_cal_by_uid_test()
242 priv->cal_blob->data[param->amp_index].calR); in cs_amp_lib_test_get_efi_cal_by_uid_test()
267 priv->cal_blob->data[param->amp_index].calTime[0]); in cs_amp_lib_test_get_efi_cal_by_index_unchecked_test()
269 priv->cal_blob->data[param->amp_index].calTime[1]); in cs_amp_lib_test_get_efi_cal_by_index_unchecked_test()
271 priv->cal_blob->data[param->amp_index].calAmbient); in cs_amp_lib_test_get_efi_cal_by_index_unchecked_test()
273 priv->cal_blob->data[param->amp_index].calStatus); in cs_amp_lib_test_get_efi_cal_by_index_unchecked_test()
275 priv->cal_blob->data[param->amp_index].calR); in cs_amp_lib_test_get_efi_cal_by_index_unchecked_test()
302 priv->cal_blob->data[param->amp_index].calTime[0]); in cs_amp_lib_test_get_efi_cal_by_index_checked_test()
304 priv->cal_blob->data[param->amp_index].calTime[1]); in cs_amp_lib_test_get_efi_cal_by_index_checked_test()
306 priv->cal_blob->data[param->amp_index].calAmbient); in cs_amp_lib_test_get_efi_cal_by_index_checked_test()
308 priv->cal_blob->data[param->amp_index].calStatus); in cs_amp_lib_test_get_efi_cal_by_index_checked_test()
310 priv->cal_blob->data[param->amp_index].calR); in cs_amp_lib_test_get_efi_cal_by_index_checked_test()
356 for (i = 0; i < priv->cal_blob->count; ++i) { in cs_amp_lib_test_get_efi_cal_by_index_fallback_test()
357 priv->cal_blob->data[i].calTarget[0] = 0; in cs_amp_lib_test_get_efi_cal_by_index_fallback_test()
358 priv->cal_blob->data[i].calTarget[1] = 0; in cs_amp_lib_test_get_efi_cal_by_index_fallback_test()
373 priv->cal_blob->data[param->amp_index].calTime[0]); in cs_amp_lib_test_get_efi_cal_by_index_fallback_test()
375 priv->cal_blob->data[param->amp_index].calTime[1]); in cs_amp_lib_test_get_efi_cal_by_index_fallback_test()
377 priv->cal_blob->data[param->amp_index].calAmbient); in cs_amp_lib_test_get_efi_cal_by_index_fallback_test()
379 priv->cal_blob->data[param->amp_index].calStatus); in cs_amp_lib_test_get_efi_cal_by_index_fallback_test()
381 priv->cal_blob->data[param->amp_index].calR); in cs_amp_lib_test_get_efi_cal_by_index_fallback_test()
398 for (i = 0; i < priv->cal_blob->count; ++i) { in cs_amp_lib_test_get_efi_cal_uid_not_found_noindex_test()
399 priv->cal_blob->data[i].calTarget[0] &= ~(bad_target_uid & 0xFFFFFFFFULL); in cs_amp_lib_test_get_efi_cal_uid_not_found_noindex_test()
400 priv->cal_blob->data[i].calTarget[1] &= ~(bad_target_uid >> 32); in cs_amp_lib_test_get_efi_cal_uid_not_found_noindex_test()
429 for (i = 0; i < priv->cal_blob->count; ++i) { in cs_amp_lib_test_get_efi_cal_uid_not_found_index_not_found_test()
430 priv->cal_blob->data[i].calTarget[0] &= ~(bad_target_uid & 0xFFFFFFFFULL); in cs_amp_lib_test_get_efi_cal_uid_not_found_index_not_found_test()
431 priv->cal_blob->data[i].calTarget[1] &= ~(bad_target_uid >> 32); in cs_amp_lib_test_get_efi_cal_uid_not_found_index_not_found_test()
502 for (i = 0; i < priv->cal_blob->count; ++i) { in cs_amp_lib_test_get_efi_cal_zero_not_matched_test()
503 priv->cal_blob->data[i].calTarget[0] = 0; in cs_amp_lib_test_get_efi_cal_zero_not_matched_test()
504 priv->cal_blob->data[i].calTarget[1] = 0; in cs_amp_lib_test_get_efi_cal_zero_not_matched_test()
531 priv->cal_blob->data[2].calTime[0] = 0; in cs_amp_lib_test_get_efi_cal_empty_entry_test()
532 priv->cal_blob->data[2].calTime[1] = 0; in cs_amp_lib_test_get_efi_cal_empty_entry_test()
535 uid = priv->cal_blob->data[2].calTarget[1]; in cs_amp_lib_test_get_efi_cal_empty_entry_test()
537 uid |= priv->cal_blob->data[2].calTarget[0]; in cs_amp_lib_test_get_efi_cal_empty_entry_test()