#include "dm_services.h"
#include "core_types.h"
#include "dce_aux.h"
#include "dce/dce_11_0_sh_mask.h"
#include "dm_event_log.h"
#include "dm_helpers.h"
#include "dmub/inc/dmub_cmd.h"
#define CTX …
#define REG(reg_name) …
#define DC_LOGGER …
#define DC_TRACE_LEVEL_MESSAGE(...) …
#define IS_DC_I2CAUX_LOGGING_ENABLED() …
#define LOG_FLAG_Error_I2cAux …
#define LOG_FLAG_I2cAux_DceAux …
#include "reg_helper.h"
#undef FN
#define FN(reg_name, field_name) …
#define FROM_AUX_ENGINE(ptr) …
#define FROM_ENGINE(ptr) …
#define FROM_AUX_ENGINE_ENGINE(ptr) …
enum { … };
#define TIME_OUT_INCREMENT …
#define TIME_OUT_MULTIPLIER_8 …
#define TIME_OUT_MULTIPLIER_16 …
#define TIME_OUT_MULTIPLIER_32 …
#define TIME_OUT_MULTIPLIER_64 …
#define MAX_TIMEOUT_LENGTH …
#define DEFAULT_AUX_ENGINE_MULT …
#define DEFAULT_AUX_ENGINE_LENGTH …
#define DC_TRACE_LEVEL_MESSAGE(...) …
static void release_engine(
struct dce_aux *engine)
{ … }
#define SW_CAN_ACCESS_AUX …
#define DMCU_CAN_ACCESS_AUX …
static bool is_engine_available(
struct dce_aux *engine)
{ … }
static bool acquire_engine(
struct dce_aux *engine)
{ … }
#define COMPOSE_AUX_SW_DATA_16_20(command, address) …
#define COMPOSE_AUX_SW_DATA_8_15(address) …
#define COMPOSE_AUX_SW_DATA_0_7(address) …
static void submit_channel_request(
struct dce_aux *engine,
struct aux_request_transaction_data *request)
{ … }
static int read_channel_reply(struct dce_aux *engine, uint32_t size,
uint8_t *buffer, uint8_t *reply_result,
uint32_t *sw_status)
{ … }
static enum aux_return_code_type get_channel_status(
struct dce_aux *engine,
uint8_t *returned_bytes)
{ … }
static bool acquire(
struct dce_aux *engine,
struct ddc *ddc)
{ … }
void dce110_engine_destroy(struct dce_aux **engine)
{ … }
static uint32_t dce_aux_configure_timeout(struct ddc_service *ddc,
uint32_t timeout_in_us)
{ … }
static struct dce_aux_funcs aux_functions = …;
struct dce_aux *dce110_aux_engine_construct(struct aux_engine_dce110 *aux_engine110,
struct dc_context *ctx,
uint32_t inst,
uint32_t timeout_period,
const struct dce110_aux_registers *regs,
const struct dce110_aux_registers_mask *mask,
const struct dce110_aux_registers_shift *shift,
bool is_ext_aux_timeout_configurable)
{ … }
static enum i2caux_transaction_action i2caux_action_from_payload(struct aux_payload *payload)
{ … }
int dce_aux_transfer_raw(struct ddc_service *ddc,
struct aux_payload *payload,
enum aux_return_code_type *operation_result)
{ … }
int dce_aux_transfer_dmub_raw(struct ddc_service *ddc,
struct aux_payload *payload,
enum aux_return_code_type *operation_result)
{ … }
#define AUX_MAX_RETRIES …
#define AUX_MIN_DEFER_RETRIES …
#define AUX_MAX_DEFER_TIMEOUT_MS …
#define AUX_MAX_I2C_DEFER_RETRIES …
#define AUX_MAX_INVALID_REPLY_RETRIES …
#define AUX_MAX_TIMEOUT_RETRIES …
#define AUX_DEFER_DELAY_FOR_DPIA …
static void dce_aux_log_payload(const char *payload_name,
unsigned char *payload, uint32_t length, uint32_t max_length_to_log)
{ … }
bool dce_aux_transfer_with_retries(struct ddc_service *ddc,
struct aux_payload *payload)
{ … }