summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
diff options
context:
space:
mode:
authorHarry Wentland <harry.wentland@amd.com>2017-08-25 16:33:40 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-09-26 18:17:21 -0400
commit1d9521a74029c3afcf996e207ecd61a74414dd68 (patch)
tree6bae796dcb4553295b53aae230cfa6c1185012c7 /drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
parent0bfac360edcd843e90a0444475616a486f643eeb (diff)
downloadlinux-stable-1d9521a74029c3afcf996e207ecd61a74414dd68.tar.gz
linux-stable-1d9521a74029c3afcf996e207ecd61a74414dd68.tar.bz2
linux-stable-1d9521a74029c3afcf996e207ecd61a74414dd68.zip
drm/amd/display: Set add_stream_ctx for CZ, Hawaii and others
Signed-off-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Andrey Grodzovsky <Andrey.Grodzovsky@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/dce100/dce100_resource.c')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
index 36d79175354c..ca6c7c2a1b4c 100644
--- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
@@ -713,6 +713,24 @@ enum dc_status dce100_validate_global(
return DC_OK;
}
+enum dc_status dce100_add_stream_to_ctx(
+ struct dc *dc,
+ struct dc_state *new_ctx,
+ struct dc_stream_state *dc_stream)
+{
+ enum dc_status result = DC_ERROR_UNEXPECTED;
+
+ result = resource_map_pool_resources(dc, new_ctx, dc_stream);
+
+ if (result == DC_OK)
+ result = resource_map_clock_resources(dc, new_ctx, dc_stream);
+
+ if (result == DC_OK)
+ result = build_mapped_resource(dc, new_ctx, dc_stream);
+
+ return result;
+}
+
enum dc_status dce100_validate_guaranteed(
struct dc *dc,
struct dc_stream_state *dc_stream,
@@ -769,6 +787,7 @@ static const struct resource_funcs dce100_res_pool_funcs = {
.validate_guaranteed = dce100_validate_guaranteed,
.validate_bandwidth = dce100_validate_bandwidth,
.validate_plane = dce100_validate_plane,
+ .add_stream_to_ctx = dce100_add_stream_to_ctx,
.validate_global = dce100_validate_global
};