summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/dce80
diff options
context:
space:
mode:
authorAndrey Grodzovsky <Andrey.Grodzovsky@amd.com>2017-08-11 10:43:45 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-09-26 18:17:06 -0400
commit19f89e2392e692208a0a00465d30b2b2bf43e9a9 (patch)
tree7be949e250c2b3c554e84c14419a201db7594b03 /drivers/gpu/drm/amd/display/dc/dce80
parent577b5c2b51014b3c276ab1d456aaad965dbb4930 (diff)
drm/amd/display: Per plane validation context build.
Introduce add/remove plane to/from context. Make DC wrapper to use them in WIndows/Diags. Use them in dc_update_surface_to_stream. Call add/remove plane from Linux DM. Remove dc_validation_set from dc_validate_global_state interface and by this remove clean Linux DM from using it. Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@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>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dce80')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
index ac3f42a44030..945ff7ee6cd9 100644
--- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
@@ -716,19 +716,18 @@ bool dce80_validate_bandwidth(
}
static bool dce80_validate_surface_sets(
- const struct dc_validation_set set[],
- int set_count)
+ struct validate_context *context)
{
int i;
- for (i = 0; i < set_count; i++) {
- if (set[i].plane_count == 0)
+ for (i = 0; i < context->stream_count; i++) {
+ if (context->stream_status[i].plane_count == 0)
continue;
- if (set[i].plane_count > 1)
+ if (context->stream_status[i].plane_count > 1)
return false;
- if (set[i].plane_states[0]->format
+ if (context->stream_status[i].plane_states[0]->format
>= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN)
return false;
}
@@ -738,12 +737,9 @@ static bool dce80_validate_surface_sets(
enum dc_status dce80_validate_global(
struct dc *dc,
- const struct dc_validation_set set[],
- int set_count,
- struct validate_context *old_context,
struct validate_context *context)
{
- if (!dce80_validate_surface_sets(set, set_count))
+ if (!dce80_validate_surface_sets(context))
return DC_FAIL_SURFACE_VALIDATE;
return DC_OK;