Revert all DRM changes in 2.6.32.10 and apply all changes in 2.6.33.1-rc1

svn path=/dists/sid/linux-2.6/; revision=15376
This commit is contained in:
Ben Hutchings 2010-03-15 00:34:37 +00:00
parent fc6d1f8023
commit 6661048810
6 changed files with 276 additions and 2 deletions

3
debian/changelog vendored
View File

@ -4,7 +4,6 @@ linux-2.6 (2.6.32-10) UNRELEASED; urgency=low
* tcp: fix ICMP-RTO war.
* Add stable 2.6.32.10-rc1.
- net/via-rhine: Fix scheduling while atomic bugs (closes: #549606)
* drm/radeon/kms/atom: fix shr/shl ops.
[ Moritz Muehlenhoff ]
* Enable CONFIG_KEYS_DEBUG_PROC_KEYS (Closes: #400932)
@ -25,7 +24,7 @@ linux-2.6 (2.6.32-10) UNRELEASED; urgency=low
#554564, #554621, #559175, #559634)
[ Ben Hutchings ]
* drm: Apply all changes from 2.6.33:
* drm: Apply all changes from 2.6.33 and 2.6.33.1:
- Add nouveau driver
- i915: Fix disappearing mouse pointer (Closes: #551330)
- i915: Restore video overlay support (Closes: #560033)

View File

@ -0,0 +1,41 @@
From 7b9c5abee98c54f85bcc04bd4d7ec8d5094c73f4 Mon Sep 17 00:00:00 2001
From: Jesse Barnes <jbarnes@virtuousgeek.org>
Date: Fri, 12 Feb 2010 09:30:00 -0800
Subject: drm/i915: give up on 8xx lid status
From: Jesse Barnes <jbarnes@virtuousgeek.org>
commit 7b9c5abee98c54f85bcc04bd4d7ec8d5094c73f4 upstream.
These old machines more often than not lie about their lid state. So
don't use it to detect LVDS presence, but leave the event handler to
deal with lid open/close, when we might need to reset the mode.
Fixes kernel bug #15248
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/i915/intel_lvds.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -655,8 +655,15 @@ static const struct dmi_system_id bad_li
*/
static enum drm_connector_status intel_lvds_detect(struct drm_connector *connector)
{
+ struct drm_device *dev = connector->dev;
enum drm_connector_status status = connector_status_connected;
+ /* ACPI lid methods were generally unreliable in this generation, so
+ * don't even bother.
+ */
+ if (IS_I8XX(dev))
+ return connector_status_connected;
+
if (!dmi_check_system(bad_lid_status) && !acpi_lid_open())
status = connector_status_disconnected;

View File

@ -0,0 +1,70 @@
From 6070a4a928f8c92b9fae7d6717ebbb05f425d6b2 Mon Sep 17 00:00:00 2001
From: Zhao Yakui <yakui.zhao@intel.com>
Date: Mon, 8 Feb 2010 21:35:12 +0800
Subject: drm/i915: Use a dmi quirk to skip a broken SDVO TV output.
From: Zhao Yakui <yakui.zhao@intel.com>
commit 6070a4a928f8c92b9fae7d6717ebbb05f425d6b2 upstream.
This IBM system has a multi-function SDVO card that reports both VGA
and TV, but the system has no TV connector. The TV connector always
reported as connected, which would lead to poor modesetting choices.
https://bugs.freedesktop.org/show_bug.cgi?id=25787
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Tested-by: Vance <liangghv@sg.ibm.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/i915/intel_sdvo.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -35,6 +35,7 @@
#include "i915_drm.h"
#include "i915_drv.h"
#include "intel_sdvo_regs.h"
+#include <linux/dmi.h>
static char *tv_format_names[] = {
"NTSC_M" , "NTSC_J" , "NTSC_443",
@@ -2283,6 +2284,25 @@ intel_sdvo_get_slave_addr(struct drm_dev
return 0x72;
}
+static int intel_sdvo_bad_tv_callback(const struct dmi_system_id *id)
+{
+ DRM_DEBUG_KMS("Ignoring bad SDVO TV connector for %s\n", id->ident);
+ return 1;
+}
+
+static struct dmi_system_id intel_sdvo_bad_tv[] = {
+ {
+ .callback = intel_sdvo_bad_tv_callback,
+ .ident = "IntelG45/ICH10R/DME1737",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "IBM CORPORATION"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "4800784"),
+ },
+ },
+
+ { } /* terminating entry */
+};
+
static bool
intel_sdvo_output_setup(struct intel_output *intel_output, uint16_t flags)
{
@@ -2323,7 +2343,8 @@ intel_sdvo_output_setup(struct intel_out
(1 << INTEL_SDVO_NON_TV_CLONE_BIT) |
(1 << INTEL_ANALOG_CLONE_BIT);
}
- } else if (flags & SDVO_OUTPUT_SVID0) {
+ } else if ((flags & SDVO_OUTPUT_SVID0) &&
+ !dmi_check_system(intel_sdvo_bad_tv)) {
sdvo_priv->controlled_output = SDVO_OUTPUT_SVID0;
encoder->encoder_type = DRM_MODE_ENCODER_TVDAC;

View File

@ -0,0 +1,91 @@
From 290e55056ec3d25c72088628245d8cae037b30db Mon Sep 17 00:00:00 2001
From: Maarten Maathuis <madman2003@gmail.com>
Date: Sat, 20 Feb 2010 03:22:21 +0100
Subject: drm/ttm: handle OOM in ttm_tt_swapout
From: Maarten Maathuis <madman2003@gmail.com>
commit 290e55056ec3d25c72088628245d8cae037b30db upstream.
- Without this change I get a general protection fault.
- Also use PTR_ERR where applicable.
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/ttm/ttm_tt.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -480,7 +480,7 @@ static int ttm_tt_swapin(struct ttm_tt *
void *from_virtual;
void *to_virtual;
int i;
- int ret;
+ int ret = -ENOMEM;
if (ttm->page_flags & TTM_PAGE_FLAG_USER) {
ret = ttm_tt_set_user(ttm, ttm->tsk, ttm->start,
@@ -499,8 +499,10 @@ static int ttm_tt_swapin(struct ttm_tt *
for (i = 0; i < ttm->num_pages; ++i) {
from_page = read_mapping_page(swap_space, i, NULL);
- if (IS_ERR(from_page))
+ if (IS_ERR(from_page)) {
+ ret = PTR_ERR(from_page);
goto out_err;
+ }
to_page = __ttm_tt_get_page(ttm, i);
if (unlikely(to_page == NULL))
goto out_err;
@@ -523,7 +525,7 @@ static int ttm_tt_swapin(struct ttm_tt *
return 0;
out_err:
ttm_tt_free_alloced_pages(ttm);
- return -ENOMEM;
+ return ret;
}
int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage)
@@ -535,6 +537,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, s
void *from_virtual;
void *to_virtual;
int i;
+ int ret = -ENOMEM;
BUG_ON(ttm->state != tt_unbound && ttm->state != tt_unpopulated);
BUG_ON(ttm->caching_state != tt_cached);
@@ -557,7 +560,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, s
0);
if (unlikely(IS_ERR(swap_storage))) {
printk(KERN_ERR "Failed allocating swap storage.\n");
- return -ENOMEM;
+ return PTR_ERR(swap_storage);
}
} else
swap_storage = persistant_swap_storage;
@@ -569,9 +572,10 @@ int ttm_tt_swapout(struct ttm_tt *ttm, s
if (unlikely(from_page == NULL))
continue;
to_page = read_mapping_page(swap_space, i, NULL);
- if (unlikely(to_page == NULL))
+ if (unlikely(IS_ERR(to_page))) {
+ ret = PTR_ERR(to_page);
goto out_err;
-
+ }
preempt_disable();
from_virtual = kmap_atomic(from_page, KM_USER0);
to_virtual = kmap_atomic(to_page, KM_USER1);
@@ -595,5 +599,5 @@ out_err:
if (!persistant_swap_storage)
fput(swap_storage);
- return -ENOMEM;
+ return ret;
}

View File

@ -346,3 +346,73 @@ reverted:
dev_priv->display.get_display_clock_speed =
i945_get_display_clock_speed;
else if (IS_I915G(dev))
reverted:
--- b/drivers/gpu/drm/ttm/ttm_tt.c
+++ a/drivers/gpu/drm/ttm/ttm_tt.c
@@ -466,7 +466,7 @@
void *from_virtual;
void *to_virtual;
int i;
+ int ret;
- int ret = -ENOMEM;
if (ttm->page_flags & TTM_PAGE_FLAG_USER) {
ret = ttm_tt_set_user(ttm, ttm->tsk, ttm->start,
@@ -485,10 +485,8 @@
for (i = 0; i < ttm->num_pages; ++i) {
from_page = read_mapping_page(swap_space, i, NULL);
+ if (IS_ERR(from_page))
- if (IS_ERR(from_page)) {
- ret = PTR_ERR(from_page);
goto out_err;
- }
to_page = __ttm_tt_get_page(ttm, i);
if (unlikely(to_page == NULL))
goto out_err;
@@ -511,7 +509,7 @@
return 0;
out_err:
ttm_tt_free_alloced_pages(ttm);
+ return -ENOMEM;
- return ret;
}
int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage)
@@ -523,7 +521,6 @@
void *from_virtual;
void *to_virtual;
int i;
- int ret = -ENOMEM;
BUG_ON(ttm->state != tt_unbound && ttm->state != tt_unpopulated);
BUG_ON(ttm->caching_state != tt_cached);
@@ -546,7 +543,7 @@
0);
if (unlikely(IS_ERR(swap_storage))) {
printk(KERN_ERR "Failed allocating swap storage.\n");
+ return -ENOMEM;
- return PTR_ERR(swap_storage);
}
} else
swap_storage = persistant_swap_storage;
@@ -558,10 +555,9 @@
if (unlikely(from_page == NULL))
continue;
to_page = read_mapping_page(swap_space, i, NULL);
+ if (unlikely(to_page == NULL))
- if (unlikely(IS_ERR(to_page))) {
- ret = PTR_ERR(to_page);
goto out_err;
+
- }
preempt_disable();
from_virtual = kmap_atomic(from_page, KM_USER0);
to_virtual = kmap_atomic(to_page, KM_USER1);
@@ -585,5 +581,5 @@
if (!persistant_swap_storage)
fput(swap_storage);
+ return -ENOMEM;
- return ret;
}

View File

@ -35,4 +35,7 @@
+ bugfix/all/net-Fix-first-line-of-kernel-doc.patch
+ bugfix/all/video-fix-first-line-of-kernel-doc.patch
+ bugfix/all/mptscsih-Fix-first-line-of-kernel-doc.patch
+ bugfix/all/drm-i915-give-up-on-8xx-lid-status-2.patch
+ bugfix/all/drm-i915-use-a-dmi-quirk-to-skip-a-broken-sdvo-tv-output.patch
+ bugfix/all/drm-ttm-handle-oom-in-ttm_tt_swapout.patch
+ bugfix/all/drm-radeon-kms-atom-fix-shr-shl-ops.patch