]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/display: Add dummy p-state latency bounding box override
authorJoshua Aberback <joshua.aberback@amd.com>
Wed, 22 Apr 2020 22:08:00 +0000 (18:08 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 28 Apr 2020 20:19:33 +0000 (16:19 -0400)
[Why]

For debugging, it can be useful to be able to modify the dummy
p-state latency, this will make it easier to do so.

Signed-off-by: Joshua Aberback <joshua.aberback@amd.com>
Reviewed-by: Wesley Chalmers <Wesley.Chalmers@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c

index 84e5056521a39197a4be39117f2ac3554a3fada1..99c8e40049e651746d59d2e786476ea62600d3b6 100644 (file)
@@ -478,6 +478,7 @@ struct dc_bounding_box_overrides {
        int urgent_latency_ns;
        int percent_of_ideal_drambw;
        int dram_clock_change_latency_ns;
+       int dummy_clock_change_latency_ns;
        /* This forces a hard min on the DCFCLK we use
         * for DML.  Unlike the debug option for forcing
         * DCFCLK, this override affects watermark calculations
index 3a8a4c54738ad6e5756b892362947cb6c91804e7..b7e4d0c2432cc28c6738c4ba8d24372797195ccb 100644 (file)
@@ -3467,6 +3467,13 @@ void dcn20_patch_bounding_box(struct dc *dc, struct _vcs_dpi_soc_bounding_box_st
                bb->dram_clock_change_latency_us =
                                dc->bb_overrides.dram_clock_change_latency_ns / 1000.0;
        }
+
+       if ((int)(bb->dummy_pstate_latency_us * 1000)
+                               != dc->bb_overrides.dummy_clock_change_latency_ns
+                       && dc->bb_overrides.dummy_clock_change_latency_ns) {
+               bb->dummy_pstate_latency_us =
+                               dc->bb_overrides.dummy_clock_change_latency_ns / 1000.0;
+       }
 }
 
 static struct _vcs_dpi_soc_bounding_box_st *get_asic_rev_soc_bb(