Lines Matching refs:payload
533 static enum i2caux_transaction_action i2caux_action_from_payload(struct aux_payload *payload) in i2caux_action_from_payload() argument
535 if (payload->i2c_over_aux) { in i2caux_action_from_payload()
536 if (payload->write_status_update) { in i2caux_action_from_payload()
537 if (payload->mot) in i2caux_action_from_payload()
542 if (payload->write) { in i2caux_action_from_payload()
543 if (payload->mot) in i2caux_action_from_payload()
548 if (payload->mot) in i2caux_action_from_payload()
553 if (payload->write) in i2caux_action_from_payload()
560 struct aux_payload *payload, in dce_aux_transfer_raw() argument
583 if (payload->i2c_over_aux) in dce_aux_transfer_raw()
588 aux_req.action = i2caux_action_from_payload(payload); in dce_aux_transfer_raw()
590 aux_req.address = payload->address; in dce_aux_transfer_raw()
592 aux_req.length = payload->length; in dce_aux_transfer_raw()
593 aux_req.data = payload->data; in dce_aux_transfer_raw()
601 bytes_replied = read_channel_reply(aux_engine, payload->length, in dce_aux_transfer_raw()
602 payload->data, payload->reply, in dce_aux_transfer_raw()
605 EVENT_LOG_AUX_ORIGIN_NATIVE, *payload->reply, in dce_aux_transfer_raw()
606 bytes_replied, payload->data); in dce_aux_transfer_raw()
617 struct aux_payload *payload, in dce_aux_transfer_dmub_raw() argument
632 return dm_helper_dmub_aux_transfer_sync(ddc->ctx, ddc->link, payload, operation_result); in dce_aux_transfer_dmub_raw()
644 unsigned char *payload, uint32_t length, uint32_t max_length_to_log) in dce_aux_log_payload() argument
649 if (payload && length) { in dce_aux_log_payload()
653 unsigned char *payload_ptr = payload; in dce_aux_log_payload()
670 payload_ptr = payload; in dce_aux_log_payload()
696 struct aux_payload *payload) in dce_aux_transfer_with_retries() argument
720 if (!payload->reply) { in dce_aux_transfer_with_retries()
722 payload->reply = &reply; in dce_aux_transfer_with_retries()
732 payload->address, in dce_aux_transfer_with_retries()
733 payload->length, in dce_aux_transfer_with_retries()
734 (unsigned int) payload->write, in dce_aux_transfer_with_retries()
735 (unsigned int) payload->mot); in dce_aux_transfer_with_retries()
736 if (payload->write) in dce_aux_transfer_with_retries()
737 dce_aux_log_payload(" write", payload->data, payload->length, 16); in dce_aux_transfer_with_retries()
742 ret = dce_aux_transfer_dmub_raw(ddc, payload, &operation_result); in dce_aux_transfer_with_retries()
744 ret = dce_aux_transfer_raw(ddc, payload, &operation_result); in dce_aux_transfer_with_retries()
753 payload->address, in dce_aux_transfer_with_retries()
754 payload->length, in dce_aux_transfer_with_retries()
755 (unsigned int) payload->write, in dce_aux_transfer_with_retries()
756 (unsigned int) payload->mot, in dce_aux_transfer_with_retries()
759 (unsigned int) *payload->reply); in dce_aux_transfer_with_retries()
760 if (!payload->write) in dce_aux_transfer_with_retries()
761 dce_aux_log_payload(" read", payload->data, ret > 0 ? ret : 0, 16); in dce_aux_transfer_with_retries()
768 switch (*payload->reply) { in dce_aux_transfer_with_retries()
773 if (!payload->write && payload->length != ret) { in dce_aux_transfer_with_retries()
783 } else if (payload->write && ret > 0) { in dce_aux_transfer_with_retries()
797 payload->write = false; in dce_aux_transfer_with_retries()
798 payload->write_status_update = true; in dce_aux_transfer_with_retries()
799 payload->length = 0; in dce_aux_transfer_with_retries()
818 if (*payload->reply == AUX_TRANSACTION_REPLY_I2C_OVER_AUX_DEFER) in dce_aux_transfer_with_retries()
836 if ((*payload->reply == AUX_TRANSACTION_REPLY_AUX_DEFER) || in dce_aux_transfer_with_retries()
837 (*payload->reply == AUX_TRANSACTION_REPLY_I2C_OVER_AUX_DEFER)) { in dce_aux_transfer_with_retries()
841 payload->defer_delay); in dce_aux_transfer_with_retries()
842 fsleep(payload->defer_delay * 1000); in dce_aux_transfer_with_retries()
843 defer_time_in_ms += payload->defer_delay; in dce_aux_transfer_with_retries()
883 …_RET_SUCCESS: FAILURE: AUX_TRANSACTION_REPLY_* unknown, default case. Reply: %d", *payload->reply); in dce_aux_transfer_with_retries()
917 } else if (payload->defer_delay > 0) { in dce_aux_transfer_with_retries()
921 payload->defer_delay); in dce_aux_transfer_with_retries()
922 msleep(payload->defer_delay); in dce_aux_transfer_with_retries()
958 payload->reply = NULL; in dce_aux_transfer_with_retries()