Skip to content

Commit bab9bec

Browse files
Ovidiu Buneaalexdeucher
authored andcommitted
drm/amd/display: Roll back unit correction
[why] This Unit correction exposes a Replay corruption. [how] This reverts commit: commit dbd2902 ("drm/amd/display: Correct unit conversion for vstartup") Roll back unit conversion until Replay can fix their corruption. Fixes: dbd2902 ("drm/amd/display: Correct unit conversion for vstartup") Reviewed-by: Reza Amini <reza.amini@amd.com> Acked-by: Wayne Lin <wayne.lin@amd.com> Signed-off-by: Ovidiu Bunea <ovidiu.bunea@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent e81c455 commit bab9bec

1 file changed

Lines changed: 1 addition & 24 deletions

File tree

drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#include "dml/dcn20/dcn20_fpu.h"
3232
#include "dml/dcn31/dcn31_fpu.h"
3333
#include "dml/display_mode_vba.h"
34-
#include "dml/dml_inline_defs.h"
3534

3635
struct _vcs_dpi_ip_params_st dcn3_14_ip = {
3736
.VBlankNomDefaultUS = 668,
@@ -274,25 +273,6 @@ static bool is_dual_plane(enum surface_pixel_format format)
274273
return format >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN || format == SURFACE_PIXEL_FORMAT_GRPH_RGBE_ALPHA;
275274
}
276275

277-
/*
278-
* micro_sec_to_vert_lines () - converts time to number of vertical lines for a given timing
279-
*
280-
* @param: num_us: number of microseconds
281-
* @return: number of vertical lines. If exact number of vertical lines is not found then
282-
* it will round up to next number of lines to guarantee num_us
283-
*/
284-
static unsigned int micro_sec_to_vert_lines(unsigned int num_us, struct dc_crtc_timing *timing)
285-
{
286-
unsigned int num_lines = 0;
287-
unsigned int lines_time_in_ns = 1000.0 *
288-
(((float)timing->h_total * 1000.0) /
289-
((float)timing->pix_clk_100hz / 10.0));
290-
291-
num_lines = dml_ceil(1000.0 * num_us / lines_time_in_ns, 1.0);
292-
293-
return num_lines;
294-
}
295-
296276
int dcn314_populate_dml_pipes_from_context_fpu(struct dc *dc, struct dc_state *context,
297277
display_e2e_pipe_params_st *pipes,
298278
bool fast_validate)
@@ -309,22 +289,19 @@ int dcn314_populate_dml_pipes_from_context_fpu(struct dc *dc, struct dc_state *c
309289

310290
for (i = 0, pipe_cnt = 0; i < dc->res_pool->pipe_count; i++) {
311291
struct dc_crtc_timing *timing;
312-
unsigned int num_lines = 0;
313292

314293
if (!res_ctx->pipe_ctx[i].stream)
315294
continue;
316295
pipe = &res_ctx->pipe_ctx[i];
317296
timing = &pipe->stream->timing;
318297

319-
num_lines = micro_sec_to_vert_lines(dcn3_14_ip.VBlankNomDefaultUS, timing);
320-
321298
if (pipe->stream->adjust.v_total_min != 0)
322299
pipes[pipe_cnt].pipe.dest.vtotal = pipe->stream->adjust.v_total_min;
323300
else
324301
pipes[pipe_cnt].pipe.dest.vtotal = timing->v_total;
325302

326303
pipes[pipe_cnt].pipe.dest.vblank_nom = timing->v_total - pipes[pipe_cnt].pipe.dest.vactive;
327-
pipes[pipe_cnt].pipe.dest.vblank_nom = min(pipes[pipe_cnt].pipe.dest.vblank_nom, num_lines);
304+
pipes[pipe_cnt].pipe.dest.vblank_nom = min(pipes[pipe_cnt].pipe.dest.vblank_nom, dcn3_14_ip.VBlankNomDefaultUS);
328305
pipes[pipe_cnt].pipe.dest.vblank_nom = max(pipes[pipe_cnt].pipe.dest.vblank_nom, timing->v_sync_width);
329306
pipes[pipe_cnt].pipe.dest.vblank_nom = min(pipes[pipe_cnt].pipe.dest.vblank_nom, max_allowed_vblank_nom);
330307

0 commit comments

Comments
 (0)