diff mbox series

[4.19,092/190] drm/nouveau: Dont WARN_ON VCPI allocation failures

Message ID 20190913130606.981926197@linuxfoundation.org (mailing list archive)
State New, archived
Headers show
Series None | expand

Commit Message

Greg KH Sept. 13, 2019, 1:05 p.m. UTC
[ Upstream commit b513a18cf1d705bd04efd91c417e79e4938be093 ]

This is much louder then we want. VCPI allocation failures are quite
normal, since they will happen if any part of the modesetting process is
interrupted by removing the DP MST topology in question. So just print a
debugging message on VCPI failures instead.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Fixes: f479c0ba4a17 ("drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream")
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v4.10+
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Ilia Mirkin Sept. 13, 2019, 1:33 p.m. UTC | #1
Hi Greg,

This feels like it's missing a From: line.

commit b513a18cf1d705bd04efd91c417e79e4938be093
Author: Lyude Paul <lyude@redhat.com>
Date:   Mon Jan 28 16:03:50 2019 -0500

    drm/nouveau: Don't WARN_ON VCPI allocation failures

Is this an artifact of your notification-of-patches process and I
never noticed before, or was the patch ingested incorrectly?

Cheers,

  -ilia

On Fri, Sep 13, 2019 at 9:16 AM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> [ Upstream commit b513a18cf1d705bd04efd91c417e79e4938be093 ]
>
> This is much louder then we want. VCPI allocation failures are quite
> normal, since they will happen if any part of the modesetting process is
> interrupted by removing the DP MST topology in question. So just print a
> debugging message on VCPI failures instead.
>
> Signed-off-by: Lyude Paul <lyude@redhat.com>
> Fixes: f479c0ba4a17 ("drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream")
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Cc: dri-devel@lists.freedesktop.org
> Cc: nouveau@lists.freedesktop.org
> Cc: <stable@vger.kernel.org> # v4.10+
> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
>  drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> index f889d41a281fa..5e01bfb69d7a3 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> @@ -759,7 +759,8 @@ nv50_msto_enable(struct drm_encoder *encoder)
>
>         slots = drm_dp_find_vcpi_slots(&mstm->mgr, mstc->pbn);
>         r = drm_dp_mst_allocate_vcpi(&mstm->mgr, mstc->port, mstc->pbn, slots);
> -       WARN_ON(!r);
> +       if (!r)
> +               DRM_DEBUG_KMS("Failed to allocate VCPI\n");
>
>         if (!mstm->links++)
>                 nv50_outp_acquire(mstm->outp);
> --
> 2.20.1
>
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Sasha Levin Sept. 13, 2019, 2:46 p.m. UTC | #2
On Fri, Sep 13, 2019 at 09:33:36AM -0400, Ilia Mirkin wrote:
>Hi Greg,
>
>This feels like it's missing a From: line.
>
>commit b513a18cf1d705bd04efd91c417e79e4938be093
>Author: Lyude Paul <lyude@redhat.com>
>Date:   Mon Jan 28 16:03:50 2019 -0500
>
>    drm/nouveau: Don't WARN_ON VCPI allocation failures
>
>Is this an artifact of your notification-of-patches process and I
>never noticed before, or was the patch ingested incorrectly?

It was always like this for patches that came through me. Greg's script
generates an explicit "From:" line in the patch, but I never saw the
value in that since git does the right thing by looking at the "From:"
line in the mail header.

The right thing is being done in stable-rc and for the releases. For
your example here, this is how it looks like in the stable-rc tree:

commit bdcc885be68289a37d0d063cd94390da81fd8178
Author:     Lyude Paul <lyude@redhat.com>
AuthorDate: Mon Jan 28 16:03:50 2019 -0500
Commit:     Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CommitDate: Fri Sep 13 14:05:29 2019 +0100

    drm/nouveau: Don't WARN_ON VCPI allocation failures

