[PATCH] drm/dp_mst: Don't return error code when crtc is null
Lyude Paul
lyude at redhat.com
Mon Aug 17 15:24:55 UTC 2020
Oh-just noticed this is also missing a CC for stable at vger.kernel.org. I'll add
it before pushing but please make sure to follow the guidelines here when
submitting fixes, since otherwise they might not get backported automatically
to older kernels:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
(you can ignore the "It cannot be bigger than 100 lines, with context." part,
as long as you're not trying to backport new functionality to stable and
you're actually fixing something they're pretty leniant about that rule)
On Mon, 2020-08-17 at 11:21 -0400, Lyude Paul wrote:
> Reviewed-by: Lyude Paul <lyude at redhat.com>
>
> I will go ahead and push this to drm-misc-fixes, thanks!
>
> On Fri, 2020-08-14 at 13:01 -0400, Bhawanpreet Lakha wrote:
> > [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 at amd.com>
> > ---
> > drivers/gpu/drm/drm_dp_mst_topology.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c
> > b/drivers/gpu/drm/drm_dp_mst_topology.c
> > index 70c4b7afed12..bc90a1485699 100644
> > --- a/drivers/gpu/drm/drm_dp_mst_topology.c
> > +++ b/drivers/gpu/drm/drm_dp_mst_topology.c
> > @@ -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;
--
Cheers,
Lyude Paul (she/her)
Software Engineer at Red Hat
More information about the amd-gfx
mailing list