All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Josh Boyer <jwboyer@fedoraproject.org>
Cc: Daniel Vetter <daniel@ffwll.ch>, Dave Airlie <airlied@linux.ie>,
	Xi Ruoyao <xry111@outlook.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	"Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>,
	DRI mailing list <dri-devel@lists.freedesktop.org>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [git pull] drm fixes
Date: Wed, 25 Mar 2015 18:17:03 +0100	[thread overview]
Message-ID: <20150325171703.GM1349@phenom.ffwll.local> (raw)
In-Reply-To: <CA+5PVA5pZQ1SmEQE6L4SdhPcX99u9Tj7+uA3LVp1wG-=Rz1RNA@mail.gmail.com>

On Wed, Mar 25, 2015 at 12:42:46PM -0400, Josh Boyer wrote:
> On Wed, Mar 25, 2015 at 11:53 AM, Josh Boyer <jwboyer@fedoraproject.org> wrote:
> > On Wed, Mar 25, 2015 at 11:50 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
> >> On Wed, Mar 25, 2015 at 11:37:35AM -0400, Josh Boyer wrote:
> >>> On Wed, Mar 25, 2015 at 10:00 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
> >>> > On Wed, Mar 25, 2015 at 09:11:17AM -0400, Josh Boyer wrote:
> >>> >> On Wed, Mar 25, 2015 at 4:54 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
> >>> >> >> >> commit f55548b5af87ebfc586ca75748947f1c1b1a4a52
> >>> >> >> >> Author: Damien Lespiau <damien.lespiau@intel.com>
> >>> >> >> >> Date:   Thu Feb 5 18:30:20 2015 +0000
> >>> >> >> >>
> >>> >> >> >>     drm/i915: Don't try to reference the fb in get_initial_plane_config()
> >>> >> >> >>
> >>> >> >> >> From linux-next?
> >>> >> >> >
> >>> >> >> > Yes, building now.  Will let you know as soon as I test it on both machines.
> >>> >> >>
> >>> >> >> OK, with that commit applied I no longer get the kref.h splat and the
> >>> >> >> NUC machine boots headless.  I still see the backtrace below on both
> >>> >> >> the NUC and the macbook.  I have a copy of it with drm.debug=0xff from
> >>> >> >> the NUC here:
> >>> >> >>
> >>> >> >> https://jwboyer.fedorapeople.org/pub/nuc-drm-debug-ff-with-fixes.txt
> >>> >> >>
> >>> >> >> Getting better at least :).
> >>> >> >
> >>> >> > On top of what you currently have please also cherry-pick
> >>> >> >
> >>> >> > commit fb9981aa675eb7b398849915364916fd98833cfa
> >>> >> > Author: Damien Lespiau <damien.lespiau@intel.com>
> >>> >> > Date:   Thu Feb 5 19:24:25 2015 +0000
> >>> >> >
> >>> >> >     drm/i915: Fix atomic state when reusing the firmware fb
> >>> >> >
> >>> >> > from -next. Let's hope this terminates eventually ;-)
> >>> >>
> >>> >> Hm.  That one doesn't apply cleanly.  I think because it needs:
> >>> >>
> >>> >> From 2d14030b1a9d0e89cfdca6f16851e2eac8cb4de0 Mon Sep 17 00:00:00 2001
> >>> >> From: Damien Lespiau <damien.lespiau@intel.com>
> >>> >> Date: Thu, 5 Feb 2015 17:22:18 +0000
> >>> >> Subject: drm/i915: Store the initial framebuffer in initial_plane_config
> >>> >>
> >>> >> first.  Do you want me to grab both, or should I try and figure out
> >>> >> how to backport fb9981aa67 without it?
> >>> >
> >>> > Oops missed that. The active ingredient is setting crtc->primary->state->crtc like this:
> >>> > -Daniel
> >>> >
> >>> >
> >>> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> >>> > index 1c12262029fb..bfc14a6046ea 100644
> >>> > --- a/drivers/gpu/drm/i915/intel_display.c
> >>> > +++ b/drivers/gpu/drm/i915/intel_display.c
> >>> > @@ -2439,6 +2439,7 @@ intel_find_plane_obj(struct intel_crtc *intel_crtc,
> >>> >                 return;
> >>> >
> >>> >         if (intel_alloc_plane_obj(intel_crtc, plane_config)) {
> >>> > +               intel_crtc->base.primary->state->crtc = &intel_crtc->base;
> >>> >                 update_state_fb(intel_crtc->base.primary);
> >>> >                 return;
> >>> >         }
> >>> > @@ -2469,6 +2470,7 @@ intel_find_plane_obj(struct intel_crtc *intel_crtc,
> >>> >
> >>> >                         drm_framebuffer_reference(c->primary->fb);
> >>> >                         intel_crtc->base.primary->fb = c->primary->fb;
> >>> > +                       intel_crtc->base.primary->state->crtc = &intel_crtc->base;
> >>> >                         obj->frontbuffer_bits |= INTEL_FRONTBUFFER_PRIMARY(intel_crtc->pipe);
> >>> >                         break;
> >>> >                 }
> >>>
> >>> Hm.  So I used your patch above.  The macbook boots fine and all the
> >>> oops/WARNS are gone except the audio one that was unrelated and
> >>> present before all of this.
> >>>
> >>> However, the NUC is back to not booting without HDMI plugged in.  I
> >>> did the drm.debug=0xff+blacklist/insmod trick again and put the
> >>> results up here:
> >>>
> >>> https://jwboyer.fedorapeople.org/pub/vetters.txt
> >>>
> >>> The frontbuffer splat is back now.
> >>>
> >>> I confirmed multiple times that the NUC boots fine with the kernel
> >>> that doesn't include the above patch but has the other two included
> >>> (albeit with the drm_atomic WARN still).
> >>>
> >>> Not sure what to make of this one.
> >>
> >> Yeah that fail looks like we're freeing an fb that's still in use.
> >> Hilarity happens and since that happens under console_lock at boot-up your
> >> machine dies.
> >>
> >> Does that machine die the same way in drm-intel-nightly/linux-next?
> >
> > I'll try that a bit later today.  Out of sheer curiosity, I folded
> > commit5ba76c41e55c (drm/i915: Put update_state_fb() next to the fb
> > update) into the patch above and kicked off a build.  The theory is
> > that we're picking up a bunch of other changes right in that range of
> > commits, why not try one more.  I'll let you know if that fixes
> > anything.  Otherwise, I'll try building drm-intel-nightly and/or
> > linux-next after that.
> 
> The drm-intel-nightly build finished first.  It boots without HDMI
> plugged in, but it has pretty much the same splats as the previous
> kernel.  Confused.  Full log here:
> 
> https://jwboyer.fedorapeople.org/pub/intel-nightly.txt
> 
> I don't have much hope for my other build.

Yeah that's at least good news for the theory I've been cooking meanwhile.
Can you try the below diff (on top of next/nightly)? For the current
cherry-pick pile on top of 4.0-rc you'd need to prepend intel_crtc->base.
to primary->...

Thanks, Daniel

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index ceb2e61b4c91..cb508542c6ab 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2594,6 +2594,7 @@ intel_find_plane_obj(struct intel_crtc *intel_crtc,
 
 		primary->fb = &plane_config->fb->base;
 		primary->state->crtc = &intel_crtc->base;
+		primary->crtc = &intel_crtc->base;
 		update_state_fb(primary);
 
 		return;
@@ -2627,6 +2628,7 @@ intel_find_plane_obj(struct intel_crtc *intel_crtc,
 			drm_framebuffer_reference(c->primary->fb);
 			primary->fb = c->primary->fb;
 			primary->state->crtc = &intel_crtc->base;
+			primary->crtc = &intel_crtc->base;
 			update_state_fb(intel_crtc->base.primary);
 			obj->frontbuffer_bits |= INTEL_FRONTBUFFER_PRIMARY(intel_crtc->pipe);
 			break;
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: Josh Boyer <jwboyer@fedoraproject.org>
Cc: Dave Airlie <airlied@linux.ie>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	"Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>,
	DRI mailing list <dri-devel@lists.freedesktop.org>,
	Xi Ruoyao <xry111@outlook.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [git pull] drm fixes
Date: Wed, 25 Mar 2015 18:17:03 +0100	[thread overview]
Message-ID: <20150325171703.GM1349@phenom.ffwll.local> (raw)
In-Reply-To: <CA+5PVA5pZQ1SmEQE6L4SdhPcX99u9Tj7+uA3LVp1wG-=Rz1RNA@mail.gmail.com>

On Wed, Mar 25, 2015 at 12:42:46PM -0400, Josh Boyer wrote:
> On Wed, Mar 25, 2015 at 11:53 AM, Josh Boyer <jwboyer@fedoraproject.org> wrote:
> > On Wed, Mar 25, 2015 at 11:50 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
> >> On Wed, Mar 25, 2015 at 11:37:35AM -0400, Josh Boyer wrote:
> >>> On Wed, Mar 25, 2015 at 10:00 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
> >>> > On Wed, Mar 25, 2015 at 09:11:17AM -0400, Josh Boyer wrote:
> >>> >> On Wed, Mar 25, 2015 at 4:54 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
> >>> >> >> >> commit f55548b5af87ebfc586ca75748947f1c1b1a4a52
> >>> >> >> >> Author: Damien Lespiau <damien.lespiau@intel.com>
> >>> >> >> >> Date:   Thu Feb 5 18:30:20 2015 +0000
> >>> >> >> >>
> >>> >> >> >>     drm/i915: Don't try to reference the fb in get_initial_plane_config()
> >>> >> >> >>
> >>> >> >> >> From linux-next?
> >>> >> >> >
> >>> >> >> > Yes, building now.  Will let you know as soon as I test it on both machines.
> >>> >> >>
> >>> >> >> OK, with that commit applied I no longer get the kref.h splat and the
> >>> >> >> NUC machine boots headless.  I still see the backtrace below on both
> >>> >> >> the NUC and the macbook.  I have a copy of it with drm.debug=0xff from
> >>> >> >> the NUC here:
> >>> >> >>
> >>> >> >> https://jwboyer.fedorapeople.org/pub/nuc-drm-debug-ff-with-fixes.txt
> >>> >> >>
> >>> >> >> Getting better at least :).
> >>> >> >
> >>> >> > On top of what you currently have please also cherry-pick
> >>> >> >
> >>> >> > commit fb9981aa675eb7b398849915364916fd98833cfa
> >>> >> > Author: Damien Lespiau <damien.lespiau@intel.com>
> >>> >> > Date:   Thu Feb 5 19:24:25 2015 +0000
> >>> >> >
> >>> >> >     drm/i915: Fix atomic state when reusing the firmware fb
> >>> >> >
> >>> >> > from -next. Let's hope this terminates eventually ;-)
> >>> >>
> >>> >> Hm.  That one doesn't apply cleanly.  I think because it needs:
> >>> >>
> >>> >> From 2d14030b1a9d0e89cfdca6f16851e2eac8cb4de0 Mon Sep 17 00:00:00 2001
> >>> >> From: Damien Lespiau <damien.lespiau@intel.com>
> >>> >> Date: Thu, 5 Feb 2015 17:22:18 +0000
> >>> >> Subject: drm/i915: Store the initial framebuffer in initial_plane_config
> >>> >>
> >>> >> first.  Do you want me to grab both, or should I try and figure out
> >>> >> how to backport fb9981aa67 without it?
> >>> >
> >>> > Oops missed that. The active ingredient is setting crtc->primary->state->crtc like this:
> >>> > -Daniel
> >>> >
> >>> >
> >>> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> >>> > index 1c12262029fb..bfc14a6046ea 100644
> >>> > --- a/drivers/gpu/drm/i915/intel_display.c
> >>> > +++ b/drivers/gpu/drm/i915/intel_display.c
> >>> > @@ -2439,6 +2439,7 @@ intel_find_plane_obj(struct intel_crtc *intel_crtc,
> >>> >                 return;
> >>> >
> >>> >         if (intel_alloc_plane_obj(intel_crtc, plane_config)) {
> >>> > +               intel_crtc->base.primary->state->crtc = &intel_crtc->base;
> >>> >                 update_state_fb(intel_crtc->base.primary);
> >>> >                 return;
> >>> >         }
> >>> > @@ -2469,6 +2470,7 @@ intel_find_plane_obj(struct intel_crtc *intel_crtc,
> >>> >
> >>> >                         drm_framebuffer_reference(c->primary->fb);
> >>> >                         intel_crtc->base.primary->fb = c->primary->fb;
> >>> > +                       intel_crtc->base.primary->state->crtc = &intel_crtc->base;
> >>> >                         obj->frontbuffer_bits |= INTEL_FRONTBUFFER_PRIMARY(intel_crtc->pipe);
> >>> >                         break;
> >>> >                 }
> >>>
> >>> Hm.  So I used your patch above.  The macbook boots fine and all the
> >>> oops/WARNS are gone except the audio one that was unrelated and
> >>> present before all of this.
> >>>
> >>> However, the NUC is back to not booting without HDMI plugged in.  I
> >>> did the drm.debug=0xff+blacklist/insmod trick again and put the
> >>> results up here:
> >>>
> >>> https://jwboyer.fedorapeople.org/pub/vetters.txt
> >>>
> >>> The frontbuffer splat is back now.
> >>>
> >>> I confirmed multiple times that the NUC boots fine with the kernel
> >>> that doesn't include the above patch but has the other two included
> >>> (albeit with the drm_atomic WARN still).
> >>>
> >>> Not sure what to make of this one.
> >>
> >> Yeah that fail looks like we're freeing an fb that's still in use.
> >> Hilarity happens and since that happens under console_lock at boot-up your
> >> machine dies.
> >>
> >> Does that machine die the same way in drm-intel-nightly/linux-next?
> >
> > I'll try that a bit later today.  Out of sheer curiosity, I folded
> > commit5ba76c41e55c (drm/i915: Put update_state_fb() next to the fb
> > update) into the patch above and kicked off a build.  The theory is
> > that we're picking up a bunch of other changes right in that range of
> > commits, why not try one more.  I'll let you know if that fixes
> > anything.  Otherwise, I'll try building drm-intel-nightly and/or
> > linux-next after that.
> 
> The drm-intel-nightly build finished first.  It boots without HDMI
> plugged in, but it has pretty much the same splats as the previous
> kernel.  Confused.  Full log here:
> 
> https://jwboyer.fedorapeople.org/pub/intel-nightly.txt
> 
> I don't have much hope for my other build.

Yeah that's at least good news for the theory I've been cooking meanwhile.
Can you try the below diff (on top of next/nightly)? For the current
cherry-pick pile on top of 4.0-rc you'd need to prepend intel_crtc->base.
to primary->...

Thanks, Daniel

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index ceb2e61b4c91..cb508542c6ab 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2594,6 +2594,7 @@ intel_find_plane_obj(struct intel_crtc *intel_crtc,
 
 		primary->fb = &plane_config->fb->base;
 		primary->state->crtc = &intel_crtc->base;
+		primary->crtc = &intel_crtc->base;
 		update_state_fb(primary);
 
 		return;
@@ -2627,6 +2628,7 @@ intel_find_plane_obj(struct intel_crtc *intel_crtc,
 			drm_framebuffer_reference(c->primary->fb);
 			primary->fb = c->primary->fb;
 			primary->state->crtc = &intel_crtc->base;
+			primary->crtc = &intel_crtc->base;
 			update_state_fb(intel_crtc->base.primary);
 			obj->frontbuffer_bits |= INTEL_FRONTBUFFER_PRIMARY(intel_crtc->pipe);
 			break;
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-03-25 17:15 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-20 21:49 [git pull] drm fixes Dave Airlie
2015-03-20 21:49 ` Dave Airlie
2015-03-21 17:50 ` Linus Torvalds
2015-03-23 15:33 ` Josh Boyer
2015-03-23 15:33   ` Josh Boyer
2015-03-23 18:34   ` Josh Boyer
2015-03-23 18:34     ` Josh Boyer
2015-03-24  7:32     ` [Intel-gfx] " Daniel Vetter
2015-03-24  7:32       ` Daniel Vetter
2015-03-24 13:15       ` [Intel-gfx] " Josh Boyer
2015-03-24 13:15         ` Josh Boyer
2015-03-24 13:40         ` [Intel-gfx] " Daniel Vetter
2015-03-24 13:40           ` Daniel Vetter
2015-03-24 13:57           ` Josh Boyer
2015-03-24 13:57             ` Josh Boyer
2015-03-24 14:22             ` [Intel-gfx] " Josh Boyer
2015-03-24 14:22               ` Josh Boyer
2015-03-24 14:34               ` [Intel-gfx] " Daniel Vetter
2015-03-24 14:34                 ` Daniel Vetter
2015-03-24 14:46                 ` Josh Boyer
2015-03-24 16:10                   ` Josh Boyer
2015-03-24 16:10                     ` Josh Boyer
2015-03-24 16:48                     ` [Intel-gfx] " Daniel Vetter
2015-03-24 16:48                       ` Daniel Vetter
2015-03-24 16:49                       ` [Intel-gfx] " Daniel Vetter
2015-03-24 16:54                         ` Josh Boyer
2015-03-25  3:49                           ` Xi Ruoyao
2015-03-25  3:49                             ` Xi Ruoyao
2015-03-25  8:54                     ` [Intel-gfx] " Daniel Vetter
2015-03-25  8:54                       ` Daniel Vetter
2015-03-25 13:11                       ` [Intel-gfx] " Josh Boyer
2015-03-25 14:00                         ` Daniel Vetter
2015-03-25 14:00                           ` Daniel Vetter
2015-03-25 14:56                           ` [Intel-gfx] " Xi Ruoyao
2015-03-25 14:56                             ` Xi Ruoyao
2015-03-25 15:12                             ` [Intel-gfx] " Xi Ruoyao
2015-03-25 15:12                               ` Xi Ruoyao
2015-03-25 15:19                             ` [Intel-gfx] " Jani Nikula
2015-03-25 15:19                               ` Jani Nikula
2015-03-25 15:26                           ` Takashi Iwai
2015-03-25 15:26                             ` Takashi Iwai
2015-03-25 15:37                           ` Josh Boyer
2015-03-25 15:50                             ` Daniel Vetter
2015-03-25 15:50                               ` Daniel Vetter
2015-03-25 15:53                               ` Josh Boyer
2015-03-25 15:53                                 ` Josh Boyer
2015-03-25 16:42                                 ` [Intel-gfx] " Josh Boyer
2015-03-25 16:42                                   ` Josh Boyer
2015-03-25 17:17                                   ` Daniel Vetter [this message]
2015-03-25 17:17                                     ` Daniel Vetter
2015-03-25 17:37                                     ` [Intel-gfx] " Josh Boyer
2015-03-25 17:37                                       ` Josh Boyer
2015-03-25 19:40                                       ` [Intel-gfx] " Josh Boyer
2015-03-25 19:40                                         ` Josh Boyer
2015-03-25 23:32                                         ` [Intel-gfx] " Xi Ruoyao
2015-03-25 23:32                                           ` Xi Ruoyao
2015-03-25 23:45                                           ` [Intel-gfx] " Xi Ruoyao
2015-03-26  8:41                                           ` Xi Ruoyao
2015-03-26  8:41                                             ` Xi Ruoyao
2015-03-26 12:06                                       ` [Intel-gfx] " Jani Nikula
2015-03-26 12:06                                         ` Jani Nikula
2015-03-26 12:02                       ` Jani Nikula
2015-03-26 12:02                         ` Jani Nikula
2015-03-24  1:41   ` Dave Jones
2015-03-25  8:56     ` Daniel Vetter
2015-03-25  8:56       ` Daniel Vetter
2015-03-25 14:34       ` Dave Jones
2015-03-25 14:34         ` Dave Jones
  -- strict thread matches above, loose matches on Subject: below --
2015-02-27  4:42 Dave Airlie
2015-03-01  5:40 ` Linus Torvalds
2015-03-01  6:08   ` Linus Torvalds
2015-03-01  7:27     ` Linus Torvalds
2015-03-01 20:35       ` Linus Torvalds
2015-03-01 21:00         ` Linus Torvalds
2015-03-02  1:59           ` Linus Torvalds
2015-03-02  9:04             ` Daniel Vetter
2015-03-02 16:53               ` Linus Torvalds
2015-03-02 17:23                 ` [Intel-gfx] " Daniel Vetter
2015-03-02 17:23                   ` Daniel Vetter
2015-03-02  9:44     ` Paul Bolle
2015-03-02 10:33       ` [Intel-gfx] " Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150325171703.GM1349@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jwboyer@fedoraproject.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=xry111@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.