diff options
author | Jerry Zuo <Jerry.Zuo@amd.com> | 2017-07-27 15:50:26 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-26 18:16:12 -0400 |
commit | 4d128c2f8a0d90f6e693c62423a678af4fc34bf5 (patch) | |
tree | 48c3203d6f43de411b87adc5c6bc5fef7516668d | |
parent | 6dd28867b1f964226c1c0b1600ecbfa4f8f98bba (diff) |
drm/amd/display: Add surface to dm_plane_state if fb reserve fails
Signed-off-by: Jerry Zuo <Jerry.Zuo@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 08567b3631cf..41731943b4e7 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -4707,6 +4707,11 @@ int amdgpu_dm_atomic_check(struct drm_device *dev, dc_plane_state = dc_create_plane_state(dc); + if (dm_plane_state->dc_state) + dc_plane_state_release(dm_plane_state->dc_state); + + dm_plane_state->dc_state = dc_plane_state; + ret = fill_plane_attributes( plane_crtc->dev->dev_private, dc_plane_state, @@ -4716,12 +4721,6 @@ int amdgpu_dm_atomic_check(struct drm_device *dev, if (ret) goto fail; - - if (dm_plane_state->dc_state) - dc_plane_state_release(dm_plane_state->dc_state); - - dm_plane_state->dc_state = dc_plane_state; - add_val_sets_plane(set, set_count, new_acrtc_state->stream, |