提交 bf8aef2e 编写于 作者: H Harry Wentland 提交者: Alex Deucher

drm/amd/display: Add validate_context to atomic_state

Signed-off-by: NHarry Wentland <harry.wentland@amd.com>
Reviewed-by: NTony Cheng <Tony.Cheng@amd.com>
Acked-by: NHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 7cf2c840
......@@ -2981,7 +2981,6 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,
struct amdgpu_device *adev = dev->dev_private;
struct dc *dc = adev->dm.dc;
bool need_to_validate = false;
struct validate_context *context;
struct drm_connector *connector;
struct drm_connector_state *conn_state;
/*
......@@ -3216,10 +3215,9 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,
}
}
context = dc_get_validate_context(dc, dm_state->set, dm_state->set_count);
if (need_to_validate == false || dm_state->set_count == 0 || context) {
dm_state->context = dc_get_validate_context(dc, dm_state->set, dm_state->set_count);
if (need_to_validate == false || dm_state->set_count == 0 || dm_state->context) {
ret = 0;
/*
* For full updates case when
......@@ -3235,18 +3233,6 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,
}
if (context) {
dc_resource_validate_ctx_destruct(context);
dm_free(context);
}
for (i = 0; i < dm_state->set_count; i++)
for (j = 0; j < dm_state->set[i].surface_count; j++)
dc_surface_release(dm_state->set[i].surfaces[j]);
for (i = 0; i < new_stream_count; i++)
dc_stream_release(new_streams[i]);
if (ret != 0) {
if (ret == -EDEADLK)
DRM_DEBUG_KMS("Atomic check stopped due to to deadlock.\n");
......
......@@ -55,7 +55,7 @@ struct dm_atomic_state {
struct dc_validation_set set[MAX_STREAMS];
int set_count;
struct validate_context *context;
};
#define to_dm_atomic_state(x) container_of(x, struct dm_atomic_state, base)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册