Skip to content

Commit 1619d41

Browse files
George Shenalexdeucher
authored andcommitted
drm/amd/display: Add HBlank reduction DPCD write to DPMS sequence
[Why] Certain small HBlank timings may not have a large enough HBlank to support audio when low bpp DSC is enabled. HBlank expansion by the source can solve this problem, but requires the branch/sink to support HBlank reduction. [How] Update DPMS sequence to call DM to perform DPCD write to enable HBlank reduction on the branch/sink. Add stub in dm_helpers to be implemented later. Reviewed-by: Michael Strauss <[email protected]> Reviewed-by: Wenjing Liu <[email protected]> Signed-off-by: George Shen <[email protected]> Signed-off-by: Roman Li <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 787e7be commit 1619d41

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,12 @@ bool dm_helpers_dp_write_dsc_enable(
885885
return ret;
886886
}
887887

888+
bool dm_helpers_dp_write_hblank_reduction(struct dc_context *ctx, const struct dc_stream_state *stream)
889+
{
890+
// TODO
891+
return false;
892+
}
893+
888894
bool dm_helpers_is_dp_sink_present(struct dc_link *link)
889895
{
890896
bool dp_sink_present;

drivers/gpu/drm/amd/display/dc/dm_helpers.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ bool dm_helpers_dp_write_dsc_enable(
158158
const struct dc_stream_state *stream,
159159
bool enable
160160
);
161+
162+
bool dm_helpers_dp_write_hblank_reduction(
163+
struct dc_context *ctx,
164+
const struct dc_stream_state *stream);
165+
161166
bool dm_helpers_is_dp_sink_present(
162167
struct dc_link *link);
163168

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,20 @@ static bool dp_set_dsc_on_rx(struct pipe_ctx *pipe_ctx, bool enable)
772772
return result;
773773
}
774774

775+
static bool dp_set_hblank_reduction_on_rx(struct pipe_ctx *pipe_ctx)
776+
{
777+
struct dc *dc = pipe_ctx->stream->ctx->dc;
778+
struct dc_stream_state *stream = pipe_ctx->stream;
779+
bool result = false;
780+
781+
if (dc_is_virtual_signal(stream->signal))
782+
result = true;
783+
else
784+
result = dm_helpers_dp_write_hblank_reduction(dc->ctx, stream);
785+
return result;
786+
}
787+
788+
775789
/* The stream with these settings can be sent (unblanked) only after DSC was enabled on RX first,
776790
* i.e. after dp_enable_dsc_on_rx() had been called
777791
*/
@@ -2599,6 +2613,9 @@ void link_set_dpms_on(
25992613
}
26002614
}
26012615

2616+
if (dc_is_dp_signal(pipe_ctx->stream->signal))
2617+
dp_set_hblank_reduction_on_rx(pipe_ctx);
2618+
26022619
if (pipe_ctx->stream->link->ep_type == DISPLAY_ENDPOINT_USB4_DPIA)
26032620
allocate_usb4_bandwidth(pipe_ctx->stream);
26042621

0 commit comments

Comments
 (0)