--
Thanks,
Sasha
Ilia Mirkin Sept. 13, 2019, 2:48 p.m. UTC | #3
On Fri, Sep 13, 2019 at 10:46 AM Sasha Levin <sashal@kernel.org> wrote:
>
> On Fri, Sep 13, 2019 at 09:33:36AM -0400, Ilia Mirkin wrote:
> >Hi Greg,
> >
> >This feels like it's missing a From: line.
> >
> >commit b513a18cf1d705bd04efd91c417e79e4938be093
> >Author: Lyude Paul <lyude@redhat.com>
> >Date:   Mon Jan 28 16:03:50 2019 -0500
> >
> >    drm/nouveau: Don't WARN_ON VCPI allocation failures
> >
> >Is this an artifact of your notification-of-patches process and I
> >never noticed before, or was the patch ingested incorrectly?
>
> It was always like this for patches that came through me. Greg's script
> generates an explicit "From:" line in the patch, but I never saw the
> value in that since git does the right thing by looking at the "From:"
> line in the mail header.

That's right -- the email's From header gets used in the case of no
explicit From in the email body. But Greg is sending the emails From:
Greg, so if I were to ingest that email, I would end up with a patch
From: Greg, not From: Lyude as it ought to be.

Cheers,

  -ilia
Greg KH Sept. 13, 2019, 2:54 p.m. UTC | #4
On Fri, Sep 13, 2019 at 10:46:27AM -0400, Sasha Levin wrote:
> On Fri, Sep 13, 2019 at 09:33:36AM -0400, Ilia Mirkin wrote:
> > Hi Greg,
> > 
> > This feels like it's missing a From: line.
> > 
> > commit b513a18cf1d705bd04efd91c417e79e4938be093
> > Author: Lyude Paul <lyude@redhat.com>
> > Date:   Mon Jan 28 16:03:50 2019 -0500
> > 
> >    drm/nouveau: Don't WARN_ON VCPI allocation failures
> > 
> > Is this an artifact of your notification-of-patches process and I
> > never noticed before, or was the patch ingested incorrectly?
> 
> It was always like this for patches that came through me. Greg's script
> generates an explicit "From:" line in the patch, but I never saw the
> value in that since git does the right thing by looking at the "From:"
> line in the mail header.
> 
> The right thing is being done in stable-rc and for the releases. For
> your example here, this is how it looks like in the stable-rc tree:
> 
> commit bdcc885be68289a37d0d063cd94390da81fd8178
> Author:     Lyude Paul <lyude@redhat.com>
> AuthorDate: Mon Jan 28 16:03:50 2019 -0500
> Commit:     Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> CommitDate: Fri Sep 13 14:05:29 2019 +0100
> 
>    drm/nouveau: Don't WARN_ON VCPI allocation failures

Yeah, we should fix your scripts to put the explicit From: line in here
as we are dealing with patches in this format and it causes confusion at
times (like now.)  It's not the first time and that's why I added those
lines to the patches.

thanks,

greg k-h
Sasha Levin Sept. 13, 2019, 3:01 p.m. UTC | #5
On Fri, Sep 13, 2019 at 03:54:56PM +0100, Greg Kroah-Hartman wrote:
>On Fri, Sep 13, 2019 at 10:46:27AM -0400, Sasha Levin wrote:
>> On Fri, Sep 13, 2019 at 09:33:36AM -0400, Ilia Mirkin wrote:
>> > Hi Greg,
>> >
>> > This feels like it's missing a From: line.
>> >
>> > commit b513a18cf1d705bd04efd91c417e79e4938be093
>> > Author: Lyude Paul <lyude@redhat.com>
>> > Date:   Mon Jan 28 16:03:50 2019 -0500
>> >
>> >    drm/nouveau: Don't WARN_ON VCPI allocation failures
>> >
>> > Is this an artifact of your notification-of-patches process and I
>> > never noticed before, or was the patch ingested incorrectly?
>>
>> It was always like this for patches that came through me. Greg's script
>> generates an explicit "From:" line in the patch, but I never saw the
>> value in that since git does the right thing by looking at the "From:"
>> line in the mail header.
>>
>> The right thing is being done in stable-rc and for the releases. For
>> your example here, this is how it looks like in the stable-rc tree:
>>
>> commit bdcc885be68289a37d0d063cd94390da81fd8178
>> Author:     Lyude Paul <lyude@redhat.com>
>> AuthorDate: Mon Jan 28 16:03:50 2019 -0500
>> Commit:     Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> CommitDate: Fri Sep 13 14:05:29 2019 +0100
>>
>>    drm/nouveau: Don't WARN_ON VCPI allocation failures
>
>Yeah, we should fix your scripts to put the explicit From: line in here
>as we are dealing with patches in this format and it causes confusion at
>times (like now.)  It's not the first time and that's why I added those
>lines to the patches.

