From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Move drm_framebuffer_unreference out of struct_mutex for takeover
Date: Wed, 11 Mar 2015 17:46:55 +0200 [thread overview]
Message-ID: <20150311154655.GT11371@intel.com> (raw)
In-Reply-To: <54FEE46B.8020200@linux.intel.com>
On Tue, Mar 10, 2015 at 12:32:43PM +0000, Tvrtko Ursulin wrote:
>
> On 03/10/2015 12:19 PM, Chris Wilson wrote:
> > On Tue, Mar 10, 2015 at 12:02:28PM +0000, Tvrtko Ursulin wrote:
> >>> @@ -13707,13 +13709,18 @@ void intel_modeset_gem_init(struct drm_device *dev)
> >>> NULL)) {
> >>> DRM_ERROR("failed to pin boot fb on pipe %d\n",
> >>> to_intel_crtc(c)->pipe);
> >>> - drm_framebuffer_unreference(c->primary->fb);
> >>> - c->primary->fb = NULL;
> >>> - update_state_fb(c->primary);
> >>> + unused[n_unused++] = c->primary;
> >>> }
> >>> }
> >>> mutex_unlock(&dev->struct_mutex);
> >>>
> >>> + while (n_unused--) {
> >>> + struct drm_plane *p = unused[n_unused];
> >>> + drm_framebuffer_unreference(p->fb);
> >>> + p->fb = NULL;
> >>> + update_state_fb(p);
> >>> + }
> >>> +
> >>
> >> For this one I am not sure. Should c->primary->fb = NULL remain
> >> under the locked loop? If not what is the the mutex protecting then?
> >
> > It's a dummy mutex that only exists to keep the WARNs quiet. This phase
> > of initialisation is explicitly single-threaded.
>
> Would it be a simpler fix then to move the mutex only around
> pin_and_fence_fb_obj?
That would be much nicer indeed.
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-03-11 15:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-16 14:31 [PATCH 1/2] drm/i915: Move drm_framebuffer_unreference out of struct_mutex for flips Chris Wilson
2015-02-16 14:31 ` [PATCH 2/2] drm/i915: Move drm_framebuffer_unreference out of struct_mutex for takeover Chris Wilson
2015-02-16 21:59 ` shuang.he
2015-03-10 12:02 ` Tvrtko Ursulin
2015-03-10 12:19 ` Chris Wilson
2015-03-10 12:32 ` Tvrtko Ursulin
2015-03-11 15:46 ` Ville Syrjälä [this message]
2015-02-23 23:10 ` [PATCH 1/2] drm/i915: Move drm_framebuffer_unreference out of struct_mutex for flips Daniel Vetter
2015-03-10 11:43 ` Tvrtko Ursulin
2015-03-10 12:56 ` 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=20150311154655.GT11371@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=tvrtko.ursulin@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox