drm/amd/display: Fixed validation return wrong result.
authorYongqiang Sun <yongqiang.sun@amd.com>
Wed, 20 Sep 2017 21:06:18 +0000 (17:06 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Sat, 21 Oct 2017 20:42:28 +0000 (16:42 -0400)
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>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/dc/core/dc_resource.c
drivers/gpu/drm/amd/display/dc/dc.h

index 6c04ad1b58598f0a6b1753e381aeca5aa2cfd6e6..0707bec111a538f15af406fc36cd95e2a9f28bc3 100644 (file)
@@ -4748,7 +4748,7 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
                if (ret)
                        goto fail;
 
-               if (!dc_validate_global_state(dc, dm_state->context)) {
+               if (dc_validate_global_state(dc, dm_state->context) != DC_OK) {
                        ret = -EINVAL;
                        goto fail;
                }
index 77b3474a7c9e0544d3fb423c1cfb6aab59c3a7c6..d9a2d09a1f4f38ffc37004e304a26f1e486cdc9f 100644 (file)
@@ -1716,7 +1716,7 @@ void dc_resource_state_construct(
        dst_ctx->dis_clk = dc->res_pool->display_clock;
 }
 
-bool dc_validate_global_state(
+enum dc_status dc_validate_global_state(
                struct dc *dc,
                struct dc_state *new_ctx)
 {
index 2e77885fc1ead2b7274a95a746d0e26d1159e6dc..1e49b8f9c66ecf5f427f444ffda867029e9e3416 100644 (file)
@@ -654,7 +654,7 @@ bool dc_validate_stream(struct dc *dc, struct dc_stream_state *stream);
 
 bool dc_validate_plane(struct dc *dc, const struct dc_plane_state *plane_state);
 
-bool dc_validate_global_state(
+enum dc_status dc_validate_global_state(
                struct dc *dc,
                struct dc_state *new_ctx);