mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-06-02 01:42:20 -04:00
drm/amd/display: Turn off DAC in DCE link encoder using VBIOS
Apparently, the VBIOS DAC1EncoderControl function is much more
graceful about turning off the DAC. It writes various DAC
registers in a specific sequence. Use that instead of just
clearing the DAC_ENABLE register.
Do this in just the dce110_link_encoder_disable_output
function and remove it from the HWSS.
Fixes: 0fbe321a93 ("drm/amd/display: Implement DCE analog link encoders (v2)")
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Tested-by: Mauro Rossi <issor.oruam@gmail.com>
Suggested-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
613b1737ab
commit
e021ee9950
@@ -133,6 +133,21 @@ static enum bp_result link_transmitter_control(
|
||||
return result;
|
||||
}
|
||||
|
||||
static enum bp_result link_dac_encoder_control(
|
||||
struct dce110_link_encoder *link_enc,
|
||||
enum bp_encoder_control_action action,
|
||||
uint32_t pix_clk_100hz)
|
||||
{
|
||||
struct dc_bios *bios = link_enc->base.ctx->dc_bios;
|
||||
struct bp_encoder_control encoder_control = {0};
|
||||
|
||||
encoder_control.action = action;
|
||||
encoder_control.engine_id = link_enc->base.analog_engine;
|
||||
encoder_control.pixel_clock = pix_clk_100hz / 10;
|
||||
|
||||
return bios->funcs->encoder_control(bios, &encoder_control);
|
||||
}
|
||||
|
||||
static void enable_phy_bypass_mode(
|
||||
struct dce110_link_encoder *enc110,
|
||||
bool enable)
|
||||
@@ -1345,19 +1360,8 @@ void dce110_link_encoder_disable_output(
|
||||
struct bp_transmitter_control cntl = { 0 };
|
||||
enum bp_result result;
|
||||
|
||||
switch (enc->analog_engine) {
|
||||
case ENGINE_ID_DACA:
|
||||
REG_UPDATE(DAC_ENABLE, DAC_ENABLE, 0);
|
||||
break;
|
||||
case ENGINE_ID_DACB:
|
||||
/* DACB doesn't seem to be present on DCE6+,
|
||||
* although there are references to it in the register file.
|
||||
*/
|
||||
DC_LOG_ERROR("%s DACB is unsupported\n", __func__);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (enc->analog_engine != ENGINE_ID_UNKNOWN)
|
||||
link_dac_encoder_control(enc110, ENCODER_CONTROL_DISABLE, 0);
|
||||
|
||||
/* The code below only applies to connectors that support digital signals. */
|
||||
if (enc->transmitter == TRANSMITTER_UNKNOWN)
|
||||
|
||||
@@ -1199,9 +1199,6 @@ void dce110_disable_stream(struct pipe_ctx *pipe_ctx)
|
||||
dccg->funcs->disable_symclk_se(dccg, stream_enc->stream_enc_inst,
|
||||
link_enc->transmitter - TRANSMITTER_UNIPHY_A);
|
||||
}
|
||||
|
||||
if (dc_is_rgb_signal(pipe_ctx->stream->signal))
|
||||
dce110_dac_encoder_control(pipe_ctx, false);
|
||||
}
|
||||
|
||||
void dce110_unblank_stream(struct pipe_ctx *pipe_ctx,
|
||||
|
||||
Reference in New Issue
Block a user