Heh, didn't think anyone cared about this scenario for the stable-rc
patches.

I'll go add it.

But... why do you actually care?

--
Thanks,
Sasha
Ilia Mirkin Sept. 13, 2019, 3:09 p.m. UTC | #6
On Fri, Sep 13, 2019 at 11:01 AM Sasha Levin <sashal@kernel.org> wrote:
>
> On Fri, Sep 13, 2019 at 03:54:56PM +0100, Greg Kroah-Hartman wrote:
> >On Fri, Sep 13, 2019 at 10:46:27AM -0400, Sasha Levin wrote:
> >> On Fri, Sep 13, 2019 at 09:33:36AM -0400, Ilia Mirkin wrote:
> >> > Hi Greg,
> >> >
> >> > This feels like it's missing a From: line.
> >> >
> >> > commit b513a18cf1d705bd04efd91c417e79e4938be093
> >> > Author: Lyude Paul <lyude@redhat.com>
> >> > Date:   Mon Jan 28 16:03:50 2019 -0500
> >> >
> >> >    drm/nouveau: Don't WARN_ON VCPI allocation failures
> >> >
> >> > Is this an artifact of your notification-of-patches process and I
> >> > never noticed before, or was the patch ingested incorrectly?
> >>
> >> It was always like this for patches that came through me. Greg's script
> >> generates an explicit "From:" line in the patch, but I never saw the
> >> value in that since git does the right thing by looking at the "From:"
> >> line in the mail header.
> >>
> >> The right thing is being done in stable-rc and for the releases. For
> >> your example here, this is how it looks like in the stable-rc tree:
> >>
> >> commit bdcc885be68289a37d0d063cd94390da81fd8178
> >> Author:     Lyude Paul <lyude@redhat.com>
> >> AuthorDate: Mon Jan 28 16:03:50 2019 -0500
> >> Commit:     Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >> CommitDate: Fri Sep 13 14:05:29 2019 +0100
> >>
> >>    drm/nouveau: Don't WARN_ON VCPI allocation failures
> >
> >Yeah, we should fix your scripts to put the explicit From: line in here
> >as we are dealing with patches in this format and it causes confusion at
> >times (like now.)  It's not the first time and that's why I added those
> >lines to the patches.
>
> Heh, didn't think anyone cared about this scenario for the stable-rc
> patches.
>
> I'll go add it.
>
> But... why do you actually care?

Just a hygiene thing. Everyone else sends patches the normal way, with
accurate attribution. Why should stable be different?

(I was surprised to see Greg contributing to nouveau when I first saw
the patch. But then realized it was the stable ingestion
notification.)

  -ilia
Greg KH Sept. 13, 2019, 3:10 p.m. UTC | #7
On Fri, Sep 13, 2019 at 11:01:11AM -0400, Sasha Levin wrote:
> On Fri, Sep 13, 2019 at 03:54:56PM +0100, Greg Kroah-Hartman wrote:
> > On Fri, Sep 13, 2019 at 10:46:27AM -0400, Sasha Levin wrote:
> > > On Fri, Sep 13, 2019 at 09:33:36AM -0400, Ilia Mirkin wrote:
> > > > Hi Greg,
> > > >
> > > > This feels like it's missing a From: line.
> > > >
> > > > commit b513a18cf1d705bd04efd91c417e79e4938be093
> > > > Author: Lyude Paul <lyude@redhat.com>
> > > > Date:   Mon Jan 28 16:03:50 2019 -0500
> > > >
> > > >    drm/nouveau: Don't WARN_ON VCPI allocation failures
> > > >
> > > > Is this an artifact of your notification-of-patches process and I
> > > > never noticed before, or was the patch ingested incorrectly?
> > > 
> > > It was always like this for patches that came through me. Greg's script
> > > generates an explicit "From:" line in the patch, but I never saw the
> > > value in that since git does the right thing by looking at the "From:"
> > > line in the mail header.
> > > 
> > > The right thing is being done in stable-rc and for the releases. For
> > > your example here, this is how it looks like in the stable-rc tree:
> > > 
> > > commit bdcc885be68289a37d0d063cd94390da81fd8178
> > > Author:     Lyude Paul <lyude@redhat.com>
> > > AuthorDate: Mon Jan 28 16:03:50 2019 -0500
> > > Commit:     Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > CommitDate: Fri Sep 13 14:05:29 2019 +0100
> > > 
> > >    drm/nouveau: Don't WARN_ON VCPI allocation failures
> > 
> > Yeah, we should fix your scripts to put the explicit From: line in here
> > as we are dealing with patches in this format and it causes confusion at
> > times (like now.)  It's not the first time and that's why I added those
> > lines to the patches.
> 
> Heh, didn't think anyone cared about this scenario for the stable-rc
> patches.
> 
> I'll go add it.
> 
> But... why do you actually care?

On the emails we send out, it has inproper author information which can
cause confusion that the sender of the email (i.e. me) is somehow saying
that they are the author of the patch.

thanks,

greg k-h
Sasha Levin Sept. 13, 2019, 3:20 p.m. UTC | #8
On Fri, Sep 13, 2019 at 04:10:51PM +0100, Greg Kroah-Hartman wrote:
>On Fri, Sep 13, 2019 at 11:01:11AM -0400, Sasha Levin wrote:
>> On Fri, Sep 13, 2019 at 03:54:56PM +0100, Greg Kroah-Hartman wrote:
>> > On Fri, Sep 13, 2019 at 10:46:27AM -0400, Sasha Levin wrote:
>> > > On Fri, Sep 13, 2019 at 09:33:36AM -0400, Ilia Mirkin wrote:
>> > > > Hi Greg,
>> > > >
>> > > > This feels like it's missing a From: line.
>> > > >
>> > > > commit b513a18cf1d705bd04efd91c417e79e4938be093
>> > > > Author: Lyude Paul <lyude@redhat.com>
>> > > > Date:   Mon Jan 28 16:03:50 2019 -0500
>> > > >
>> > > >    drm/nouveau: Don't WARN_ON VCPI allocation failures
>> > > >
>> > > > Is this an artifact of your notification-of-patches process and I
>> > > > never noticed before, or was the patch ingested incorrectly?
>> > >
>> > > It was always like this for patches that came through me. Greg's script
>> > > generates an explicit "From:" line in the patch, but I never saw the
>> > > value in that since git does the right thing by looking at the "From:"
>> > > line in the mail header.
>> > >
>> > > The right thing is being done in stable-rc and for the releases. For
>> > > your example here, this is how it looks like in the stable-rc tree:
>> > >
>> > > commit bdcc885be68289a37d0d063cd94390da81fd8178
>> > > Author:     Lyude Paul <lyude@redhat.com>
>> > > AuthorDate: Mon Jan 28 16:03:50 2019 -0500
>> > > Commit:     Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> > > CommitDate: Fri Sep 13 14:05:29 2019 +0100
>> > >
>> > >    drm/nouveau: Don't WARN_ON VCPI allocation failures
>> >
>> > Yeah, we should fix your scripts to put the explicit From: line in here
>> > as we are dealing with patches in this format and it causes confusion at
>> > times (like now.)  It's not the first time and that's why I added those
>> > lines to the patches.
>>
>> Heh, didn't think anyone cared about this scenario for the stable-rc
>> patches.
>>
>> I'll go add it.
>>
>> But... why do you actually care?
>
>On the emails we send out, it has inproper author information which can
>cause confusion that the sender of the email (i.e. me) is somehow saying
>that they are the author of the patch.

Right right, I agree this is wrong and I'll fix it. I'm just concerned
about what exactly you are doing with the -rc patches to actually care
about this :)

--
Thanks,
Sasha
Sasha Levin Sept. 13, 2019, 3:26 p.m. UTC | #9
On Fri, Sep 13, 2019 at 11:09:22AM -0400, Ilia Mirkin wrote:
>On Fri, Sep 13, 2019 at 11:01 AM Sasha Levin <sashal@kernel.org> wrote:
>>
>> On Fri, Sep 13, 2019 at 03:54:56PM +0100, Greg Kroah-Hartman wrote:
>> >On Fri, Sep 13, 2019 at 10:46:27AM -0400, Sasha Levin wrote:
>> >> On Fri, Sep 13, 2019 at 09:33:36AM -0400, Ilia Mirkin wrote:
>> >> > Hi Greg,
>> >> >
>> >> > This feels like it's missing a From: line.
>> >> >
>> >> > commit b513a18cf1d705bd04efd91c417e79e4938be093
>> >> > Author: Lyude Paul <lyude@redhat.com>
>> >> > Date:   Mon Jan 28 16:03:50 2019 -0500
>> >> >
>> >> >    drm/nouveau: Don't WARN_ON VCPI allocation failures
>> >> >
>> >> > Is this an artifact of your notification-of-patches process and I
>> >> > never noticed before, or was the patch ingested incorrectly?
>> >>
>> >> It was always like this for patches that came through me. Greg's script
>> >> generates an explicit "From:" line in the patch, but I never saw the
>> >> value in that since git does the right thing by looking at the "From:"
>> >> line in the mail header.
>> >>
>> >> The right thing is being done in stable-rc and for the releases. For
>> >> your example here, this is how it looks like in the stable-rc tree:
>> >>
>> >> commit bdcc885be68289a37d0d063cd94390da81fd8178
>> >> Author:     Lyude Paul <lyude@redhat.com>
>> >> AuthorDate: Mon Jan 28 16:03:50 2019 -0500
>> >> Commit:     Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> >> CommitDate: Fri Sep 13 14:05:29 2019 +0100
>> >>
>> >>    drm/nouveau: Don't WARN_ON VCPI allocation failures
>> >
>> >Yeah, we should fix your scripts to put the explicit From: line in here
>> >as we are dealing with patches in this format and it causes confusion at
>> >times (like now.)  It's not the first time and that's why I added those
>> >lines to the patches.
>>
>> Heh, didn't think anyone cared about this scenario for the stable-rc
>> patches.
>>
>> I'll go add it.
>>
>> But... why do you actually care?
>
>Just a hygiene thing. Everyone else sends patches the normal way, with
>accurate attribution. Why should stable be different?

It shouldn't.

It's just a mismatch between our two somewhat seperate workflow.

Technically it's Greg who needs to be adding that line since the patches
I have in stable-queue correctly state the author, and it only goes
wrong when they're being formatted into mails sent for the -rc cycles.

But yes, thanks for pointing it out, I'll go add it in the scripts.

--
Thanks,
Sasha
diff mbox series

Patch

diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index f889d41a281fa..5e01bfb69d7a3 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -759,7 +759,8 @@  nv50_msto_enable(struct drm_encoder *encoder)
 
 	slots = drm_dp_find_vcpi_slots(&mstm->mgr, mstc->pbn);
 	r = drm_dp_mst_allocate_vcpi(&mstm->mgr, mstc->port, mstc->pbn, slots);
-	WARN_ON(!r);
+	if (!r)
+		DRM_DEBUG_KMS("Failed to allocate VCPI\n");
 
 	if (!mstm->links++)
 		nv50_outp_acquire(mstm->outp);