]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Mar 2016 21:24:36 +0000 (13:24 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Mar 2016 21:24:36 +0000 (13:24 -0800)
added patches:
drm-qxl-use-kmalloc_array-to-alloc-reloc_info-in-qxl_process_single_command.patch
drm-radeon-pm-adjust-display-configuration-after-powerstate.patch
drm-radeon-use-post-decrement-in-error-handling.patch

queue-3.14/drm-qxl-use-kmalloc_array-to-alloc-reloc_info-in-qxl_process_single_command.patch [new file with mode: 0644]
queue-3.14/drm-radeon-pm-adjust-display-configuration-after-powerstate.patch [new file with mode: 0644]
queue-3.14/drm-radeon-use-post-decrement-in-error-handling.patch [new file with mode: 0644]
queue-3.14/series

diff --git a/queue-3.14/drm-qxl-use-kmalloc_array-to-alloc-reloc_info-in-qxl_process_single_command.patch b/queue-3.14/drm-qxl-use-kmalloc_array-to-alloc-reloc_info-in-qxl_process_single_command.patch
new file mode 100644 (file)
index 0000000..2c56d14
--- /dev/null
@@ -0,0 +1,34 @@
+From 34855706c30d52b0a744da44348b5d1cc39fbe51 Mon Sep 17 00:00:00 2001
+From: Gerd Hoffmann <kraxel@redhat.com>
+Date: Tue, 16 Feb 2016 14:25:00 +0100
+Subject: drm/qxl: use kmalloc_array to alloc reloc_info in qxl_process_single_command
+
+From: Gerd Hoffmann <kraxel@redhat.com>
+
+commit 34855706c30d52b0a744da44348b5d1cc39fbe51 upstream.
+
+This avoids integer overflows on 32bit machines when calculating
+reloc_info size, as reported by Alan Cox.
+
+Cc: gnomes@lxorguk.ukuu.org.uk
+Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
+Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/qxl/qxl_ioctl.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/qxl/qxl_ioctl.c
++++ b/drivers/gpu/drm/qxl/qxl_ioctl.c
+@@ -168,7 +168,8 @@ static int qxl_process_single_command(st
+                      cmd->command_size))
+               return -EFAULT;
+-      reloc_info = kmalloc(sizeof(struct qxl_reloc_info) * cmd->relocs_num, GFP_KERNEL);
++      reloc_info = kmalloc_array(cmd->relocs_num,
++                                 sizeof(struct qxl_reloc_info), GFP_KERNEL);
+       if (!reloc_info)
+               return -ENOMEM;
diff --git a/queue-3.14/drm-radeon-pm-adjust-display-configuration-after-powerstate.patch b/queue-3.14/drm-radeon-pm-adjust-display-configuration-after-powerstate.patch
new file mode 100644 (file)
index 0000000..e4b2854
--- /dev/null
@@ -0,0 +1,49 @@
+From 39d4275058baf53e89203407bf3841ff2c74fa32 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Fri, 19 Feb 2016 18:05:10 -0500
+Subject: drm/radeon/pm: adjust display configuration after powerstate
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 39d4275058baf53e89203407bf3841ff2c74fa32 upstream.
+
+set_power_state defaults to no displays, so we need to update
+the display configuration after setting up the powerstate on the
+first call. In most cases this is not an issue since ends up
+getting called multiple times at any given modeset and the proper
+order is achieved in the display changed handling at the top of
+the function.
+
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Acked-by: Jordan Lazare <Jordan.Lazare@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/radeon_pm.c |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpu/drm/radeon/radeon_pm.c
++++ b/drivers/gpu/drm/radeon/radeon_pm.c
+@@ -915,8 +915,6 @@ static void radeon_dpm_change_power_stat
+       /* update display watermarks based on new power state */
+       radeon_bandwidth_update(rdev);
+-      /* update displays */
+-      radeon_dpm_display_configuration_changed(rdev);
+       rdev->pm.dpm.current_active_crtcs = rdev->pm.dpm.new_active_crtcs;
+       rdev->pm.dpm.current_active_crtc_count = rdev->pm.dpm.new_active_crtc_count;
+@@ -936,6 +934,9 @@ static void radeon_dpm_change_power_stat
+       radeon_dpm_post_set_power_state(rdev);
++      /* update displays */
++      radeon_dpm_display_configuration_changed(rdev);
++
+       if (rdev->asic->dpm.force_performance_level) {
+               if (rdev->pm.dpm.thermal_active) {
+                       enum radeon_dpm_forced_level level = rdev->pm.dpm.forced_level;
diff --git a/queue-3.14/drm-radeon-use-post-decrement-in-error-handling.patch b/queue-3.14/drm-radeon-use-post-decrement-in-error-handling.patch
new file mode 100644 (file)
index 0000000..5200281
--- /dev/null
@@ -0,0 +1,36 @@
+From bc3f5d8c4ca01555820617eb3b6c0857e4df710d Mon Sep 17 00:00:00 2001
+From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
+Date: Mon, 15 Feb 2016 19:41:47 +0100
+Subject: drm/radeon: use post-decrement in error handling
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
+
+commit bc3f5d8c4ca01555820617eb3b6c0857e4df710d upstream.
+
+We need to use post-decrement to get the pci_map_page undone also for
+i==0, and to avoid some very unpleasant behaviour if pci_map_page
+failed already at i==0.
+
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/radeon_ttm.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/radeon/radeon_ttm.c
++++ b/drivers/gpu/drm/radeon/radeon_ttm.c
+@@ -623,7 +623,7 @@ static int radeon_ttm_tt_populate(struct
+                                                      0, PAGE_SIZE,
+                                                      PCI_DMA_BIDIRECTIONAL);
+               if (pci_dma_mapping_error(rdev->pdev, gtt->ttm.dma_address[i])) {
+-                      while (--i) {
++                      while (i--) {
+                               pci_unmap_page(rdev->pdev, gtt->ttm.dma_address[i],
+                                              PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
+                               gtt->ttm.dma_address[i] = 0;
index 3164c7886ff24642e39c1a6430163bcbb7428366..e0863e5a6b5d332eb00b9cfa1855cf882f69f96d 100644 (file)
@@ -107,3 +107,6 @@ drm-vmwgfx-respect-nomodeset.patch
 drm-radeon-clean-up-fujitsu-quirks.patch
 drm-radeon-hold-reference-to-fences-in-radeon_sa_bo_new.patch
 drm-i915-dp-fall-back-to-18-bpp-when-sink-capability-is-unknown.patch
+drm-qxl-use-kmalloc_array-to-alloc-reloc_info-in-qxl_process_single_command.patch
+drm-radeon-use-post-decrement-in-error-handling.patch
+drm-radeon-pm-adjust-display-configuration-after-powerstate.patch