mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-06 18:55:15 +07:00
drm/amd/display: Add validate_context to atomic_state
Signed-off-by: Harry Wentland <harry.wentland@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>
This commit is contained in:
parent
7cf2c840c6
commit
bf8aef2ec4
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user