add four 2.6.33.2 drm fixes
referenced pci quirk is in 2.6.32.10. svn path=/dists/sid/linux-2.6/; revision=15462
This commit is contained in:
parent
a5f93cc74e
commit
240c86ae0b
85
debian/patches/bugfix/all/drm-i915-avoid-null-deref-in-get_pages-unwind-after-error.patch
vendored
Normal file
85
debian/patches/bugfix/all/drm-i915-avoid-null-deref-in-get_pages-unwind-after-error.patch
vendored
Normal file
|
@ -0,0 +1,85 @@
|
|||
From 1f2b10131f83f7caa67bf1273cec126b4283015d Mon Sep 17 00:00:00 2001
|
||||
From: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Date: Fri, 12 Mar 2010 19:52:55 +0000
|
||||
Subject: drm/i915: Avoid NULL deref in get_pages() unwind after error.
|
||||
|
||||
From: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
|
||||
commit 1f2b10131f83f7caa67bf1273cec126b4283015d upstream.
|
||||
|
||||
Fixes:
|
||||
http://bugzilla.kernel.org/show_bug.cgi?id=15527
|
||||
NULL pointer dereference in i915_gem_object_save_bit_17_swizzle
|
||||
|
||||
BUG: unable to handle kernel NULL pointer dereference at (null)
|
||||
IP: [<f82b5d2b>] i915_gem_object_save_bit_17_swizzle+0x5b/0xc0 [i915]
|
||||
Call Trace:
|
||||
[<f82aea55>] ? i915_gem_object_put_pages+0x125/0x150 [i915]
|
||||
[<f82aeb71>] ? i915_gem_object_get_pages+0xf1/0x110 [i915]
|
||||
[<f82b0de8>] ? i915_gem_object_bind_to_gtt+0xb8/0x2a0 [i915]
|
||||
[<c02db74d>] ? drm_mm_get_block_generic+0x4d/0x180
|
||||
[<f82b11cd>] ? i915_gem_mmap_gtt_ioctl+0x16d/0x240 [i915]
|
||||
[<f82ae786>] ? i915_gem_madvise_ioctl+0x86/0x120 [i915]
|
||||
|
||||
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Reported-by: maciej.rutecki@gmail.com
|
||||
Cc: stable@kernel.org
|
||||
Reviewed-by: Eric Anholt <eric@anholt.net>
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
|
||||
---
|
||||
drivers/gpu/drm/i915/i915_gem.c | 21 ++++++++++++---------
|
||||
1 file changed, 12 insertions(+), 9 deletions(-)
|
||||
|
||||
--- a/drivers/gpu/drm/i915/i915_gem.c
|
||||
+++ b/drivers/gpu/drm/i915/i915_gem.c
|
||||
@@ -1470,9 +1470,6 @@ i915_gem_object_put_pages(struct drm_gem
|
||||
obj_priv->dirty = 0;
|
||||
|
||||
for (i = 0; i < page_count; i++) {
|
||||
- if (obj_priv->pages[i] == NULL)
|
||||
- break;
|
||||
-
|
||||
if (obj_priv->dirty)
|
||||
set_page_dirty(obj_priv->pages[i]);
|
||||
|
||||
@@ -2228,7 +2225,6 @@ i915_gem_object_get_pages(struct drm_gem
|
||||
struct address_space *mapping;
|
||||
struct inode *inode;
|
||||
struct page *page;
|
||||
- int ret;
|
||||
|
||||
if (obj_priv->pages_refcount++ != 0)
|
||||
return 0;
|
||||
@@ -2251,11 +2247,9 @@ i915_gem_object_get_pages(struct drm_gem
|
||||
mapping_gfp_mask (mapping) |
|
||||
__GFP_COLD |
|
||||
gfpmask);
|
||||
- if (IS_ERR(page)) {
|
||||
- ret = PTR_ERR(page);
|
||||
- i915_gem_object_put_pages(obj);
|
||||
- return ret;
|
||||
- }
|
||||
+ if (IS_ERR(page))
|
||||
+ goto err_pages;
|
||||
+
|
||||
obj_priv->pages[i] = page;
|
||||
}
|
||||
|
||||
@@ -2263,6 +2257,15 @@ i915_gem_object_get_pages(struct drm_gem
|
||||
i915_gem_object_do_bit_17_swizzle(obj);
|
||||
|
||||
return 0;
|
||||
+
|
||||
+err_pages:
|
||||
+ while (i--)
|
||||
+ page_cache_release(obj_priv->pages[i]);
|
||||
+
|
||||
+ drm_free_large(obj_priv->pages);
|
||||
+ obj_priv->pages = NULL;
|
||||
+ obj_priv->pages_refcount--;
|
||||
+ return PTR_ERR(page);
|
||||
}
|
||||
|
||||
static void i965_write_fence_reg(struct drm_i915_fence_reg *reg)
|
53
debian/patches/bugfix/all/drm-i915-fix-small-leak-on-overlay-error-path.patch
vendored
Normal file
53
debian/patches/bugfix/all/drm-i915-fix-small-leak-on-overlay-error-path.patch
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
From 915a428e43acfd05e4ffeaf40549b0cf163eebe2 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Carpenter <error27@gmail.com>
|
||||
Date: Sat, 6 Mar 2010 14:05:39 +0300
|
||||
Subject: drm/i915: fix small leak on overlay error path
|
||||
|
||||
From: Dan Carpenter <error27@gmail.com>
|
||||
|
||||
commit 915a428e43acfd05e4ffeaf40549b0cf163eebe2 upstream.
|
||||
|
||||
We should free "params" before returning.
|
||||
|
||||
Signed-off-by: Dan Carpenter <error27@gmail.com>
|
||||
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
|
||||
---
|
||||
drivers/gpu/drm/i915/intel_overlay.c | 13 +++++++++----
|
||||
1 file changed, 9 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/gpu/drm/i915/intel_overlay.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_overlay.c
|
||||
@@ -1083,14 +1083,18 @@ int intel_overlay_put_image(struct drm_d
|
||||
|
||||
drmmode_obj = drm_mode_object_find(dev, put_image_rec->crtc_id,
|
||||
DRM_MODE_OBJECT_CRTC);
|
||||
- if (!drmmode_obj)
|
||||
- return -ENOENT;
|
||||
+ if (!drmmode_obj) {
|
||||
+ ret = -ENOENT;
|
||||
+ goto out_free;
|
||||
+ }
|
||||
crtc = to_intel_crtc(obj_to_crtc(drmmode_obj));
|
||||
|
||||
new_bo = drm_gem_object_lookup(dev, file_priv,
|
||||
put_image_rec->bo_handle);
|
||||
- if (!new_bo)
|
||||
- return -ENOENT;
|
||||
+ if (!new_bo) {
|
||||
+ ret = -ENOENT;
|
||||
+ goto out_free;
|
||||
+ }
|
||||
|
||||
mutex_lock(&dev->mode_config.mutex);
|
||||
mutex_lock(&dev->struct_mutex);
|
||||
@@ -1180,6 +1184,7 @@ out_unlock:
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
mutex_unlock(&dev->mode_config.mutex);
|
||||
drm_gem_object_unreference(new_bo);
|
||||
+out_free:
|
||||
kfree(params);
|
||||
|
||||
return ret;
|
40
debian/patches/bugfix/all/drm-nouveau-report-unknown-connector-state-if-lid-closed.patch
vendored
Normal file
40
debian/patches/bugfix/all/drm-nouveau-report-unknown-connector-state-if-lid-closed.patch
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
From b30083bdb990bcc2829fce83d871a86059ff4fc1 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Skeggs <bskeggs@redhat.com>
|
||||
Date: Thu, 25 Feb 2010 12:12:09 +1000
|
||||
Subject: drm/nouveau: report unknown connector state if lid closed
|
||||
|
||||
From: Ben Skeggs <bskeggs@redhat.com>
|
||||
|
||||
commit b30083bdb990bcc2829fce83d871a86059ff4fc1 upstream.
|
||||
|
||||
This is in preference to disconnected. If there's no other outputs
|
||||
connected this will cause LVDS to be programmed even with the lid
|
||||
closed rather than having X fail to start because of no available
|
||||
outputs.
|
||||
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
|
||||
---
|
||||
drivers/gpu/drm/nouveau/nouveau_connector.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
|
||||
@@ -239,12 +239,14 @@ nouveau_connector_detect(struct drm_conn
|
||||
if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)
|
||||
nv_encoder = find_encoder_by_type(connector, OUTPUT_LVDS);
|
||||
if (nv_encoder && nv_connector->native_mode) {
|
||||
+ unsigned status = connector_status_connected;
|
||||
+
|
||||
#ifdef CONFIG_ACPI
|
||||
if (!nouveau_ignorelid && !acpi_lid_open())
|
||||
- return connector_status_disconnected;
|
||||
+ status = connector_status_unknown;
|
||||
#endif
|
||||
nouveau_connector_set_encoder(connector, nv_encoder);
|
||||
- return connector_status_connected;
|
||||
+ return status;
|
||||
}
|
||||
|
||||
/* Cleanup the previous EDID block. */
|
56
debian/patches/bugfix/all/pci-quirk-rs780-rs880-work-around-missing-msi-initialization.patch
vendored
Normal file
56
debian/patches/bugfix/all/pci-quirk-rs780-rs880-work-around-missing-msi-initialization.patch
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
From a5ee4eb75413c145334c30e43f1af9875dad6fd7 Mon Sep 17 00:00:00 2001
|
||||
From: Clemens Ladisch <clemens@ladisch.de>
|
||||
Date: Mon, 22 Mar 2010 09:52:16 +0100
|
||||
Subject: PCI quirk: RS780/RS880: work around missing MSI initialization
|
||||
|
||||
From: Clemens Ladisch <clemens@ladisch.de>
|
||||
|
||||
commit a5ee4eb75413c145334c30e43f1af9875dad6fd7 upstream.
|
||||
|
||||
AMD says in section 2.5.4 (GFX MSI Enable) of #43291 (AMD 780G Family
|
||||
Register Programming Requirements):
|
||||
|
||||
The SBIOS must enable internal graphics MSI capability in GCCFG by
|
||||
setting the following: NBCFG.NB_CNTL.STRAP_MSI_ENABLE='1'
|
||||
|
||||
Quite a few BIOS writers misinterpret this sentence and think that
|
||||
enabling MSI is an optional feature. However, clearing that bit just
|
||||
prevents delivery of MSI messages but does not remove the MSI PCI
|
||||
capabilities registers, and so leaves these devices unusable for any
|
||||
driver that attempts to use MSI.
|
||||
|
||||
Setting that bit is not possible after the BIOS has locked down the
|
||||
configuration registers, so we have to manually disable MSI for the
|
||||
affected devices.
|
||||
|
||||
This fixes the codec communication errors in the HDA driver when
|
||||
accessing the HDMI audio device, and allows us to get rid of the
|
||||
overcautious quirk in radeon_irq_kms.c.
|
||||
|
||||
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
||||
Tested-by: Alex Deucher <alexdeucher@gamil.com>
|
||||
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
|
||||
---
|
||||
drivers/gpu/drm/radeon/radeon_irq_kms.c | 8 -------
|
||||
drivers/pci/quirks.c | 33 ++++++++++++++++++++++++++++++++
|
||||
2 files changed, 34 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
|
||||
+++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
|
||||
@@ -116,13 +116,7 @@ int radeon_irq_kms_init(struct radeon_de
|
||||
}
|
||||
/* enable msi */
|
||||
rdev->msi_enabled = 0;
|
||||
- /* MSIs don't seem to work on my rs780;
|
||||
- * not sure about rs880 or other rs780s.
|
||||
- * Needs more investigation.
|
||||
- */
|
||||
- if ((rdev->family >= CHIP_RV380) &&
|
||||
- (rdev->family != CHIP_RS780) &&
|
||||
- (rdev->family != CHIP_RS880)) {
|
||||
+ if (rdev->family >= CHIP_RV380) {
|
||||
int ret = pci_enable_msi(rdev->pdev);
|
||||
if (!ret) {
|
||||
rdev->msi_enabled = 1;
|
|
@ -13,3 +13,7 @@
|
|||
- bugfix/all/efifb_fix_v2.patch
|
||||
- bugfix/sparc/sparc64-Make-prom-entry-spinlock-NMI-safe.patch
|
||||
+ bugfix/all/stable/2.6.32.11-rc1.patch
|
||||
+ bugfix/all/drm-i915-avoid-null-deref-in-get_pages-unwind-after-error.patch
|
||||
+ bugfix/all/drm-i915-fix-small-leak-on-overlay-error-path.patch
|
||||
+ bugfix/all/drm-nouveau-report-unknown-connector-state-if-lid-closed.patch
|
||||
+ bugfix/all/pci-quirk-rs780-rs880-work-around-missing-msi-initialization.patch
|
||||
|
|
Loading…
Reference in New Issue