From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Dave Airlie <airlied@linux.ie>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Chris Wilson <chris@chris-wilson.co.uk>,
Zhao Yakui <yakui.zhao@intel.com>
Subject: linux-next: manual merge of the drm tree with the drm-intel-fixes tree
Date: Thu, 22 May 2014 15:44:02 +1000 [thread overview]
Message-ID: <20140522154402.5daf8ac6@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 2515 bytes --]
Hi Dave,
Today's linux-next merge of the drm tree got a conflict in
drivers/gpu/drm/i915/i915_gem_execbuffer.c between commit 4eda4e461109
("drm/i915: Prevent negative relocation deltas from wrapping") from the
drm-intel-fixes tree and commit a8ebba75b358 ("drm/i915: Use the coarse
ping-pong mechanism based on drm fd to dispatch the BSD command on BDW
GT3") from the drm tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 6651195edcad,47fe8ecef135..000000000000
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@@ -1018,25 -1007,37 +1026,56 @@@ i915_reset_gen7_sol_offsets(struct drm_
return 0;
}
+static struct drm_i915_gem_object *
+eb_get_batch(struct eb_vmas *eb)
+{
+ struct i915_vma *vma = list_entry(eb->vmas.prev, typeof(*vma), exec_list);
+
+ /*
+ * SNA is doing fancy tricks with compressing batch buffers, which leads
+ * to negative relocation deltas. Usually that works out ok since the
+ * relocate address is still positive, except when the batch is placed
+ * very low in the GTT. Ensure this doesn't happen.
+ *
+ * Note that actual hangs have only been observed on gen7, but for
+ * paranoia do it everywhere.
+ */
+ vma->exec_entry->flags |= __EXEC_OBJECT_NEEDS_BIAS;
+
+ return vma->obj;
+}
+
+ /**
+ * Find one BSD ring to dispatch the corresponding BSD command.
+ * The Ring ID is returned.
+ */
+ static int gen8_dispatch_bsd_ring(struct drm_device *dev,
+ struct drm_file *file)
+ {
+ struct drm_i915_private *dev_priv = dev->dev_private;
+ struct drm_i915_file_private *file_priv = file->driver_priv;
+
+ /* Check whether the file_priv is using one ring */
+ if (file_priv->bsd_ring)
+ return file_priv->bsd_ring->id;
+ else {
+ /* If no, use the ping-pong mechanism to select one ring */
+ int ring_id;
+
+ mutex_lock(&dev->struct_mutex);
+ if (dev_priv->ring_index == 0) {
+ ring_id = VCS;
+ dev_priv->ring_index = 1;
+ } else {
+ ring_id = VCS2;
+ dev_priv->ring_index = 0;
+ }
+ file_priv->bsd_ring = &dev_priv->ring[ring_id];
+ mutex_unlock(&dev->struct_mutex);
+ return ring_id;
+ }
+ }
+
static int
i915_gem_do_execbuffer(struct drm_device *dev, void *data,
struct drm_file *file,
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next reply other threads:[~2014-05-22 5:44 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-22 5:44 Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-03-07 2:10 linux-next: manual merge of the drm tree with the drm-intel-fixes tree Stephen Rothwell
2024-03-07 8:27 ` Joonas Lahtinen
2023-04-17 14:39 broonie
2022-05-17 1:26 Stephen Rothwell
2022-02-25 16:14 broonie
2022-02-22 17:03 broonie
2020-05-08 3:50 Stephen Rothwell
2020-05-07 2:43 Stephen Rothwell
2020-01-22 0:37 Stephen Rothwell
2020-01-08 1:15 Stephen Rothwell
2020-01-08 1:10 Stephen Rothwell
2020-01-08 1:04 Stephen Rothwell
2020-01-08 2:28 ` Stephen Rothwell
2019-10-31 0:33 Stephen Rothwell
2019-11-08 0:42 ` Stephen Rothwell
2018-01-05 1:00 Stephen Rothwell
2017-07-21 1:26 Stephen Rothwell
2017-06-14 0:56 Stephen Rothwell
2017-06-14 0:50 Stephen Rothwell
2017-06-09 2:26 Stephen Rothwell
2017-06-08 2:53 Stephen Rothwell
2017-03-30 1:14 Stephen Rothwell
2017-03-30 1:08 Stephen Rothwell
2017-03-22 0:00 Stephen Rothwell
2017-03-27 17:14 ` Paul McKenney
2017-03-21 23:57 Stephen Rothwell
2017-03-21 0:28 Stephen Rothwell
2016-06-14 2:10 Stephen Rothwell
2015-12-22 23:06 Stephen Rothwell
2015-12-09 2:35 Stephen Rothwell
2015-12-03 14:51 Mark Brown
2015-12-03 15:49 ` Jani Nikula
2015-12-03 14:47 Mark Brown
2015-12-03 14:52 ` Imre Deak
2015-08-17 3:23 Stephen Rothwell
2015-06-05 5:46 mpe@ellerman.id.au
2015-06-05 8:03 ` Jani Nikula
2015-06-09 1:58 ` Stephen Rothwell
2015-03-16 2:30 Stephen Rothwell
2015-03-16 13:43 ` Xi Ruoyao
2015-03-16 15:04 ` Jani Nikula
2014-12-03 2:27 Stephen Rothwell
2014-12-03 8:24 ` Jani Nikula
2014-12-03 8:28 ` Stephen Rothwell
2014-11-17 3:04 Stephen Rothwell
2014-07-23 2:38 Stephen Rothwell
2014-07-09 4:06 Stephen Rothwell
2014-05-22 5:40 Stephen Rothwell
2014-05-07 3:24 Stephen Rothwell
2013-10-28 5:46 Stephen Rothwell
2013-10-28 6:12 ` 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=20140522154402.5daf8ac6@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=airlied@linux.ie \
--cc=chris@chris-wilson.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=yakui.zhao@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).