Commit 6f54d0b1 authored by Logatharshan Thothiralingam's avatar Logatharshan Thothiralingam Committed by Alex Deucher

drm/amd/display: Get OTG info if OTG master enabled

Signed-off-by: default avatarLogatharshan Thothiralingam <logatharshan.thothiralingam@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b46c085c
......@@ -203,10 +203,14 @@ static void dcn10_log_hw_state(struct dc *dc)
for (i = 0; i < pool->pipe_count; i++) {
struct timing_generator *tg = pool->timing_generators[i];
struct dcn_otg_state s;
struct dcn_otg_state s = {0};
tgn10_read_otg_state(DCN10TG_FROM_TG(tg), &s);
//only print if OTG master is enabled
if ((s.otg_enabled & 1) == 0)
continue;
DTN_INFO("[%d]:\t %d \t %d \t %d \t %d \t "
"%d \t %d \t %d \t %d \t %d \t %d \t "
"%d \t %d \t %d \t %d \t %d \t ",
......
......@@ -1100,6 +1100,9 @@ static bool tgn10_is_stereo_left_eye(struct timing_generator *tg)
void tgn10_read_otg_state(struct dcn10_timing_generator *tgn10,
struct dcn_otg_state *s)
{
REG_GET(OTG_CONTROL,
OTG_MASTER_EN, &s->otg_enabled);
REG_GET_2(OTG_V_BLANK_START_END,
OTG_V_BLANK_START, &s->v_blank_start,
OTG_V_BLANK_END, &s->v_blank_end);
......
......@@ -370,6 +370,7 @@ struct dcn_otg_state {
uint32_t h_sync_a_pol;
uint32_t h_total;
uint32_t underflow_occurred_status;
uint32_t otg_enabled;
};
void tgn10_read_otg_state(struct dcn10_timing_generator *tgn10,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment