From 13d8cf5d9a728218d5e96222eb87c1498f4039af Mon Sep 17 00:00:00 2001 From: Harry Wentland Date: Fri, 19 Feb 2016 17:13:14 -0500 Subject: [PATCH 0823/1110] drm/amd/dal: Correctly attach surfaces to context at validate DCE8, and 10 were missed previously. Signed-off-by: Harry Wentland Acked-by: Harry Wentland --- drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.c | 8 +++++++- drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.c | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.c b/drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.c index f241318..d2ea0a0 100644 --- a/drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.c +++ b/drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.c @@ -891,10 +891,16 @@ enum dc_status dce100_validate_with_context( == context->targets[i]) { unchanged = true; set_target_unchanged(context, i); + attach_surfaces_to_context( + (struct dc_surface **)dc->current_context. + target_status[j].surfaces, + dc->current_context.target_status[j].surface_count, + &context->targets[i]->public, + context); context->target_status[i] = dc->current_context.target_status[j]; } - if (!unchanged) + if (!unchanged || set[i].surface_count != 0) if (!attach_surfaces_to_context( (struct dc_surface **)set[i].surfaces, set[i].surface_count, diff --git a/drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.c b/drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.c index ed143f4..c645d25 100644 --- a/drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.c +++ b/drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.c @@ -1006,10 +1006,16 @@ enum dc_status dce80_validate_with_context( == context->targets[i]) { unchanged = true; set_target_unchanged(context, i); + attach_surfaces_to_context( + (struct dc_surface **)dc->current_context. + target_status[j].surfaces, + dc->current_context.target_status[j].surface_count, + &context->targets[i]->public, + context); context->target_status[i] = dc->current_context.target_status[j]; } - if (!unchanged) + if (!unchanged || set[i].surface_count != 0) if (!attach_surfaces_to_context( (struct dc_surface **)set[i].surfaces, set[i].surface_count, -- 2.7.4