[x86] drm/i915: Quietly reject attempts to create non-pagealigned stolen objects (Closes: #763155)
svn path=/dists/sid/linux/; revision=22435
This commit is contained in:
parent
88e31fedd8
commit
0b2d017901
|
@ -183,6 +183,8 @@ linux (3.16.7-ckt7-1) UNRELEASED; urgency=medium
|
||||||
SND_SOC_INTEL_BYT_RT5640_MACH, SND_SOC_INTEL_BYT_MAX98090_MACH as modules
|
SND_SOC_INTEL_BYT_RT5640_MACH, SND_SOC_INTEL_BYT_MAX98090_MACH as modules
|
||||||
(Closes: #773835)
|
(Closes: #773835)
|
||||||
* arcmsr: Backport changes up to Linux 3.18 (Closes: #698821)
|
* arcmsr: Backport changes up to Linux 3.18 (Closes: #698821)
|
||||||
|
* [x86] drm/i915: Quietly reject attempts to create non-pagealigned stolen
|
||||||
|
objects (Closes: #763155)
|
||||||
|
|
||||||
[ Helge Deller ]
|
[ Helge Deller ]
|
||||||
* [alpha] build debian-installer udeb packages
|
* [alpha] build debian-installer udeb packages
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
Subject: drm/i915: Quietly reject attempts to create non-pagealigned stolen
|
||||||
|
objects
|
||||||
|
From: Chris Wilson <chris@chris-wilson.co.uk>
|
||||||
|
Date: Wed, 10 Dec 2014 08:17:11 +0000
|
||||||
|
Origin: http://patchwork.freedesktop.org/patch/38659/
|
||||||
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=86883
|
||||||
|
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763155
|
||||||
|
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764528
|
||||||
|
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768027
|
||||||
|
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771227
|
||||||
|
|
||||||
|
This added as a BUG_ON as it considered that no one would ever request
|
||||||
|
an unaligned object. However, it turns out that some BIOSes will
|
||||||
|
allocate a scanout that is offset from 0 and not aligned to a page
|
||||||
|
boundary, and we were passing this through and hitting the BUG_ON during
|
||||||
|
boot.
|
||||||
|
|
||||||
|
Quietly reject such a request to reserve the unaligned stolen object and
|
||||||
|
let the boot continue, restoring previous behaviour (i.e. no BIOS
|
||||||
|
framebuffer preservation).
|
||||||
|
|
||||||
|
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86883
|
||||||
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
||||||
|
Cc: stable@vger.kernel.org
|
||||||
|
Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
|
||||||
|
Tested-by: Johannes W <jargon <at> molb.org>
|
||||||
|
---
|
||||||
|
drivers/gpu/drm/i915/i915_gem_stolen.c | 10 ++++++----
|
||||||
|
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
--- a/drivers/gpu/drm/i915/i915_gem_stolen.c
|
||||||
|
+++ b/drivers/gpu/drm/i915/i915_gem_stolen.c
|
||||||
|
@@ -431,13 +431,15 @@ i915_gem_object_create_stolen_for_preall
|
||||||
|
DRM_DEBUG_KMS("creating preallocated stolen object: stolen_offset=%x, gtt_offset=%x, size=%x\n",
|
||||||
|
stolen_offset, gtt_offset, size);
|
||||||
|
|
||||||
|
- /* KISS and expect everything to be page-aligned */
|
||||||
|
- BUG_ON(stolen_offset & 4095);
|
||||||
|
- BUG_ON(size & 4095);
|
||||||
|
-
|
||||||
|
if (WARN_ON(size == 0))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
+ /* KISS and expect everything to be GTT page-aligned */
|
||||||
|
+ if ((stolen_offset | size) & 4095) {
|
||||||
|
+ DRM_DEBUG_KMS("request for unaligned stolen object, denied\n");
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
stolen = kzalloc(sizeof(*stolen), GFP_KERNEL);
|
||||||
|
if (!stolen)
|
||||||
|
return NULL;
|
|
@ -540,3 +540,4 @@ features/all/arcmsr/0016-arcmsr-add-support-new-adapter-arc12x4-series.patch
|
||||||
features/all/arcmsr/0017-arcmsr-call-scsi_scan_host-at-the-end-of-host-initia.patch
|
features/all/arcmsr/0017-arcmsr-call-scsi_scan_host-at-the-end-of-host-initia.patch
|
||||||
features/all/arcmsr/0018-arcmsr-simplify-of-updating-doneq_index-and-postq_in.patch
|
features/all/arcmsr/0018-arcmsr-simplify-of-updating-doneq_index-and-postq_in.patch
|
||||||
features/all/arcmsr/0019-arcmsr-simplify-ioctl-data-read-write.patch
|
features/all/arcmsr/0019-arcmsr-simplify-ioctl-data-read-write.patch
|
||||||
|
bugfix/x86/drm-i915-quietly-reject-attempts-to-create-non-pagealigned-stolen-objects.patch
|
||||||
|
|
Loading…
Reference in New Issue