public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Move drm_framebuffer_unreference out of struct_mutex for takeover
Date: Tue, 10 Mar 2015 12:32:43 +0000	[thread overview]
Message-ID: <54FEE46B.8020200@linux.intel.com> (raw)
In-Reply-To: <20150310121932.GB28952@nuc-i3427.alporthouse.com>


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?

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-03-10 12:32 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 [this message]
2015-03-11 15:46         ` Ville Syrjälä
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=54FEE46B.8020200@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /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