Commit 135fd1b3 authored by Rodrigo Siqueira's avatar Rodrigo Siqueira Committed by Alex Deucher

drm/amd/display: Reduce stack size

Reduce stack size pointed by clang:

amdgpu_dm/amdgpu_dm.c:8655:13: error: stack frame size (1048) exceeds limit (1024) in 'amdgpu_dm_atomic_commit_tail' [-Werror,-Wframe-larger-than]
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Acked-by: default avatarAlan Liu <haoping.liu@amd.com>
Signed-off-by: default avatarRodrigo Siqueira <rodrigo.siqueira@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 30e9b7cb
...@@ -8710,13 +8710,12 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) ...@@ -8710,13 +8710,12 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
struct dm_connector_state *dm_new_con_state = to_dm_connector_state(new_con_state); struct dm_connector_state *dm_new_con_state = to_dm_connector_state(new_con_state);
struct dm_connector_state *dm_old_con_state = to_dm_connector_state(old_con_state); struct dm_connector_state *dm_old_con_state = to_dm_connector_state(old_con_state);
struct amdgpu_crtc *acrtc = to_amdgpu_crtc(dm_new_con_state->base.crtc); struct amdgpu_crtc *acrtc = to_amdgpu_crtc(dm_new_con_state->base.crtc);
struct dc_surface_update dummy_updates[MAX_SURFACES]; struct dc_surface_update *dummy_updates;
struct dc_stream_update stream_update; struct dc_stream_update stream_update;
struct dc_info_packet hdr_packet; struct dc_info_packet hdr_packet;
struct dc_stream_status *status = NULL; struct dc_stream_status *status = NULL;
bool abm_changed, hdr_changed, scaling_changed; bool abm_changed, hdr_changed, scaling_changed;
memset(&dummy_updates, 0, sizeof(dummy_updates));
memset(&stream_update, 0, sizeof(stream_update)); memset(&stream_update, 0, sizeof(stream_update));
if (acrtc) { if (acrtc) {
...@@ -8775,6 +8774,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) ...@@ -8775,6 +8774,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
* Here we create an empty update on each plane. * Here we create an empty update on each plane.
* To fix this, DC should permit updating only stream properties. * To fix this, DC should permit updating only stream properties.
*/ */
dummy_updates = kzalloc(sizeof(struct dc_surface_update) * MAX_SURFACES, GFP_ATOMIC);
for (j = 0; j < status->plane_count; j++) for (j = 0; j < status->plane_count; j++)
dummy_updates[j].surface = status->plane_states[0]; dummy_updates[j].surface = status->plane_states[0];
...@@ -8786,6 +8786,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) ...@@ -8786,6 +8786,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
dm_new_crtc_state->stream, dm_new_crtc_state->stream,
&stream_update); &stream_update);
mutex_unlock(&dm->dc_lock); mutex_unlock(&dm->dc_lock);
kfree(dummy_updates);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment