]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 May 2016 16:26:17 +0000 (18:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 May 2016 16:26:17 +0000 (18:26 +0200)
added patches:
drm-amdgpu-make-sure-vertical-front-porch-is-at-least-1.patch
drm-amdgpu-set-metadata-pointer-to-null-after-freeing.patch
drm-radeon-make-sure-vertical-front-porch-is-at-least-1.patch
gpu-ipu-v3-fix-imx-ipuv3-crtc-module-autoloading.patch
iio-ak8975-fix-maybe-uninitialized-warning.patch
iio-ak8975-fix-null-pointer-exception-on-early-interrupt.patch

queue-4.4/drm-amdgpu-make-sure-vertical-front-porch-is-at-least-1.patch [new file with mode: 0644]
queue-4.4/drm-amdgpu-set-metadata-pointer-to-null-after-freeing.patch [new file with mode: 0644]
queue-4.4/drm-radeon-make-sure-vertical-front-porch-is-at-least-1.patch [new file with mode: 0644]
queue-4.4/gpu-ipu-v3-fix-imx-ipuv3-crtc-module-autoloading.patch [new file with mode: 0644]
queue-4.4/iio-ak8975-fix-maybe-uninitialized-warning.patch [new file with mode: 0644]
queue-4.4/iio-ak8975-fix-null-pointer-exception-on-early-interrupt.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/drm-amdgpu-make-sure-vertical-front-porch-is-at-least-1.patch b/queue-4.4/drm-amdgpu-make-sure-vertical-front-porch-is-at-least-1.patch
new file mode 100644 (file)
index 0000000..2ab8c29
--- /dev/null
@@ -0,0 +1,31 @@
+From 0126d4b9a516256f2432ca0dc78ab293a8255378 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Mon, 2 May 2016 18:54:39 -0400
+Subject: drm/amdgpu: make sure vertical front porch is at least 1
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 0126d4b9a516256f2432ca0dc78ab293a8255378 upstream.
+
+hw doesn't like a 0 value.
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/amd/amdgpu/atombios_encoders.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
++++ b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
+@@ -298,6 +298,10 @@ bool amdgpu_atombios_encoder_mode_fixup(
+           && (mode->crtc_vsync_start < (mode->crtc_vdisplay + 2)))
+               adjusted_mode->crtc_vsync_start = adjusted_mode->crtc_vdisplay + 2;
++      /* vertical FP must be at least 1 */
++      if (mode->crtc_vsync_start == mode->crtc_vdisplay)
++              adjusted_mode->crtc_vsync_start++;
++
+       /* get the native mode for scaling */
+       if (amdgpu_encoder->active_device & (ATOM_DEVICE_LCD_SUPPORT))
+               amdgpu_panel_mode_fixup(encoder, adjusted_mode);
diff --git a/queue-4.4/drm-amdgpu-set-metadata-pointer-to-null-after-freeing.patch b/queue-4.4/drm-amdgpu-set-metadata-pointer-to-null-after-freeing.patch
new file mode 100644 (file)
index 0000000..b709bba
--- /dev/null
@@ -0,0 +1,38 @@
+From 0092d3edcb23fcdb8cbe4159ba94a534290ff982 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Tue, 3 May 2016 12:44:29 +1000
+Subject: drm/amdgpu: set metadata pointer to NULL after freeing.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Dave Airlie <airlied@redhat.com>
+
+commit 0092d3edcb23fcdb8cbe4159ba94a534290ff982 upstream.
+
+Without this there was a double free of the metadata,
+which ended up freeing the fd table for me here, and taking
+out the machine more often than not.
+
+I reproduced with X.org + modesetting DDX + latest llvm/mesa,
+also required using dri3.
+
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+@@ -540,6 +540,7 @@ int amdgpu_bo_set_metadata (struct amdgp
+       if (!metadata_size) {
+               if (bo->metadata_size) {
+                       kfree(bo->metadata);
++                      bo->metadata = NULL;
+                       bo->metadata_size = 0;
+               }
+               return 0;
diff --git a/queue-4.4/drm-radeon-make-sure-vertical-front-porch-is-at-least-1.patch b/queue-4.4/drm-radeon-make-sure-vertical-front-porch-is-at-least-1.patch
new file mode 100644 (file)
index 0000000..c9fe3e9
--- /dev/null
@@ -0,0 +1,31 @@
+From 3104b8128d4d646a574ed9d5b17c7d10752cd70b Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Mon, 2 May 2016 18:53:27 -0400
+Subject: drm/radeon: make sure vertical front porch is at least 1
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 3104b8128d4d646a574ed9d5b17c7d10752cd70b upstream.
+
+hw doesn't like a 0 value.
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/atombios_encoders.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/gpu/drm/radeon/atombios_encoders.c
++++ b/drivers/gpu/drm/radeon/atombios_encoders.c
+@@ -310,6 +310,10 @@ static bool radeon_atom_mode_fixup(struc
+           && (mode->crtc_vsync_start < (mode->crtc_vdisplay + 2)))
+               adjusted_mode->crtc_vsync_start = adjusted_mode->crtc_vdisplay + 2;
++      /* vertical FP must be at least 1 */
++      if (mode->crtc_vsync_start == mode->crtc_vdisplay)
++              adjusted_mode->crtc_vsync_start++;
++
+       /* get the native mode for scaling */
+       if (radeon_encoder->active_device & (ATOM_DEVICE_LCD_SUPPORT)) {
+               radeon_panel_mode_fixup(encoder, adjusted_mode);
diff --git a/queue-4.4/gpu-ipu-v3-fix-imx-ipuv3-crtc-module-autoloading.patch b/queue-4.4/gpu-ipu-v3-fix-imx-ipuv3-crtc-module-autoloading.patch
new file mode 100644 (file)
index 0000000..9d25cf1
--- /dev/null
@@ -0,0 +1,49 @@
+From 503fe87bd0a8346ba9d8b7f49115dcd0a4185226 Mon Sep 17 00:00:00 2001
+From: Philipp Zabel <p.zabel@pengutronix.de>
+Date: Wed, 27 Apr 2016 10:17:51 +0200
+Subject: gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading
+
+From: Philipp Zabel <p.zabel@pengutronix.de>
+
+commit 503fe87bd0a8346ba9d8b7f49115dcd0a4185226 upstream.
+
+If of_node is set before calling platform_device_add, the driver core
+will try to use of: modalias matching, which fails because the device
+tree nodes don't have a compatible property set. This patch fixes
+imx-ipuv3-crtc module autoloading by setting the of_node property only
+after the platform modalias is set.
+
+Fixes: 304e6be652e2 ("gpu: ipu-v3: Assign of_node of child platform devices to corresponding ports")
+Reported-by: Dennis Gilmore <dennis@ausil.us>
+Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
+Tested-By: Dennis Gilmore <dennis@ausil.us>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/ipu-v3/ipu-common.c |    7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/ipu-v3/ipu-common.c
++++ b/drivers/gpu/ipu-v3/ipu-common.c
+@@ -1068,7 +1068,6 @@ static int ipu_add_client_devices(struct
+                       goto err_register;
+               }
+-              pdev->dev.of_node = of_node;
+               pdev->dev.parent = dev;
+               ret = platform_device_add_data(pdev, &reg->pdata,
+@@ -1079,6 +1078,12 @@ static int ipu_add_client_devices(struct
+                       platform_device_put(pdev);
+                       goto err_register;
+               }
++
++              /*
++               * Set of_node only after calling platform_device_add. Otherwise
++               * the platform:imx-ipuv3-crtc modalias won't be used.
++               */
++              pdev->dev.of_node = of_node;
+       }
+       return 0;
diff --git a/queue-4.4/iio-ak8975-fix-maybe-uninitialized-warning.patch b/queue-4.4/iio-ak8975-fix-maybe-uninitialized-warning.patch
new file mode 100644 (file)
index 0000000..0c400f6
--- /dev/null
@@ -0,0 +1,43 @@
+From 05be8d4101d960bad271d32b4f6096af1ccb1534 Mon Sep 17 00:00:00 2001
+From: Richard Leitner <dev@g0hl1n.net>
+Date: Tue, 5 Apr 2016 15:03:48 +0200
+Subject: iio: ak8975: fix maybe-uninitialized warning
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Richard Leitner <dev@g0hl1n.net>
+
+commit 05be8d4101d960bad271d32b4f6096af1ccb1534 upstream.
+
+If i2c_device_id *id is NULL and acpi_match_device returns NULL too,
+then chipset may be unitialized when accessing &ak_def_array[chipset] in
+ak8975_probe. Therefore initialize chipset to AK_MAX_TYPE, which will
+return an error when not changed.
+
+This patch fixes the following maybe-uninitialized warning:
+
+drivers/iio/magnetometer/ak8975.c: In function ‘ak8975_probe’:
+drivers/iio/magnetometer/ak8975.c:788:14: warning: ‘chipset’ may be used
+uninitialized in this function [-Wmaybe-uninitialized]
+  data->def = &ak_def_array[chipset];
+
+Signed-off-by: Richard Leitner <dev@g0hl1n.net>
+Signed-off-by: Jonathan Cameron <jic23@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/iio/magnetometer/ak8975.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/iio/magnetometer/ak8975.c
++++ b/drivers/iio/magnetometer/ak8975.c
+@@ -732,7 +732,7 @@ static int ak8975_probe(struct i2c_clien
+       int eoc_gpio;
+       int err;
+       const char *name = NULL;
+-      enum asahi_compass_chipset chipset;
++      enum asahi_compass_chipset chipset = AK_MAX_TYPE;
+       /* Grab and set up the supplied GPIO. */
+       if (client->dev.platform_data)
diff --git a/queue-4.4/iio-ak8975-fix-null-pointer-exception-on-early-interrupt.patch b/queue-4.4/iio-ak8975-fix-null-pointer-exception-on-early-interrupt.patch
new file mode 100644 (file)
index 0000000..aedf7f6
--- /dev/null
@@ -0,0 +1,72 @@
+From 07d2390e36ee5b3265e9cc8305f2a106c8721e16 Mon Sep 17 00:00:00 2001
+From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
+Date: Mon, 4 Apr 2016 14:54:59 +0900
+Subject: iio: ak8975: Fix NULL pointer exception on early interrupt
+
+From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
+
+commit 07d2390e36ee5b3265e9cc8305f2a106c8721e16 upstream.
+
+In certain probe conditions the interrupt came right after registering
+the handler causing a NULL pointer exception because of uninitialized
+waitqueue:
+
+$ udevadm trigger
+i2c-gpio i2c-gpio-1: using pins 143 (SDA) and 144 (SCL)
+i2c-gpio i2c-gpio-3: using pins 53 (SDA) and 52 (SCL)
+Unable to handle kernel NULL pointer dereference at virtual address 00000000
+pgd = e8b38000
+[00000000] *pgd=00000000
+Internal error: Oops: 5 [#1] SMP ARM
+Modules linked in: snd_soc_i2s(+) i2c_gpio(+) snd_soc_idma snd_soc_s3c_dma snd_soc_core snd_pcm_dmaengine snd_pcm snd_timer snd soundcore ac97_bus spi_s3c64xx pwm_samsung dwc2 exynos_adc phy_exynos_usb2 exynosdrm exynos_rng rng_core rtc_s3c
+CPU: 0 PID: 717 Comm: data-provider-m Not tainted 4.6.0-rc1-next-20160401-00011-g1b8d87473b9e-dirty #101
+Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
+(...)
+(__wake_up_common) from [<c0379624>] (__wake_up+0x38/0x4c)
+(__wake_up) from [<c0a41d30>] (ak8975_irq_handler+0x28/0x30)
+(ak8975_irq_handler) from [<c0386720>] (handle_irq_event_percpu+0x88/0x140)
+(handle_irq_event_percpu) from [<c038681c>] (handle_irq_event+0x44/0x68)
+(handle_irq_event) from [<c0389c40>] (handle_edge_irq+0xf0/0x19c)
+(handle_edge_irq) from [<c0385e04>] (generic_handle_irq+0x24/0x34)
+(generic_handle_irq) from [<c05ee360>] (exynos_eint_gpio_irq+0x50/0x68)
+(exynos_eint_gpio_irq) from [<c0386720>] (handle_irq_event_percpu+0x88/0x140)
+(handle_irq_event_percpu) from [<c038681c>] (handle_irq_event+0x44/0x68)
+(handle_irq_event) from [<c0389a70>] (handle_fasteoi_irq+0xb4/0x194)
+(handle_fasteoi_irq) from [<c0385e04>] (generic_handle_irq+0x24/0x34)
+(generic_handle_irq) from [<c03860b4>] (__handle_domain_irq+0x5c/0xb4)
+(__handle_domain_irq) from [<c0301774>] (gic_handle_irq+0x54/0x94)
+(gic_handle_irq) from [<c030c910>] (__irq_usr+0x50/0x80)
+
+The bug was reproduced on exynos4412-trats2 (with a max77693 device also
+using i2c-gpio) after building max77693 as a module.
+
+Fixes: 94a6d5cf7caa ("iio:ak8975 Implement data ready interrupt handling")
+Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
+Tested-by: Gregor Boirie <gregor.boirie@parrot.com>
+Signed-off-by: Jonathan Cameron <jic23@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/iio/magnetometer/ak8975.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/iio/magnetometer/ak8975.c
++++ b/drivers/iio/magnetometer/ak8975.c
+@@ -462,6 +462,8 @@ static int ak8975_setup_irq(struct ak897
+       int rc;
+       int irq;
++      init_waitqueue_head(&data->data_ready_queue);
++      clear_bit(0, &data->flags);
+       if (client->irq)
+               irq = client->irq;
+       else
+@@ -477,8 +479,6 @@ static int ak8975_setup_irq(struct ak897
+               return rc;
+       }
+-      init_waitqueue_head(&data->data_ready_queue);
+-      clear_bit(0, &data->flags);
+       data->eoc_irq = irq;
+       return rc;
index 057b5770c5b431f0cb39c2043235db545c330542..bb4cf96fd1f2614c0b5b11a3f8b8f4e07dd96b7a 100644 (file)
@@ -52,3 +52,9 @@ ata-ahci-platform-add-ports-implemented-dt-bindings.patch
 usb-serial-cp210x-add-id-for-link-ecu.patch
 usb-serial-cp210x-add-straizona-focusers-device-ids.patch
 nvmem-mxs-ocotp-fix-buffer-overflow-in-read.patch
+gpu-ipu-v3-fix-imx-ipuv3-crtc-module-autoloading.patch
+drm-amdgpu-make-sure-vertical-front-porch-is-at-least-1.patch
+drm-amdgpu-set-metadata-pointer-to-null-after-freeing.patch
+iio-ak8975-fix-null-pointer-exception-on-early-interrupt.patch
+iio-ak8975-fix-maybe-uninitialized-warning.patch
+drm-radeon-make-sure-vertical-front-porch-is-at-least-1.patch