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;
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;
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;