From: Greg Kroah-Hartman Date: Wed, 2 Oct 2013 21:25:37 +0000 (-0700) Subject: 3.11-stable patches X-Git-Tag: v3.0.99~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a887f1c924a026d672525219eda9f3cd9f3d5df5;p=thirdparty%2Fkernel%2Fstable-queue.git 3.11-stable patches added patches: drm-i915-tv-clear-adjusted_mode.flags.patch revert-cw1200-don-t-perform-spi-transfers-in-interrupt-context.patch --- diff --git a/queue-3.11/drm-i915-tv-clear-adjusted_mode.flags.patch b/queue-3.11/drm-i915-tv-clear-adjusted_mode.flags.patch new file mode 100644 index 00000000000..c424cf2af5b --- /dev/null +++ b/queue-3.11/drm-i915-tv-clear-adjusted_mode.flags.patch @@ -0,0 +1,63 @@ +From 1062b81598bc00e2f6620e6f3788f8f8df2f01e7 Mon Sep 17 00:00:00 2001 +From: Daniel Vetter +Date: Tue, 10 Sep 2013 11:44:30 +0200 +Subject: drm/i915/tv: clear adjusted_mode.flags + +From: Daniel Vetter + +commit 1062b81598bc00e2f6620e6f3788f8f8df2f01e7 upstream. + +The native TV encoder has it's own flags to adjust sync modes and +enabled interlaced modes which are totally irrelevant for the adjusted +mode. This worked out nicely since the input modes used by both the +load detect code and reported in the ->get_modes callbacks all have no +flags set, and we also don't fill out any of them in the ->get_config +callback. + +This changed with the additional sanitation done with + +commit 2960bc9cceecb5d556ce1c07656a6609e2f7e8b0 +Author: Imre Deak +Date: Tue Jul 30 13:36:32 2013 +0300 + + drm/i915: make user mode sync polarity setting explicit + +sinc now the "no flags at all" state wouldn't fit through core code +any more. So fix this up again by explicitly clearing the flags in the +->compute_config callback. + +Aside: We have zero checking in place to make sure that the requested +mode is indeed the right input mode we want for the selected TV mode. +So we'll happily fall over if userspace tries to pull us. But that's +definitely work for a different patch series. So just add a FIXME +comment for now. + +Reported-by: Knut Petersen +Cc: Knut Petersen +Cc: Imre Deak +Cc: Chris Wilson +Tested-by: Knut Petersen +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_tv.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/gpu/drm/i915/intel_tv.c ++++ b/drivers/gpu/drm/i915/intel_tv.c +@@ -918,6 +918,14 @@ intel_tv_compute_config(struct intel_enc + DRM_DEBUG_KMS("forcing bpc to 8 for TV\n"); + pipe_config->pipe_bpp = 8*3; + ++ /* TV has it's own notion of sync and other mode flags, so clear them. */ ++ pipe_config->adjusted_mode.flags = 0; ++ ++ /* ++ * FIXME: We don't check whether the input mode is actually what we want ++ * or whether userspace is doing something stupid. ++ */ ++ + return true; + } + diff --git a/queue-3.11/revert-cw1200-don-t-perform-spi-transfers-in-interrupt-context.patch b/queue-3.11/revert-cw1200-don-t-perform-spi-transfers-in-interrupt-context.patch new file mode 100644 index 00000000000..bac573b707a --- /dev/null +++ b/queue-3.11/revert-cw1200-don-t-perform-spi-transfers-in-interrupt-context.patch @@ -0,0 +1,124 @@ +From c4fb19d21b003ec99ec490ba2cb60baffabc73f3 Mon Sep 17 00:00:00 2001 +From: Solomon Peachy +Date: Mon, 23 Sep 2013 16:00:03 -0400 +Subject: Revert "cw1200: Don't perform SPI transfers in interrupt context" + +From: Solomon Peachy + +commit c4fb19d21b003ec99ec490ba2cb60baffabc73f3 upstream. + +This reverts commit aec8e88c947b7017e2b4bbcb68a4bfc4a1f8ad35. + +This solution turned out to cause interrupt delivery problems, and +rather than trying to fix this approach, it has been scrapped in favor +of an alternative (and far simpler) implementation. + +Signed-off-by: Solomon Peachy +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/cw1200/cw1200_spi.c | 19 +++---------------- + drivers/net/wireless/cw1200/fwio.c | 2 +- + drivers/net/wireless/cw1200/hwbus.h | 1 - + drivers/net/wireless/cw1200/hwio.c | 15 --------------- + 4 files changed, 4 insertions(+), 33 deletions(-) + +--- a/drivers/net/wireless/cw1200/cw1200_spi.c ++++ b/drivers/net/wireless/cw1200/cw1200_spi.c +@@ -42,7 +42,6 @@ struct hwbus_priv { + spinlock_t lock; /* Serialize all bus operations */ + wait_queue_head_t wq; + int claimed; +- int irq_disabled; + }; + + #define SDIO_TO_SPI_ADDR(addr) ((addr & 0x1f)>>2) +@@ -238,8 +237,6 @@ static irqreturn_t cw1200_spi_irq_handle + struct hwbus_priv *self = dev_id; + + if (self->core) { +- disable_irq_nosync(self->func->irq); +- self->irq_disabled = 1; + cw1200_irq_handler(self->core); + return IRQ_HANDLED; + } else { +@@ -273,22 +270,13 @@ exit: + + static int cw1200_spi_irq_unsubscribe(struct hwbus_priv *self) + { ++ int ret = 0; ++ + pr_debug("SW IRQ unsubscribe\n"); + disable_irq_wake(self->func->irq); + free_irq(self->func->irq, self); + +- return 0; +-} +- +-static int cw1200_spi_irq_enable(struct hwbus_priv *self, int enable) +-{ +- /* Disables are handled by the interrupt handler */ +- if (enable && self->irq_disabled) { +- enable_irq(self->func->irq); +- self->irq_disabled = 0; +- } +- +- return 0; ++ return ret; + } + + static int cw1200_spi_off(const struct cw1200_platform_data_spi *pdata) +@@ -368,7 +356,6 @@ static struct hwbus_ops cw1200_spi_hwbus + .unlock = cw1200_spi_unlock, + .align_size = cw1200_spi_align_size, + .power_mgmt = cw1200_spi_pm, +- .irq_enable = cw1200_spi_irq_enable, + }; + + /* Probe Function to be called by SPI stack when device is discovered */ +--- a/drivers/net/wireless/cw1200/fwio.c ++++ b/drivers/net/wireless/cw1200/fwio.c +@@ -485,7 +485,7 @@ int cw1200_load_firmware(struct cw1200_c + + /* Enable interrupt signalling */ + priv->hwbus_ops->lock(priv->hwbus_priv); +- ret = __cw1200_irq_enable(priv, 2); ++ ret = __cw1200_irq_enable(priv, 1); + priv->hwbus_ops->unlock(priv->hwbus_priv); + if (ret < 0) + goto unsubscribe; +--- a/drivers/net/wireless/cw1200/hwbus.h ++++ b/drivers/net/wireless/cw1200/hwbus.h +@@ -28,7 +28,6 @@ struct hwbus_ops { + void (*unlock)(struct hwbus_priv *self); + size_t (*align_size)(struct hwbus_priv *self, size_t size); + int (*power_mgmt)(struct hwbus_priv *self, bool suspend); +- int (*irq_enable)(struct hwbus_priv *self, int enable); + }; + + #endif /* CW1200_HWBUS_H */ +--- a/drivers/net/wireless/cw1200/hwio.c ++++ b/drivers/net/wireless/cw1200/hwio.c +@@ -273,21 +273,6 @@ int __cw1200_irq_enable(struct cw1200_co + u16 val16; + int ret; + +- /* We need to do this hack because the SPI layer can sleep on I/O +- and the general path involves I/O to the device in interrupt +- context. +- +- However, the initial enable call needs to go to the hardware. +- +- We don't worry about shutdown because we do a full reset which +- clears the interrupt enabled bits. +- */ +- if (priv->hwbus_ops->irq_enable) { +- ret = priv->hwbus_ops->irq_enable(priv->hwbus_priv, enable); +- if (ret || enable < 2) +- return ret; +- } +- + if (HIF_8601_SILICON == priv->hw_type) { + ret = __cw1200_reg_read_32(priv, ST90TDS_CONFIG_REG_ID, &val32); + if (ret < 0) { diff --git a/queue-3.11/series b/queue-3.11/series index 048f88cf01f..a172088d276 100644 --- a/queue-3.11/series +++ b/queue-3.11/series @@ -23,3 +23,5 @@ serial-pch_uart-fix-tty-kref-leak-in-dma-rx-path.patch arm-7837-3-fix-thumb-2-bug-in-aes-assembler-code.patch staging-vt6656-main_usb.c-oops-on-device_close-move-flag-earlier.patch staging-vt6656-iwctl_siwencodeext-return-if-device-not-open.patch +drm-i915-tv-clear-adjusted_mode.flags.patch +revert-cw1200-don-t-perform-spi-transfers-in-interrupt-context.patch