diff options
author | Andrey Grodzovsky | 2017-08-11 16:43:45 +0200 |
---|---|---|
committer | Alex Deucher | 2017-09-27 00:17:06 +0200 |
commit | 19f89e2392e692208a0a00465d30b2b2bf43e9a9 (patch) | |
tree | 7be949e250c2b3c554e84c14419a201db7594b03 /drivers/gpu/drm/amd/display/dc/dce112 | |
parent | drm/amd/display: Block 6Ghz timing if SBIOS set HDMI_6G_en to 0 (diff) | |
download | kernel-qcow2-linux-19f89e2392e692208a0a00465d30b2b2bf43e9a9.tar.gz kernel-qcow2-linux-19f89e2392e692208a0a00465d30b2b2bf43e9a9.tar.xz kernel-qcow2-linux-19f89e2392e692208a0a00465d30b2b2bf43e9a9.zip |
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/dce112')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c index 85a396ef5aa5..d5a8ee69171d 100644 --- a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c @@ -855,19 +855,18 @@ enum dc_status resource_map_phy_clock_resources( } static bool dce112_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; } @@ -928,12 +927,9 @@ enum dc_status dce112_validate_guaranteed( enum dc_status dce112_validate_global( struct dc *dc, - const struct dc_validation_set set[], - int set_count, - struct validate_context *old_context, struct validate_context *context) { - if (!dce112_validate_surface_sets(set, set_count)) + if (!dce112_validate_surface_sets(context)) return DC_FAIL_SURFACE_VALIDATE; return DC_OK; |