summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDillon Varone <Dillon.Varone@amd.com>2026-04-09 16:45:51 -0400
committerAlex Deucher <alexander.deucher@amd.com>2026-04-17 15:41:16 -0400
commita7a2cbc6b08654ffa6f1e15fa6ff0e058d4fcbd9 (patch)
tree7369318c8dc8add6a4c4321415fe316be689b482 /drivers/gpu
parent200e20cfa542eeab6324eb6b73f9f43d6bd94f8f (diff)
drm/amd/display: Add minimum vfp requirement
[WHY&HOW] Vertical front porch (vfp) must be greater than 1, and must be patched if it isn't. This must be done pre-DML so the DLG programming remains consistent with the OTG programming. Reviewed-by: Austin Zheng <austin.zheng@amd.com> Signed-off-by: Dillon Varone <Dillon.Varone@amd.com> Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_translation_helper.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_translation_helper.c b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_translation_helper.c
index 476030193f14..9031fd582ec7 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_translation_helper.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_translation_helper.c
@@ -90,6 +90,8 @@ static void populate_dml21_timing_config_from_stream_state(struct dml2_timing_cf
struct pipe_ctx *pipe_ctx,
struct dml2_context *dml_ctx)
{
+ const unsigned int min_v_front_porch = (stream->timing.flags.INTERLACE != 0) ? 2 : 1;
+
unsigned int hblank_start, vblank_start;
uint64_t min_hardware_refresh_in_uhz;
uint32_t pix_clk_100hz;
@@ -97,7 +99,8 @@ static void populate_dml21_timing_config_from_stream_state(struct dml2_timing_cf
timing->h_active = stream->timing.h_addressable + stream->timing.h_border_left + stream->timing.h_border_right + pipe_ctx->dsc_padding_params.dsc_hactive_padding;
timing->v_active = stream->timing.v_addressable + stream->timing.v_border_bottom + stream->timing.v_border_top;
timing->h_front_porch = stream->timing.h_front_porch;
- timing->v_front_porch = stream->timing.v_front_porch;
+ timing->v_front_porch = stream->timing.v_front_porch > min_v_front_porch ?
+ stream->timing.v_front_porch : min_v_front_porch;
timing->pixel_clock_khz = stream->timing.pix_clk_100hz / 10;
if (pipe_ctx->dsc_padding_params.dsc_hactive_padding != 0)
timing->pixel_clock_khz = pipe_ctx->dsc_padding_params.dsc_pix_clk_100hz / 10;
@@ -116,7 +119,7 @@ static void populate_dml21_timing_config_from_stream_state(struct dml2_timing_cf
if (hblank_start < stream->timing.h_addressable)
timing->h_blank_end = 0;
- vblank_start = stream->timing.v_total - stream->timing.v_front_porch;
+ vblank_start = timing->v_total - timing->v_front_porch;
timing->v_blank_end = vblank_start - stream->timing.v_addressable
- stream->timing.v_border_top - stream->timing.v_border_bottom;