From: Mikita Lipski <[email protected]>

[why]
Validate mst topology and the number of VCPI slots available
for a new state. Fail if topology has no more bandwidth for
a new state.
[how]
Pass the atomic state to drm_dp_mst_atomic_check to verify
if the new topology is possible.

Cc: Lyude Paul <[email protected]>
Signed-off-by: Mikita Lipski <[email protected]>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index d700b962d338..39c239a08633 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -7485,6 +7485,11 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
        if (ret)
                goto fail;
 
+       /* Perform validation of MST topology in the state*/
+       ret = drm_dp_mst_atomic_check(state);
+       if (ret)
+               goto fail;
+
        if (state->legacy_cursor_update) {
                /*
                 * This is a fast cursor update coming from the plane update
-- 
2.17.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to