--- /dev/null
+From 61dd98fad58f945ed720ba132681acb58fcee015 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Thu, 13 May 2010 14:55:28 -0400
+Subject: drm/edid: Fix 1024x768@85Hz
+
+From: Adam Jackson <ajax@redhat.com>
+
+commit 61dd98fad58f945ed720ba132681acb58fcee015 upstream.
+
+Having hsync both start and end on pixel 1072 ain't gonna work very
+well. Matches the X server's list.
+
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+Tested-By: Michael Tokarev <mjt@tls.msk.ru>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/gpu/drm/drm_edid.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/drm_edid.c
++++ b/drivers/gpu/drm/drm_edid.c
+@@ -334,7 +334,7 @@ static struct drm_display_mode drm_dmt_m
+ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
+ /* 1024x768@85Hz */
+ { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 94500, 1024, 1072,
+- 1072, 1376, 0, 768, 769, 772, 808, 0,
++ 1168, 1376, 0, 768, 769, 772, 808, 0,
+ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
+ /* 1152x864@75Hz */
+ { DRM_MODE("1152x864", DRM_MODE_TYPE_DRIVER, 108000, 1152, 1216,
--- /dev/null
+From fb8b5a39b6310379d7b54c0c7113703a8eaf4a57 Mon Sep 17 00:00:00 2001
+From: Zhao Yakui <yakui.zhao@intel.com>
+Date: Wed, 7 Apr 2010 17:11:19 +0800
+Subject: drm/i915: Configure the TV sense state correctly on GM45 to make TV detection reliable
+
+From: Zhao Yakui <yakui.zhao@intel.com>
+
+commit fb8b5a39b6310379d7b54c0c7113703a8eaf4a57 upstream.
+
+The TV detection logic is not reliable on the Cantiga platform.
+Sometimes the TV will be misdetected as the following two cases:
+- TV is misdetected on some laptops. e.g. There is no TV connector
+port or no TV is attached. But the TV is shown as connected.
+- TV connector type is misdetected. e.g. the component TV is
+attached, but the TV is shown as S-video type.
+
+According to the hardware requirement, the TV sense state bits of TV DAC
+register should be cleared to zero on Cantiga platfrom.
+
+https://bugzilla.kernel.org/show_bug.cgi?id=14792
+
+Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
+Tested-by: Santi <santi@agolina.net>
+Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
+Signed-off-by: Eric Anholt <eric@anholt.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/gpu/drm/i915/intel_tv.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/drivers/gpu/drm/i915/intel_tv.c
++++ b/drivers/gpu/drm/i915/intel_tv.c
+@@ -1399,6 +1399,15 @@ intel_tv_detect_type (struct drm_crtc *c
+ DAC_A_0_7_V |
+ DAC_B_0_7_V |
+ DAC_C_0_7_V);
++
++ /*
++ * The TV sense state should be cleared to zero on cantiga platform. Otherwise
++ * the TV is misdetected. This is hardware requirement.
++ */
++ if (IS_GM45(dev))
++ tv_dac &= ~(TVDAC_STATE_CHG_EN | TVDAC_A_SENSE_CTL |
++ TVDAC_B_SENSE_CTL | TVDAC_C_SENSE_CTL);
++
+ I915_WRITE(TV_CTL, tv_ctl);
+ I915_WRITE(TV_DAC, tv_dac);
+ intel_wait_for_vblank(dev);
--- /dev/null
+From 1ff26a3604d0292988d4cade0e49ba9918dbfd46 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexdeucher@gmail.com>
+Date: Tue, 18 May 2010 00:23:15 -0400
+Subject: drm/radeon/kms/atom: fix typo in LVDS panel info parsing
+
+From: Alex Deucher <alexdeucher@gmail.com>
+
+commit 1ff26a3604d0292988d4cade0e49ba9918dbfd46 upstream.
+
+Fixes LVDS issues on some laptops; notably laptops with
+2048x1536 panels.
+
+Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/gpu/drm/radeon/radeon_atombios.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/radeon/radeon_atombios.c
++++ b/drivers/gpu/drm/radeon/radeon_atombios.c
+@@ -1136,7 +1136,7 @@ struct radeon_encoder_atom_dig *radeon_a
+ lvds->native_mode.vtotal = lvds->native_mode.vdisplay +
+ le16_to_cpu(lvds_info->info.sLCDTiming.usVBlanking_Time);
+ lvds->native_mode.vsync_start = lvds->native_mode.vdisplay +
+- le16_to_cpu(lvds_info->info.sLCDTiming.usVSyncWidth);
++ le16_to_cpu(lvds_info->info.sLCDTiming.usVSyncOffset);
+ lvds->native_mode.vsync_end = lvds->native_mode.vsync_start +
+ le16_to_cpu(lvds_info->info.sLCDTiming.usVSyncWidth);
+ lvds->panel_pwr_delay =
--- /dev/null
+From 2bfcc0fc698d550689ef020c73b2d977b73e728c Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexdeucher@gmail.com>
+Date: Tue, 18 May 2010 19:26:46 -0400
+Subject: drm/radeon/kms: reset ddc_bus in object header parsing
+
+From: Alex Deucher <alexdeucher@gmail.com>
+
+commit 2bfcc0fc698d550689ef020c73b2d977b73e728c upstream.
+
+Some LVDS connectors don't have a ddc bus, so reset the
+ddc bus to invalid before parsing the next connector
+to avoid using stale ddc bus data. Should fix
+fdo bug 28164.
+
+Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/gpu/drm/radeon/radeon_atombios.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+--- a/drivers/gpu/drm/radeon/radeon_atombios.c
++++ b/drivers/gpu/drm/radeon/radeon_atombios.c
+@@ -514,6 +514,8 @@ bool radeon_get_atom_connector_info_from
+ }
+
+ /* look up gpio for ddc, hpd */
++ ddc_bus.valid = false;
++ hpd.hpd = RADEON_HPD_NONE;
+ if ((le16_to_cpu(path->usDeviceTag) &
+ (ATOM_DEVICE_TV_SUPPORT | ATOM_DEVICE_CV_SUPPORT)) == 0) {
+ for (j = 0; j < con_obj->ucNumberOfObjects; j++) {
+@@ -569,9 +571,6 @@ bool radeon_get_atom_connector_info_from
+ break;
+ }
+ }
+- } else {
+- hpd.hpd = RADEON_HPD_NONE;
+- ddc_bus.valid = false;
+ }
+
+ conn_id = le16_to_cpu(path->usConnObjectId);
--- /dev/null
+From 637a99022fb119b90fb281715d13172f0394fc12 Mon Sep 17 00:00:00 2001
+From: Jeff Mahoney <jeffm@suse.com>
+Date: Wed, 17 Mar 2010 10:55:51 +0000
+Subject: powerpc: Fix handling of strncmp with zero len
+
+From: Jeff Mahoney <jeffm@suse.com>
+
+commit 637a99022fb119b90fb281715d13172f0394fc12 upstream.
+
+Commit 0119536c, which added the assembly version of strncmp to
+powerpc, mentions that it adds two instructions to the version from
+boot/string.S to allow it to handle len=0. Unfortunately, it doesn't
+always return 0 when that is the case. The length is passed in r5, but
+the return value is passed back in r3. In certain cases, this will
+happen to work. Otherwise it will pass back the address of the first
+string as the return value.
+
+This patch lifts the len <= 0 handling code from memcpy to handle that
+case.
+
+Reported by: Christian_Sellars@symantec.com
+Signed-off-by: Jeff Mahoney <jeffm@suse.com>
+Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/powerpc/lib/string.S | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/arch/powerpc/lib/string.S
++++ b/arch/powerpc/lib/string.S
+@@ -71,7 +71,7 @@ _GLOBAL(strcmp)
+
+ _GLOBAL(strncmp)
+ PPC_LCMPI r5,0
+- beqlr
++ ble- 2f
+ mtctr r5
+ addi r5,r3,-1
+ addi r4,r4,-1
+@@ -82,6 +82,8 @@ _GLOBAL(strncmp)
+ beqlr 1
+ bdnzt eq,1b
+ blr
++2: li r3,0
++ blr
+
+ _GLOBAL(strlen)
+ addi r4,r3,-1
--- /dev/null
+From 238c1a78c957f3dc7cb848b161dcf4805793ed56 Mon Sep 17 00:00:00 2001
+From: Denis Kirjanov <dkirjanov@hera.kernel.org>
+Date: Tue, 1 Jun 2010 15:43:34 -0400
+Subject: powerpc/oprofile: fix potential buffer overrun in op_model_cell.c
+
+From: Denis Kirjanov <dkirjanov@hera.kernel.org>
+
+commit 238c1a78c957f3dc7cb848b161dcf4805793ed56 upstream.
+
+Fix potential initial_lfsr buffer overrun.
+Writing past the end of the buffer could happen when index == ENTRIES
+
+Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
+Signed-off-by: Robert Richter <robert.richter@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/powerpc/oprofile/op_model_cell.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/powerpc/oprofile/op_model_cell.c
++++ b/arch/powerpc/oprofile/op_model_cell.c
+@@ -1077,7 +1077,7 @@ static int calculate_lfsr(int n)
+ index = ENTRIES-1;
+
+ /* make sure index is valid */
+- if ((index > ENTRIES) || (index < 0))
++ if ((index >= ENTRIES) || (index < 0))
+ index = ENTRIES-1;
+
+ return initial_lfsr[index];
--- /dev/null
+From f8b67691828321f5c85bb853283aa101ae673130 Mon Sep 17 00:00:00 2001
+From: Michael Neuling <mikey@neuling.org>
+Date: Wed, 28 Apr 2010 13:39:41 +0000
+Subject: powerpc/pseries: Make query_cpu_stopped callable outside hotplug cpu
+
+From: Michael Neuling <mikey@neuling.org>
+
+commit f8b67691828321f5c85bb853283aa101ae673130 upstream.
+
+This moves query_cpu_stopped() out of the hotplug cpu code and into
+smp.c so it can called in other places and renames it to
+smp_query_cpu_stopped().
+
+It also cleans up the return values by adding some #defines
+
+Signed-off-by: Michael Neuling <mikey@neuling.org>
+Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/powerpc/platforms/pseries/hotplug-cpu.c | 30 +++---------------------
+ arch/powerpc/platforms/pseries/plpar_wrappers.h | 8 ++++++
+ arch/powerpc/platforms/pseries/smp.c | 22 +++++++++++++++++
+ 3 files changed, 34 insertions(+), 26 deletions(-)
+
+--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
++++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
+@@ -154,30 +154,6 @@ static void pseries_mach_cpu_die(void)
+ for(;;);
+ }
+
+-static int qcss_tok; /* query-cpu-stopped-state token */
+-
+-/* Get state of physical CPU.
+- * Return codes:
+- * 0 - The processor is in the RTAS stopped state
+- * 1 - stop-self is in progress
+- * 2 - The processor is not in the RTAS stopped state
+- * -1 - Hardware Error
+- * -2 - Hardware Busy, Try again later.
+- */
+-static int query_cpu_stopped(unsigned int pcpu)
+-{
+- int cpu_status, status;
+-
+- status = rtas_call(qcss_tok, 1, 2, &cpu_status, pcpu);
+- if (status != 0) {
+- printk(KERN_ERR
+- "RTAS query-cpu-stopped-state failed: %i\n", status);
+- return status;
+- }
+-
+- return cpu_status;
+-}
+-
+ static int pseries_cpu_disable(void)
+ {
+ int cpu = smp_processor_id();
+@@ -224,8 +200,9 @@ static void pseries_cpu_die(unsigned int
+ } else if (get_preferred_offline_state(cpu) == CPU_STATE_OFFLINE) {
+
+ for (tries = 0; tries < 25; tries++) {
+- cpu_status = query_cpu_stopped(pcpu);
+- if (cpu_status == 0 || cpu_status == -1)
++ cpu_status = smp_query_cpu_stopped(pcpu);
++ if (cpu_status == QCSS_STOPPED ||
++ cpu_status == QCSS_HARDWARE_ERROR)
+ break;
+ cpu_relax();
+ }
+@@ -400,6 +377,7 @@ static int __init pseries_cpu_hotplug_in
+ struct device_node *np;
+ const char *typep;
+ int cpu;
++ int qcss_tok;
+
+ for_each_node_by_name(np, "interrupt-controller") {
+ typep = of_get_property(np, "compatible", NULL);
+--- a/arch/powerpc/platforms/pseries/plpar_wrappers.h
++++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h
+@@ -4,6 +4,14 @@
+ #include <asm/hvcall.h>
+ #include <asm/page.h>
+
++/* Get state of physical CPU from query_cpu_stopped */
++int smp_query_cpu_stopped(unsigned int pcpu);
++#define QCSS_STOPPED 0
++#define QCSS_STOPPING 1
++#define QCSS_NOT_STOPPED 2
++#define QCSS_HARDWARE_ERROR -1
++#define QCSS_HARDWARE_BUSY -2
++
+ static inline long poll_pending(void)
+ {
+ return plpar_hcall_norets(H_POLL_PENDING);
+--- a/arch/powerpc/platforms/pseries/smp.c
++++ b/arch/powerpc/platforms/pseries/smp.c
+@@ -57,6 +57,28 @@
+ */
+ static cpumask_t of_spin_map;
+
++/* Query where a cpu is now. Return codes #defined in plpar_wrappers.h */
++int smp_query_cpu_stopped(unsigned int pcpu)
++{
++ int cpu_status, status;
++ int qcss_tok = rtas_token("query-cpu-stopped-state");
++
++ if (qcss_tok == RTAS_UNKNOWN_SERVICE) {
++ printk(KERN_INFO "Firmware doesn't support "
++ "query-cpu-stopped-state\n");
++ return QCSS_HARDWARE_ERROR;
++ }
++
++ status = rtas_call(qcss_tok, 1, 2, &cpu_status, pcpu);
++ if (status != 0) {
++ printk(KERN_ERR
++ "RTAS query-cpu-stopped-state failed: %i\n", status);
++ return status;
++ }
++
++ return cpu_status;
++}
++
+ /**
+ * smp_startup_cpu() - start the given cpu
+ *
--- /dev/null
+From aef40e87d866355ffd279ab21021de733242d0d5 Mon Sep 17 00:00:00 2001
+From: Michael Neuling <mikey@neuling.org>
+Date: Wed, 28 Apr 2010 13:39:41 +0000
+Subject: powerpc/pseries: Only call start-cpu when a CPU is stopped
+
+From: Michael Neuling <mikey@neuling.org>
+
+commit aef40e87d866355ffd279ab21021de733242d0d5 upstream.
+
+Currently we always call start-cpu irrespective of if the CPU is
+stopped or not. Unfortunatley on POWER7, firmware seems to not like
+start-cpu being called when a cpu already been started. This was not
+the case on POWER6 and earlier.
+
+This patch checks to see if the CPU is stopped or not via an
+query-cpu-stopped-state call, and only calls start-cpu on CPUs which
+are stopped.
+
+This fixes a bug with kexec on POWER7 on PHYP where only the primary
+thread would make it to the second kernel.
+
+Reported-by: Ankita Garg <ankita@linux.vnet.ibm.com>
+Signed-off-by: Michael Neuling <mikey@neuling.org>
+Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/powerpc/platforms/pseries/smp.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/arch/powerpc/platforms/pseries/smp.c
++++ b/arch/powerpc/platforms/pseries/smp.c
+@@ -82,6 +82,12 @@ static inline int __devinit smp_startup_
+
+ pcpu = get_hard_smp_processor_id(lcpu);
+
++ /* Check to see if the CPU out of FW already for kexec */
++ if (smp_query_cpu_stopped(pcpu) == QCSS_NOT_STOPPED){
++ cpu_set(lcpu, of_spin_map);
++ return 1;
++ }
++
+ /* Fixup atomic count: it exited inside IRQ handler. */
+ task_thread_info(paca[lcpu].__current)->preempt_count = 0;
+
pci-quirk-disable-msi-on-via-k8t890-systems.patch
pci-quirks-disable-msi-on-amd-rs4xx-internal-gfx-bridges.patch
pci-disable-msi-for-mcp55-on-p5n32-e-sli.patch
+drm-edid-fix-1024x768-85hz.patch
+drm-radeon-kms-reset-ddc_bus-in-object-header-parsing.patch
+drm-radeon-kms-atom-fix-typo-in-lvds-panel-info-parsing.patch
+drm-i915-configure-the-tv-sense-state-correctly-on-gm45-to-make-tv-detection-reliable.patch
+powerpc-fix-handling-of-strncmp-with-zero-len.patch
+powerpc-pseries-only-call-start-cpu-when-a-cpu-is-stopped.patch
+powerpc-pseries-make-query_cpu_stopped-callable-outside-hotplug-cpu.patch
+powerpc-oprofile-fix-potential-buffer-overrun-in-op_model_cell.c.patch
+writeback-disable-periodic-old-data-writeback-for-dirty_writeback_centisecs.patch
--- /dev/null
+From 69b62d01ec44fe0d505d89917392347732135a4d Mon Sep 17 00:00:00 2001
+From: Jens Axboe <jens.axboe@oracle.com>
+Date: Mon, 17 May 2010 12:51:03 +0200
+Subject: writeback: disable periodic old data writeback for !dirty_writeback_centisecs
+
+From: Jens Axboe <jens.axboe@oracle.com>
+
+commit 69b62d01ec44fe0d505d89917392347732135a4d upstream.
+
+Prior to 2.6.32, setting /proc/sys/vm/dirty_writeback_centisecs disabled
+periodic dirty writeback from kupdate. This got broken and now causes
+excessive sys CPU usage if set to zero, as we'll keep beating on
+schedule().
+
+Reported-by: Justin Maggard <jmaggard10@gmail.com>
+Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/fs-writeback.c | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+--- a/fs/fs-writeback.c
++++ b/fs/fs-writeback.c
+@@ -834,6 +834,12 @@ static long wb_check_old_data_flush(stru
+ unsigned long expired;
+ long nr_pages;
+
++ /*
++ * When set to zero, disable periodic writeback
++ */
++ if (!dirty_writeback_interval)
++ return 0;
++
+ expired = wb->last_old_flush +
+ msecs_to_jiffies(dirty_writeback_interval * 10);
+ if (time_before(jiffies, expired))
+@@ -929,8 +935,12 @@ int bdi_writeback_task(struct bdi_writeb
+ break;
+ }
+
+- wait_jiffies = msecs_to_jiffies(dirty_writeback_interval * 10);
+- schedule_timeout_interruptible(wait_jiffies);
++ if (dirty_writeback_interval) {
++ wait_jiffies = msecs_to_jiffies(dirty_writeback_interval * 10);
++ schedule_timeout_interruptible(wait_jiffies);
++ } else
++ schedule();
++
+ try_to_freeze();
+ }
+