return true;
}
-bool dm_helpers_dc_conn_log(struct dc_context*ctx, const char *msg)
+bool dm_helpers_dc_conn_log(struct dc_context *ctx, struct log_entry *entry, enum dc_log_type event)
{
return true;
}
dm_logger_append(&entry, "%2.2X ", hex_data[i]);
dm_logger_append(&entry, "^\n");
- dm_helpers_dc_conn_log(ctx, entry.buf);
+ dm_helpers_dc_conn_log(ctx, &entry, event);
+ dm_logger_close(&entry);
+
+ va_end(args);
+}
+
+void dc_raw_log(struct dc_context *ctx,
+ enum dc_log_type event,
+ const char *msg,
+ ...)
+{
+ va_list args;
+ struct log_entry entry = { 0 };
+
+ dm_logger_open(ctx->logger, &entry, event);
+
+ va_start(args, msg);
+ entry.buf_offset += dm_log_to_buffer(
+ &entry.buf[entry.buf_offset],
+ LOG_MAX_LINE_SIZE - entry.buf_offset,
+ msg, args);
+
+ if (entry.buf[strlen(entry.buf) - 1] == '\n') {
+ entry.buf[strlen(entry.buf) - 1] = '\0';
+ entry.buf_offset--;
+ }
+
+ dm_logger_append(&entry, "^\n");
+ dm_helpers_dc_conn_log(ctx, &entry, event);
dm_logger_close(&entry);
va_end(args);
{LOG_EVENT_LINK_TRAINING, "LKTN"},
{LOG_EVENT_LINK_LOSS, "LinkLoss"},
{LOG_EVENT_UNDERFLOW, "Underflow"},
- {LOG_IF_TRACE, "InterfaceTrace"}
+ {LOG_IF_TRACE, "InterfaceTrace"},
+ {LOG_DTN, "DTN"}
};
(1 << LOG_DETECTION_DP_CAPS) | \
(1 << LOG_BACKLIGHT)) | \
(1 << LOG_I2C_AUX) | \
- (1 << LOG_IF_TRACE) /* | \
+ (1 << LOG_IF_TRACE) | \
+ (1 << LOG_DTN) /* | \
(1 << LOG_DEBUG) | \
(1 << LOG_BIOS) | \
(1 << LOG_SURFACE) | \
dc_enable_stereo(dc, context, streams, stream_count);
}
- CONN_MSG_MODE(sink->link, "{%dx%d, %dx%d@%dKhz}",
+ CONN_MSG_MODE(sink->link, "{%ux%u, %ux%u@%u, %ux%u@%uKhz}",
+ context->streams[i]->public.src.width,
+ context->streams[i]->public.src.height,
context->streams[i]->public.timing.h_addressable,
context->streams[i]->public.timing.v_addressable,
+ context->streams[i]->public.timing.pix_clk_khz * 1000 /
+ context->streams[i]->public.timing.h_total /
+ context->streams[i]->public.timing.v_total, // Refresh rate
context->streams[i]->public.timing.h_total,
context->streams[i]->public.timing.v_total,
context->streams[i]->public.timing.pix_clk_khz);
bool dm_helpers_dc_conn_log(
struct dc_context*ctx,
- const char *msg);
+ struct log_entry *entry,
+ enum dc_log_type event);
void dm_helpers_dp_mst_stop_top_mgr(
struct dc_context *ctx,
const char *msg,
...);
+void dc_raw_log(struct dc_context *ctx,
+ enum dc_log_type event,
+ const char *msg,
+ ...);
+
void logger_write(struct dal_logger *logger,
enum dc_log_type log_type,
const char *msg,
LOG_WARNING,
LOG_DEBUG,
LOG_DC,
+ LOG_DTN,
LOG_SURFACE,
LOG_HW_HOTPLUG,
LOG_HW_LINK_TRAINING,