mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-01 03:44:27 -04:00
drm/amd/display: adding pathway to retrieve stutter period
why: some functions may need be dependent on stutter period in the future how: Extract from stutter calculations and place into perf_params structure Signed-off-by: Martin Leung <martin.leung@amd.com> Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
6b29bb3737
commit
6b85151f6b
@@ -2210,6 +2210,9 @@ static void dcn30_calculate_wm(
|
||||
context->bw_ctx.bw.dcn.watermarks.a.frac_urg_bw_flip = get_fraction_of_urgent_bandwidth_imm_flip(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
|
||||
context->bw_ctx.bw.dcn.watermarks.a.urgent_latency_ns = get_urgent_latency(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
|
||||
|
||||
context->perf_params.stutter_period_us =
|
||||
context->bw_ctx.dml.vba.StutterPeriod;
|
||||
|
||||
for (i = 0, pipe_idx = 0; i < dc->res_pool->pipe_count; i++) {
|
||||
if (!context->res_ctx.pipe_ctx[i].stream)
|
||||
continue;
|
||||
|
||||
@@ -597,7 +597,8 @@ static void CalculateStutterEfficiency(
|
||||
double meta_row_bw[],
|
||||
double dpte_row_bw[],
|
||||
double *StutterEfficiencyNotIncludingVBlank,
|
||||
double *StutterEfficiency);
|
||||
double *StutterEfficiency,
|
||||
double *StutterPeriodOut);
|
||||
|
||||
static void CalculateSwathAndDETConfiguration(
|
||||
bool ForceSingleDPP,
|
||||
@@ -3134,7 +3135,8 @@ static void DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerforman
|
||||
v->meta_row_bw,
|
||||
v->dpte_row_bw,
|
||||
&v->StutterEfficiencyNotIncludingVBlank,
|
||||
&v->StutterEfficiency);
|
||||
&v->StutterEfficiency,
|
||||
&v->StutterPeriod);
|
||||
}
|
||||
|
||||
static void DisplayPipeConfiguration(struct display_mode_lib *mode_lib)
|
||||
@@ -6151,7 +6153,8 @@ static void CalculateStutterEfficiency(
|
||||
double meta_row_bw[],
|
||||
double dpte_row_bw[],
|
||||
double *StutterEfficiencyNotIncludingVBlank,
|
||||
double *StutterEfficiency)
|
||||
double *StutterEfficiency,
|
||||
double *StutterPeriodOut)
|
||||
{
|
||||
double FullDETBufferingTimeY[DC__NUM_DPP__MAX] = { 0 };
|
||||
double FrameTimeForMinFullDETBufferingTime = 0;
|
||||
@@ -6262,6 +6265,9 @@ static void CalculateStutterEfficiency(
|
||||
}
|
||||
|
||||
*StutterEfficiency = (*StutterEfficiencyNotIncludingVBlank / 100.0 * (FrameTimeForMinFullDETBufferingTime - SmallestVBlank) + SmallestVBlank) / FrameTimeForMinFullDETBufferingTime * 100;
|
||||
|
||||
if (StutterPeriodOut)
|
||||
*StutterPeriodOut = StutterPeriod;
|
||||
}
|
||||
|
||||
static void CalculateSwathAndDETConfiguration(
|
||||
|
||||
@@ -411,6 +411,10 @@ struct dc_state {
|
||||
struct clk_mgr *clk_mgr;
|
||||
|
||||
struct kref refcount;
|
||||
|
||||
struct {
|
||||
unsigned int stutter_period_us;
|
||||
} perf_params;
|
||||
};
|
||||
|
||||
#endif /* _CORE_TYPES_H_ */
|
||||
|
||||
Reference in New Issue
Block a user