linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics <intel-gfx@lists.freedesktop.org>,
	DRI <dri-devel@lists.freedesktop.org>,
	Chris Wilson <chris@chris-wilson.co.uk>,
	Tvrtko Ursulin <tvrtko.ursulin@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Linux-Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: linux-next: manual merge of the drm-intel tree with the drm-intel-fixes tree
Date: Thu, 12 Oct 2017 19:44:25 +0100	[thread overview]
Message-ID: <20171012184425.hfzhcefiymldxvis@sirena.co.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 2897 bytes --]

Hi all,

Today's linux-next merge of the drm-intel tree got a conflict in:

  drivers/gpu/drm/i915/i915_gem.c

between commit:

  b85577b72837ee ("drm/i915: Order two completing nop_submit_request")

from the drm-intel-fixes tree and commit:

  af7a8ffad9c58d ("drm/i915: Use rcu instead of stop_machine in set_wedged")

from the drm-intel tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc drivers/gpu/drm/i915/i915_gem.c
index d5e58d4a5950,20fcac37c85a..000000000000
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@@ -3019,36 -3090,24 +3092,27 @@@ static void nop_submit_request(struct d
  	GEM_BUG_ON(!i915_terminally_wedged(&request->i915->gpu_error));
  	dma_fence_set_error(&request->fence, -EIO);
  
 -	i915_gem_request_submit(request);
 +	spin_lock_irqsave(&request->engine->timeline->lock, flags);
 +	__i915_gem_request_submit(request);
 +	intel_engine_init_global_seqno(request->engine, request->global_seqno);
 +	spin_unlock_irqrestore(&request->engine->timeline->lock, flags);
  }
  
- static void engine_set_wedged(struct intel_engine_cs *engine)
+ static void nop_complete_submit_request(struct drm_i915_gem_request *request)
  {
- 	/* We need to be sure that no thread is running the old callback as
- 	 * we install the nop handler (otherwise we would submit a request
- 	 * to hardware that will never complete). In order to prevent this
- 	 * race, we wait until the machine is idle before making the swap
- 	 * (using stop_machine()).
- 	 */
- 	engine->submit_request = nop_submit_request;
+ 	unsigned long flags;
  
- 	/* Mark all executing requests as skipped */
- 	engine->cancel_requests(engine);
+ 	GEM_BUG_ON(!i915_terminally_wedged(&request->i915->gpu_error));
+ 	dma_fence_set_error(&request->fence, -EIO);
  
- 	/* Mark all pending requests as complete so that any concurrent
- 	 * (lockless) lookup doesn't try and wait upon the request as we
- 	 * reset it.
- 	 */
- 	intel_engine_init_global_seqno(engine,
- 				       intel_engine_last_submit(engine));
+ 	spin_lock_irqsave(&request->engine->timeline->lock, flags);
+ 	__i915_gem_request_submit(request);
+ 	intel_engine_init_global_seqno(request->engine, request->global_seqno);
+ 	spin_unlock_irqrestore(&request->engine->timeline->lock, flags);
  }
  
- static int __i915_gem_set_wedged_BKL(void *data)
+ void i915_gem_set_wedged(struct drm_i915_private *i915)
  {
- 	struct drm_i915_private *i915 = data;
  	struct intel_engine_cs *engine;
  	enum intel_engine_id id;
  

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2017-10-12 18:44 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12 18:44 Mark Brown [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-02-25 17:08 linux-next: manual merge of the drm-intel tree with the drm-intel-fixes tree broonie
2022-02-23 14:46 broonie
2022-02-02 23:59 Stephen Rothwell
2021-08-02 15:18 Mark Brown
2020-06-30  1:52 Stephen Rothwell
2020-07-06  1:51 ` Stephen Rothwell
2020-03-11  2:36 Stephen Rothwell
2020-03-20  1:57 ` Stephen Rothwell
2019-03-21 23:57 Stephen Rothwell
2019-03-31 22:59 ` Stephen Rothwell
2017-10-18  9:27 Mark Brown
2017-10-16 11:35 Mark Brown
2017-10-17  8:11 ` Arnd Bergmann
2017-10-17  8:30   ` Mark Brown
2017-10-12 18:36 Mark Brown
2017-06-08  3:07 Stephen Rothwell
2017-06-08  3:04 Stephen Rothwell
2017-03-21  0:37 Stephen Rothwell
2016-08-24  1:42 Stephen Rothwell
2016-08-24  1:32 Stephen Rothwell
2016-06-22  1:40 Stephen Rothwell
2015-11-18  0:30 Stephen Rothwell
2015-09-30  1:32 Stephen Rothwell
2015-09-24  1:25 Stephen Rothwell
2015-09-24  8:57 ` Jani Nikula
2015-09-24 11:52   ` Stephen Rothwell
2015-07-15  0:15 Stephen Rothwell
2015-07-14  2:11 Stephen Rothwell
2015-07-14  7:34 ` Daniel Vetter
2015-07-10  2:15 Stephen Rothwell
2015-07-10  2:08 Stephen Rothwell
2015-02-27  0:36 Stephen Rothwell
2015-02-26  0:15 Stephen Rothwell
2015-02-25  1:05 Stephen Rothwell
2015-01-09  2:06 Stephen Rothwell
2014-05-22  5:58 Stephen Rothwell
2014-04-30  2:37 Stephen Rothwell
2013-12-16  1:45 Stephen Rothwell
2013-12-02  1:04 Stephen Rothwell
2013-12-02  1:13 ` Stephen Rothwell
2013-09-25  2:00 Stephen Rothwell
2013-09-20  1:40 Stephen Rothwell
2013-07-26  3:14 Stephen Rothwell
2013-07-26  3:10 Stephen Rothwell
2013-07-18  2:07 Stephen Rothwell
2013-07-18  1:44 Stephen Rothwell
2013-07-16  2:05 Stephen Rothwell

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=20171012184425.hfzhcefiymldxvis@sirena.co.uk \
    --to=broonie@kernel.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=tvrtko.ursulin@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;
as well as URLs for NNTP newsgroup(s).