* Patch "drm/i915: Declare the swizzling unknown for L-shaped configurations" has been added to the 4.1-stable tree
@ 2015-07-30 19:12 gregkh
0 siblings, 0 replies; 2+ messages in thread
From: gregkh @ 2015-07-30 19:12 UTC (permalink / raw)
To: chris, daniel.vetter, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
drm/i915: Declare the swizzling unknown for L-shaped configurations
to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-i915-declare-the-swizzling-unknown-for-l-shaped-configurations.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 19ee835cdb0b5a8eb11a68f25a51b8039d564488 Mon Sep 17 00:00:00 2001
From: Chris Wilson <chris@chris-wilson.co.uk>
Date: Mon, 29 Jun 2015 14:01:19 +0100
Subject: drm/i915: Declare the swizzling unknown for L-shaped configurations
From: Chris Wilson <chris@chris-wilson.co.uk>
commit 19ee835cdb0b5a8eb11a68f25a51b8039d564488 upstream.
The old style of memory interleaving swizzled upto the end of the
first even bank of memory, and then used the remainder as unswizzled on
the unpaired bank - i.e. swizzling is not constant for all memory. This
causes problems when we try to migrate memory and so the kernel prevents
migration at all when we detect L-shaped inconsistent swizzling.
However, this issue also extends to userspace who try to manually detile
into memory as the swizzling for an individual page is unknown (it
depends on its physical address only known to the kernel), userspace
cannot correctly swizzle objects.
v2: Mark the global swizzling as unknown rather than adjust the value
reported to userspace.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91105
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/i915/i915_gem_tiling.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/i915/i915_gem_tiling.c
+++ b/drivers/gpu/drm/i915/i915_gem_tiling.c
@@ -183,8 +183,18 @@ i915_gem_detect_bit_6_swizzle(struct drm
if (IS_GEN4(dev)) {
uint32_t ddc2 = I915_READ(DCC2);
- if (!(ddc2 & DCC2_MODIFIED_ENHANCED_DISABLE))
+ if (!(ddc2 & DCC2_MODIFIED_ENHANCED_DISABLE)) {
+ /* Since the swizzling may vary within an
+ * object, we have no idea what the swizzling
+ * is for any page in particular. Thus we
+ * cannot migrate tiled pages using the GPU,
+ * nor can we tell userspace what the exact
+ * swizzling is for any object.
+ */
dev_priv->quirks |= QUIRK_PIN_SWIZZLED_PAGES;
+ swizzle_x = I915_BIT_6_SWIZZLE_UNKNOWN;
+ swizzle_y = I915_BIT_6_SWIZZLE_UNKNOWN;
+ }
}
if (dcc == 0xffffffff) {
Patches currently in stable-queue which might be from chris@chris-wilson.co.uk are
queue-4.1/drm-i915-declare-the-swizzling-unknown-for-l-shaped-configurations.patch
queue-4.1/drm-i915-fix-backlight-after-resume-on-855gm.patch
queue-4.1/revert-drm-i915-declare-the-swizzling-unknown-for-l-shaped-configurations.patch
queue-4.1/drm-stop-resetting-connector-state-to-unknown.patch
queue-4.1/drm-i915-snapshot-seqno-of-most-recently-submitted-request.patch
queue-4.1/drm-i915-use-two-32bit-reads-for-select-64bit-reg_read-ioctls.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
* Patch "drm/i915: Declare the swizzling unknown for L-shaped configurations" has been added to the 4.1-stable tree
@ 2015-08-10 21:35 gregkh
0 siblings, 0 replies; 2+ messages in thread
From: gregkh @ 2015-08-10 21:35 UTC (permalink / raw)
To: chris, daniel.vetter, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
drm/i915: Declare the swizzling unknown for L-shaped configurations
to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-i915-declare-the-swizzling-unknown-for-l-shaped-configurations.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 5eb3e5a5e11d14f9deb2a4b83555443b69ab9940 Mon Sep 17 00:00:00 2001
From: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sun, 28 Jun 2015 09:19:26 +0100
Subject: drm/i915: Declare the swizzling unknown for L-shaped configurations
From: Chris Wilson <chris@chris-wilson.co.uk>
commit 5eb3e5a5e11d14f9deb2a4b83555443b69ab9940 upstream.
The old style of memory interleaving swizzled upto the end of the
first even bank of memory, and then used the remainder as unswizzled on
the unpaired bank - i.e. swizzling is not constant for all memory. This
causes problems when we try to migrate memory and so the kernel prevents
migration at all when we detect L-shaped inconsistent swizzling.
However, this issue also extends to userspace who try to manually detile
into memory as the swizzling for an individual page is unknown (it
depends on its physical address only known to the kernel), userspace
cannot correctly swizzle.
Note that this is a new attempt for the previously merged one,
reverted in
commit d82c0ba6e306f079407f07003e53c262d683397b
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Tue Jul 14 12:29:27 2015 +0200
Revert "drm/i915: Declare the swizzling unknown for L-shaped configurations"
This is cc: stable since we need it to fix up troubles with wc cpu
mmaps that userspace recently started to use widely.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91105
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
[danvet: Add note about previous (failed attempt).]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/i915/i915_gem_tiling.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/i915/i915_gem_tiling.c
+++ b/drivers/gpu/drm/i915/i915_gem_tiling.c
@@ -464,7 +464,10 @@ i915_gem_get_tiling(struct drm_device *d
}
/* Hide bit 17 from the user -- see comment in i915_gem_set_tiling */
- args->phys_swizzle_mode = args->swizzle_mode;
+ if (dev_priv->quirks & QUIRK_PIN_SWIZZLED_PAGES)
+ args->phys_swizzle_mode = I915_BIT_6_SWIZZLE_UNKNOWN;
+ else
+ args->phys_swizzle_mode = args->swizzle_mode;
if (args->swizzle_mode == I915_BIT_6_SWIZZLE_9_17)
args->swizzle_mode = I915_BIT_6_SWIZZLE_9;
if (args->swizzle_mode == I915_BIT_6_SWIZZLE_9_10_17)
Patches currently in stable-queue which might be from chris@chris-wilson.co.uk are
queue-4.1/drm-i915-declare-the-swizzling-unknown-for-l-shaped-configurations.patch
queue-4.1/drm-i915-replace-warn-inside-i915_read64_2x32-with-retry-loop.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-10 21:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-30 19:12 Patch "drm/i915: Declare the swizzling unknown for L-shaped configurations" has been added to the 4.1-stable tree gregkh
-- strict thread matches above, loose matches on Subject: below --
2015-08-10 21:35 gregkh
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).