mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-09 16:41:16 +00:00
drm/amd/display: Overwriting dualDPP UBF values before usage
[WHY] Right now in dml2 mode validation we are calculating UBF parameters for prefetch calculation for single and dual DPP scenarios. Data structure to store such values are just 1D arrays, the single DPP values are overwritten by the dualDPP values, and we end up using dualDPP for prefetch calculations twice (once in place of singleDPP support check and again for dual). This naturally leads to many problems, one of which validating a mode in "singleDPP" (when we used dual DPP parameters) and sending the singleDPP parameters to mode programming, if we cannot support then we observe the corruption as described in the ticket. [HOW] UBF values need to have 2d arrays to store values specific to single and dual DPP states to avoid single DPP values being overwritten. Other parameters are recorded on a per state basis such as prefetch UBF values but they are in the same loop used for calculation and at that point its fine to overwrite them, its not the case for plain UBF values. Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Ausef Yousof <Ausef.Yousof@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
5a498172c8
commit
24909d9ec7
@ -6301,9 +6301,9 @@ static void dml_prefetch_check(struct display_mode_lib_st *mode_lib)
|
||||
mode_lib->ms.meta_row_bandwidth_this_state,
|
||||
mode_lib->ms.dpte_row_bandwidth_this_state,
|
||||
mode_lib->ms.NoOfDPPThisState,
|
||||
mode_lib->ms.UrgentBurstFactorLuma,
|
||||
mode_lib->ms.UrgentBurstFactorChroma,
|
||||
mode_lib->ms.UrgentBurstFactorCursor);
|
||||
mode_lib->ms.UrgentBurstFactorLuma[j],
|
||||
mode_lib->ms.UrgentBurstFactorChroma[j],
|
||||
mode_lib->ms.UrgentBurstFactorCursor[j]);
|
||||
|
||||
s->VMDataOnlyReturnBWPerState = dml_get_return_bw_mbps_vm_only(
|
||||
&mode_lib->ms.soc,
|
||||
@ -6458,9 +6458,9 @@ static void dml_prefetch_check(struct display_mode_lib_st *mode_lib)
|
||||
mode_lib->ms.cursor_bw_pre,
|
||||
mode_lib->ms.prefetch_vmrow_bw,
|
||||
mode_lib->ms.NoOfDPPThisState,
|
||||
mode_lib->ms.UrgentBurstFactorLuma,
|
||||
mode_lib->ms.UrgentBurstFactorChroma,
|
||||
mode_lib->ms.UrgentBurstFactorCursor,
|
||||
mode_lib->ms.UrgentBurstFactorLuma[j],
|
||||
mode_lib->ms.UrgentBurstFactorChroma[j],
|
||||
mode_lib->ms.UrgentBurstFactorCursor[j],
|
||||
mode_lib->ms.UrgentBurstFactorLumaPre,
|
||||
mode_lib->ms.UrgentBurstFactorChromaPre,
|
||||
mode_lib->ms.UrgentBurstFactorCursorPre,
|
||||
@ -6517,9 +6517,9 @@ static void dml_prefetch_check(struct display_mode_lib_st *mode_lib)
|
||||
mode_lib->ms.cursor_bw,
|
||||
mode_lib->ms.cursor_bw_pre,
|
||||
mode_lib->ms.NoOfDPPThisState,
|
||||
mode_lib->ms.UrgentBurstFactorLuma,
|
||||
mode_lib->ms.UrgentBurstFactorChroma,
|
||||
mode_lib->ms.UrgentBurstFactorCursor,
|
||||
mode_lib->ms.UrgentBurstFactorLuma[j],
|
||||
mode_lib->ms.UrgentBurstFactorChroma[j],
|
||||
mode_lib->ms.UrgentBurstFactorCursor[j],
|
||||
mode_lib->ms.UrgentBurstFactorLumaPre,
|
||||
mode_lib->ms.UrgentBurstFactorChromaPre,
|
||||
mode_lib->ms.UrgentBurstFactorCursorPre);
|
||||
@ -6586,9 +6586,9 @@ static void dml_prefetch_check(struct display_mode_lib_st *mode_lib)
|
||||
mode_lib->ms.cursor_bw_pre,
|
||||
mode_lib->ms.prefetch_vmrow_bw,
|
||||
mode_lib->ms.NoOfDPP[j], // VBA_ERROR DPPPerSurface is not assigned at this point, should use NoOfDpp here
|
||||
mode_lib->ms.UrgentBurstFactorLuma,
|
||||
mode_lib->ms.UrgentBurstFactorChroma,
|
||||
mode_lib->ms.UrgentBurstFactorCursor,
|
||||
mode_lib->ms.UrgentBurstFactorLuma[j],
|
||||
mode_lib->ms.UrgentBurstFactorChroma[j],
|
||||
mode_lib->ms.UrgentBurstFactorCursor[j],
|
||||
mode_lib->ms.UrgentBurstFactorLumaPre,
|
||||
mode_lib->ms.UrgentBurstFactorChromaPre,
|
||||
mode_lib->ms.UrgentBurstFactorCursorPre,
|
||||
@ -7809,9 +7809,9 @@ dml_bool_t dml_core_mode_support(struct display_mode_lib_st *mode_lib)
|
||||
mode_lib->ms.DETBufferSizeYThisState[k],
|
||||
mode_lib->ms.DETBufferSizeCThisState[k],
|
||||
/* Output */
|
||||
&mode_lib->ms.UrgentBurstFactorCursor[k],
|
||||
&mode_lib->ms.UrgentBurstFactorLuma[k],
|
||||
&mode_lib->ms.UrgentBurstFactorChroma[k],
|
||||
&mode_lib->ms.UrgentBurstFactorCursor[j][k],
|
||||
&mode_lib->ms.UrgentBurstFactorLuma[j][k],
|
||||
&mode_lib->ms.UrgentBurstFactorChroma[j][k],
|
||||
&mode_lib->ms.NotUrgentLatencyHiding[k]);
|
||||
}
|
||||
|
||||
|
@ -884,11 +884,11 @@ struct mode_support_st {
|
||||
dml_uint_t meta_row_height[__DML_NUM_PLANES__];
|
||||
dml_uint_t meta_row_height_chroma[__DML_NUM_PLANES__];
|
||||
dml_float_t UrgLatency;
|
||||
dml_float_t UrgentBurstFactorCursor[__DML_NUM_PLANES__];
|
||||
dml_float_t UrgentBurstFactorCursor[2][__DML_NUM_PLANES__];
|
||||
dml_float_t UrgentBurstFactorCursorPre[__DML_NUM_PLANES__];
|
||||
dml_float_t UrgentBurstFactorLuma[__DML_NUM_PLANES__];
|
||||
dml_float_t UrgentBurstFactorLuma[2][__DML_NUM_PLANES__];
|
||||
dml_float_t UrgentBurstFactorLumaPre[__DML_NUM_PLANES__];
|
||||
dml_float_t UrgentBurstFactorChroma[__DML_NUM_PLANES__];
|
||||
dml_float_t UrgentBurstFactorChroma[2][__DML_NUM_PLANES__];
|
||||
dml_float_t UrgentBurstFactorChromaPre[__DML_NUM_PLANES__];
|
||||
dml_float_t MaximumSwathWidthInLineBufferLuma;
|
||||
dml_float_t MaximumSwathWidthInLineBufferChroma;
|
||||
|
Loading…
Reference in New Issue
Block a user