Skip to content

Commit

Permalink
drm/amd/display: Call DMUB for eDP power control
Browse files Browse the repository at this point in the history
[Why]
If DMUB is used, LVTMA VBIOS call can be used to control eDP instead
of tranditional transmitter control. Interface is agreed with VBIOS
for eDP to use this new path to program LVTMA registers.

[How]
Expose DAL interface to send DMUB command for LVTMA control that VBIOS
currently uses.

Signed-off-by: Chris Park <Chris.Park@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Eryk Brol <eryk.brol@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Chris Park authored and Alex Deucher committed Aug 26, 2020
1 parent f8c000a commit 8e1f47e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions drivers/gpu/drm/amd/display/dc/bios/command_table2.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,11 +920,39 @@ static void init_enable_lvtma_control(struct bios_parser *bp)

}

static void enable_lvtma_control_dmcub(
struct dc_dmub_srv *dmcub,
uint8_t uc_pwr_on)
{

union dmub_rb_cmd cmd;

memset(&cmd, 0, sizeof(cmd));

cmd.cmd_common.header.type = DMUB_CMD__VBIOS;
cmd.cmd_common.header.sub_type =
DMUB_CMD__VBIOS_LVTMA_CONTROL;
cmd.cmd_common.cmd_buffer[0] =
uc_pwr_on;

dc_dmub_srv_cmd_queue(dmcub, &cmd);
dc_dmub_srv_cmd_execute(dmcub);
dc_dmub_srv_wait_idle(dmcub);

}

static enum bp_result enable_lvtma_control(
struct bios_parser *bp,
uint8_t uc_pwr_on)
{
enum bp_result result = BP_RESULT_FAILURE;

if (bp->base.ctx->dc->ctx->dmub_srv &&
bp->base.ctx->dc->debug.dmub_command_table) {
enable_lvtma_control_dmcub(bp->base.ctx->dmub_srv,
uc_pwr_on);
return BP_RESULT_OK;
}
return result;
}

Expand Down

0 comments on commit 8e1f47e

Please sign in to comment.