mirror of
https://github.com/torvalds/linux.git
synced 2026-05-01 04:52:32 -04:00
drm/amd/display: WA for 3 display play video hot plug.
Three monitor connected and playing a video will occupy all 4 pipes, if hot plug forth display, commit streams will be failed due to no free pipe can be found. Work around: When forth monitor connected, mark video plane as a fake plane, remove it in dc, keep it in dm and report address to OS, until OS turn off MPO. Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <Harry.Wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
4e527c01aa
commit
62c933f9c6
@@ -2794,7 +2794,7 @@ int amdgpu_dm_connector_mode_valid(struct drm_connector *connector,
|
||||
stream->src.height = mode->vdisplay;
|
||||
stream->dst = stream->src;
|
||||
|
||||
if (dc_validate_stream(adev->dm.dc, stream))
|
||||
if (dc_validate_stream(adev->dm.dc, stream) == DC_OK)
|
||||
result = MODE_OK;
|
||||
|
||||
dc_stream_release(stream);
|
||||
@@ -2839,7 +2839,7 @@ static int dm_crtc_helper_atomic_check(struct drm_crtc *crtc,
|
||||
if (!dm_crtc_state->stream)
|
||||
return 0;
|
||||
|
||||
if (dc_validate_stream(dc, dm_crtc_state->stream))
|
||||
if (dc_validate_stream(dc, dm_crtc_state->stream) == DC_OK)
|
||||
return 0;
|
||||
|
||||
return ret;
|
||||
@@ -3034,7 +3034,7 @@ static int dm_plane_atomic_check(struct drm_plane *plane,
|
||||
if (!dm_plane_state->dc_state)
|
||||
return 0;
|
||||
|
||||
if (dc_validate_plane(dc, dm_plane_state->dc_state))
|
||||
if (dc_validate_plane(dc, dm_plane_state->dc_state) == DC_OK)
|
||||
return 0;
|
||||
|
||||
return -EINVAL;
|
||||
@@ -4464,10 +4464,10 @@ static int dm_update_crtcs_state(struct dc *dc,
|
||||
crtc->base.id);
|
||||
|
||||
/* i.e. reset mode */
|
||||
if (!dc_remove_stream_from_ctx(
|
||||
if (dc_remove_stream_from_ctx(
|
||||
dc,
|
||||
dm_state->context,
|
||||
dm_old_crtc_state->stream)) {
|
||||
dm_old_crtc_state->stream) != DC_OK) {
|
||||
ret = -EINVAL;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user