Skip to content

Commit 8c8df54

Browse files
Timur Kristófalexdeucher
authored andcommitted
drm/amd/display: Don't use stereo sync and audio on RGB signals (v2)
Analog video signals on VGA or DVI-A (analog part of DVI-I) don't support audio, so avoid calling any audio related functions on analog signals. Stereo sync was not set up for analog signals in the legacy display code either, so there is no loss of functionality if we omit it from DC for now. Also add a dc_is_rgb_signal similar to other dc_is_*_signal. v2: Added comment to clarify what we mean by RGB in this context. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 727b179 commit 8c8df54

3 files changed

Lines changed: 18 additions & 3 deletions

File tree

drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ void setup_dio_stream_attribute(struct pipe_ctx *pipe_ctx)
115115
struct dc_stream_state *stream = pipe_ctx->stream;
116116
struct dc_link *link = stream->link;
117117

118-
if (!dc_is_virtual_signal(stream->signal))
118+
if (!dc_is_virtual_signal(stream->signal) &&
119+
!dc_is_rgb_signal(stream->signal))
119120
stream_encoder->funcs->setup_stereo_sync(
120121
stream_encoder,
121122
pipe_ctx->stream_res.tg->inst,

drivers/gpu/drm/amd/display/dc/link/link_dpms.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2371,7 +2371,8 @@ void link_set_dpms_off(struct pipe_ctx *pipe_ctx)
23712371
set_avmute(pipe_ctx, true);
23722372
}
23732373

2374-
dc->hwss.disable_audio_stream(pipe_ctx);
2374+
if (!dc_is_rgb_signal(pipe_ctx->stream->signal))
2375+
dc->hwss.disable_audio_stream(pipe_ctx);
23752376

23762377
update_psp_stream_config(pipe_ctx, true);
23772378
dc->hwss.blank_stream(pipe_ctx);
@@ -2656,7 +2657,8 @@ void link_set_dpms_on(
26562657
enable_stream_features(pipe_ctx);
26572658
update_psp_stream_config(pipe_ctx, false);
26582659

2659-
dc->hwss.enable_audio_stream(pipe_ctx);
2660+
if (!dc_is_rgb_signal(pipe_ctx->stream->signal))
2661+
dc->hwss.enable_audio_stream(pipe_ctx);
26602662

26612663
if (dc_is_hdmi_signal(pipe_ctx->stream->signal)) {
26622664
set_avmute(pipe_ctx, false);

drivers/gpu/drm/amd/display/include/signal_types.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,18 @@ static inline bool dc_is_dvi_signal(enum signal_type signal)
118118
}
119119
}
120120

121+
/**
122+
* dc_is_rgb_signal() - Whether the signal is analog RGB.
123+
*
124+
* Returns whether the given signal type is an analog RGB signal
125+
* that is used with a DAC on VGA or DVI-I connectors.
126+
* Not to be confused with other uses of "RGB", such as RGB color space.
127+
*/
128+
static inline bool dc_is_rgb_signal(enum signal_type signal)
129+
{
130+
return (signal == SIGNAL_TYPE_RGB);
131+
}
132+
121133
static inline bool dc_is_tmds_signal(enum signal_type signal)
122134
{
123135
switch (signal) {

0 commit comments

Comments
 (0)