Commit 70732504 authored by Yongqiang Sun's avatar Yongqiang Sun Committed by Alex Deucher
Browse files

drm/amd/display: Implement dmub trace event



[Why & How]
DMUB FW send trace event via outbox0 interrupt.  Driver will handle it.

Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarYongqiang Sun <yongqiang.sun@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8039bc71
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -663,3 +663,9 @@ void dm_helpers_free_gpu_mem(
{
	// TODO
}

bool dm_helpes_dmub_outbox0_interrupt_control(struct dc_context *ctx, bool enable)
{
	// TODO
	return true;
}
+16 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
#include "dc.h"
#include "dc_dmub_srv.h"
#include "../dmub/dmub_srv.h"
#include "dm_helpers.h"

#define CTX dc_dmub_srv->ctx
#define DC_LOGGER CTX->logger
@@ -170,3 +171,18 @@ bool dc_dmub_srv_notify_stream_mask(struct dc_dmub_srv *dc_dmub_srv,
		       dmub, DMUB_GPINT__IDLE_OPT_NOTIFY_STREAM_MASK,
		       stream_mask, timeout) == DMUB_STATUS_OK;
}

enum dmub_status dc_dmub_srv_get_dmub_outbox0_msg(const struct dc *dc, struct dmcub_trace_buf_entry *entry)
{
	struct dmub_srv *dmub = dc->ctx->dmub_srv->dmub;
	enum dmub_status status;

	status = dmub_srv_get_outbox0_msg(dmub, entry);

	return status;
}

void dc_dmub_trace_event_control(struct dc *dc, bool enable)
{
	dm_helpes_dmub_outbox0_interrupt_control(dc->ctx, enable);
}
+6 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
#include "dmub/dmub_srv.h"

struct dmub_srv;
struct dc;

struct dc_reg_helper_state {
	bool gather_in_progress;
@@ -60,4 +61,9 @@ bool dc_dmub_srv_cmd_with_reply_data(struct dc_dmub_srv *dc_dmub_srv, union dmub

bool dc_dmub_srv_notify_stream_mask(struct dc_dmub_srv *dc_dmub_srv,
				    unsigned int stream_mask);

enum dmub_status dc_dmub_srv_get_dmub_outbox0_msg(const struct dc *dc, struct dmcub_trace_buf_entry *entry);

void dc_dmub_trace_event_control(struct dc *dc, bool enable);

#endif /* _DMUB_DC_SRV_H_ */
+2 −0
Original line number Diff line number Diff line
@@ -156,4 +156,6 @@ void dm_set_dcn_clocks(
		struct dc_context *ctx,
		struct dc_clocks *clks);

bool dm_helpes_dmub_outbox0_interrupt_control(struct dc_context *ctx, bool enable);

#endif /* __DM_HELPERS__ */
+1 −0
Original line number Diff line number Diff line
@@ -151,6 +151,7 @@ enum dc_irq_source {
	DC_IRQ_SOURCE_DC5_VLINE1,
	DC_IRQ_SOURCE_DC6_VLINE1,
	DC_IRQ_DMCUB_OUTBOX1,
	DC_IRQ_SOURCE_DMCUB_OUTBOX0,

	DAL_IRQ_SOURCES_NUMBER
};
Loading