mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 11:03:43 +02:00
drm/amd/display: Prevent VStartup Overflow
[WHY & HOW] Fixed Overflow issue by clamping VStartup to max value of register. Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Ryan Seto <ryanseto@amd.com> Signed-off-by: Alex Hung <alex.hung@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
082ec59662
commit
7b59cc671a
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#define DML2_MAX_FMT_420_BUFFER_WIDTH 4096
|
||||
#define TB_BORROWED_MAX 400
|
||||
#define DML_MAX_VSTARTUP_START 1023
|
||||
|
||||
// ---------------------------
|
||||
// Declaration Begins
|
||||
|
|
@ -6210,6 +6211,7 @@ static dml_uint_t CalculateMaxVStartup(
|
|||
dml_print("DML::%s: vblank_avail = %u\n", __func__, vblank_avail);
|
||||
dml_print("DML::%s: max_vstartup_lines = %u\n", __func__, max_vstartup_lines);
|
||||
#endif
|
||||
max_vstartup_lines = (dml_uint_t) dml_min(max_vstartup_lines, DML_MAX_VSTARTUP_START);
|
||||
return max_vstartup_lines;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user