Skip to content

Commit b2f26f4

Browse files
srishanmalexdeucher
authored andcommitted
drm/amd/display: Drop 'acrtc' and add 'new_crtc_state' NULL check for writeback requests.
Return value of 'to_amdgpu_crtc' which is container_of(...) can't be null, so it's null check 'acrtc' is dropped. Fixing the below: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9302 amdgpu_dm_atomic_commit_tail() error: we previously assumed 'acrtc' could be null (see line 9299) Added 'new_crtc_state' NULL check for function 'drm_atomic_get_new_crtc_state' that retrieves the new state for a CRTC, while enabling writeback requests. Cc: stable@vger.kernel.org Cc: Alex Hung <alex.hung@amd.com> Cc: Aurabindo Pillai <aurabindo.pillai@amd.com> Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Cc: Hamza Mahfooz <hamza.mahfooz@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 5394fb2 commit b2f26f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9327,10 +9327,10 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
93279327
if (!new_con_state->writeback_job)
93289328
continue;
93299329

9330-
new_crtc_state = NULL;
9330+
new_crtc_state = drm_atomic_get_new_crtc_state(state, &acrtc->base);
93319331

9332-
if (acrtc)
9333-
new_crtc_state = drm_atomic_get_new_crtc_state(state, &acrtc->base);
9332+
if (!new_crtc_state)
9333+
continue;
93349334

93359335
if (acrtc->wb_enabled)
93369336
continue;

0 commit comments

Comments
 (0)