mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
drm/amd/display: replace fast_validate with enum dc_validate_mode
[Why] The boolean fast_validate is used as an input parameter in multiple functions. To support more scenarios, we are replacing it with enum dc_validate_mode. [How] The enum dc_validate_mode introduces three possible values: 1) DC_VALIDATE_MODE_AND_PROGRAMMING: Apply the mode to hardware 2) DC_VALIDATE_MODE_ONLY: Check whether the mode can be supported 3) DC_VALIDATE_MODE_AND_STATE_INDEX: Check if the mode can be supported, and determine the optimal voltage level needed to support it. Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Yan Li <yan.li@amd.com> Signed-off-by: Wayne Lin <wayne.lin@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -7520,7 +7520,7 @@ static enum dc_status dm_validate_stream_and_context(struct dc *dc,
|
||||
dc_result = DC_FAIL_ATTACH_SURFACES;
|
||||
|
||||
if (dc_result == DC_OK)
|
||||
dc_result = dc_validate_global_state(dc, dc_state, true);
|
||||
dc_result = dc_validate_global_state(dc, dc_state, DC_VALIDATE_MODE_ONLY);
|
||||
|
||||
cleanup:
|
||||
if (dc_state)
|
||||
@@ -12142,7 +12142,7 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
|
||||
drm_dbg_atomic(dev, "MST drm_dp_mst_atomic_check() failed\n");
|
||||
goto fail;
|
||||
}
|
||||
status = dc_validate_global_state(dc, dm_state->context, true);
|
||||
status = dc_validate_global_state(dc, dm_state->context, DC_VALIDATE_MODE_ONLY);
|
||||
if (status != DC_OK) {
|
||||
drm_dbg_atomic(dev, "DC global validation failure: %s (%d)",
|
||||
dc_status_to_str(status), status);
|
||||
|
||||
Reference in New Issue
Block a user