Skip to content

Commit

Permalink
drm/dp_mst: Don't return error code when crtc is null
Browse files Browse the repository at this point in the history
[Why]
In certain cases the crtc can be NULL and returning -EINVAL causes
atomic check to fail when it shouln't. This leads to valid
configurations failing because atomic check fails.

[How]
Don't early return if crtc is null

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
[added stable cc]
Signed-off-by: Lyude Paul <lyude@redhat.com>
Fixes: 8ec0467 ("drm/dp_mst: Add helper to trigger modeset on affected DSC MST CRTCs")
Cc: <stable@vger.kernel.org> # v5.6+
Link: https://patchwork.freedesktop.org/patch/msgid/20200814170140.24917-1-Bhawanpreet.Lakha@amd.com
  • Loading branch information
Bhawanpreet Lakha authored and Yang Xiong committed Aug 21, 2020
1 parent 28c43ec commit 2ee394a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/drm_dp_mst_topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -5037,8 +5037,8 @@ int drm_dp_mst_add_affected_dsc_crtcs(struct drm_atomic_state *state, struct drm

crtc = conn_state->crtc;

if (WARN_ON(!crtc))
return -EINVAL;
if (!crtc)
continue;

if (!drm_dp_mst_dsc_aux_for_port(pos->port))
continue;
Expand Down

0 comments on commit 2ee394a

Please sign in to comment.