]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Sep 2014 21:32:04 +0000 (14:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Sep 2014 21:32:04 +0000 (14:32 -0700)
added patches:
drm-radeon-load-the-lm63-driver-for-an-lm64-thermal-chip.patch
drm-ttm-choose-a-pool-to-shrink-correctly-in-ttm_dma_pool_shrink_scan.patch
drm-ttm-fix-possible-division-by-0-in-ttm_dma_pool_shrink_scan.patch

queue-3.10/drm-radeon-load-the-lm63-driver-for-an-lm64-thermal-chip.patch [new file with mode: 0644]
queue-3.10/drm-ttm-choose-a-pool-to-shrink-correctly-in-ttm_dma_pool_shrink_scan.patch [new file with mode: 0644]
queue-3.10/drm-ttm-fix-possible-division-by-0-in-ttm_dma_pool_shrink_scan.patch [new file with mode: 0644]
queue-3.10/series

diff --git a/queue-3.10/drm-radeon-load-the-lm63-driver-for-an-lm64-thermal-chip.patch b/queue-3.10/drm-radeon-load-the-lm63-driver-for-an-lm64-thermal-chip.patch
new file mode 100644 (file)
index 0000000..215dccb
--- /dev/null
@@ -0,0 +1,38 @@
+From 5dc355325b648dc9b4cf3bea4d968de46fd59215 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Sun, 27 Jul 2014 23:21:50 -0400
+Subject: drm/radeon: load the lm63 driver for an lm64 thermal chip.
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 5dc355325b648dc9b4cf3bea4d968de46fd59215 upstream.
+
+Looks like the lm63 driver supports the lm64 as well.
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/radeon_atombios.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpu/drm/radeon/radeon_atombios.c
++++ b/drivers/gpu/drm/radeon/radeon_atombios.c
+@@ -1908,7 +1908,7 @@ static const char *thermal_controller_na
+       "adm1032",
+       "adm1030",
+       "max6649",
+-      "lm64",
++      "lm63", /* lm64 */
+       "f75375",
+       "asc7xxx",
+ };
+@@ -1919,7 +1919,7 @@ static const char *pp_lib_thermal_contro
+       "adm1032",
+       "adm1030",
+       "max6649",
+-      "lm64",
++      "lm63", /* lm64 */
+       "f75375",
+       "RV6xx",
+       "RV770",
diff --git a/queue-3.10/drm-ttm-choose-a-pool-to-shrink-correctly-in-ttm_dma_pool_shrink_scan.patch b/queue-3.10/drm-ttm-choose-a-pool-to-shrink-correctly-in-ttm_dma_pool_shrink_scan.patch
new file mode 100644 (file)
index 0000000..04f4d9c
--- /dev/null
@@ -0,0 +1,45 @@
+From 46c2df68f03a236b30808bba361f10900c88d95e Mon Sep 17 00:00:00 2001
+From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
+Date: Sun, 3 Aug 2014 20:00:40 +0900
+Subject: drm/ttm: Choose a pool to shrink correctly in ttm_dma_pool_shrink_scan().
+
+From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
+
+commit 46c2df68f03a236b30808bba361f10900c88d95e upstream.
+
+We can use "unsigned int" instead of "atomic_t" by updating start_pool
+variable under _manager->lock. This patch will make it possible to avoid
+skipping when choosing a pool to shrink in round-robin style, after next
+patch changes mutex_lock(_manager->lock) to !mutex_trylock(_manager->lork).
+
+Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/ttm/ttm_page_alloc_dma.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c
++++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c
+@@ -1006,9 +1006,9 @@ EXPORT_SYMBOL_GPL(ttm_dma_unpopulate);
+ static int ttm_dma_pool_mm_shrink(struct shrinker *shrink,
+                                 struct shrink_control *sc)
+ {
+-      static atomic_t start_pool = ATOMIC_INIT(0);
++      static unsigned start_pool;
+       unsigned idx = 0;
+-      unsigned pool_offset = atomic_add_return(1, &start_pool);
++      unsigned pool_offset;
+       unsigned shrink_pages = sc->nr_to_scan;
+       struct device_pools *p;
+@@ -1018,7 +1018,7 @@ static int ttm_dma_pool_mm_shrink(struct
+       mutex_lock(&_manager->lock);
+       if (!_manager->npools)
+               goto out;
+-      pool_offset = pool_offset % _manager->npools;
++      pool_offset = ++start_pool % _manager->npools;
+       list_for_each_entry(p, &_manager->pools, pools) {
+               unsigned nr_free;
diff --git a/queue-3.10/drm-ttm-fix-possible-division-by-0-in-ttm_dma_pool_shrink_scan.patch b/queue-3.10/drm-ttm-fix-possible-division-by-0-in-ttm_dma_pool_shrink_scan.patch
new file mode 100644 (file)
index 0000000..d46a766
--- /dev/null
@@ -0,0 +1,40 @@
+From 11e504cc705e8ccb06ac93a276e11b5e8fee4d40 Mon Sep 17 00:00:00 2001
+From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
+Date: Sun, 3 Aug 2014 19:59:35 +0900
+Subject: drm/ttm: Fix possible division by 0 in ttm_dma_pool_shrink_scan().
+
+From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
+
+commit 11e504cc705e8ccb06ac93a276e11b5e8fee4d40 upstream.
+
+list_empty(&_manager->pools) being false before taking _manager->lock
+does not guarantee that _manager->npools != 0 after taking _manager->lock
+because _manager->npools is updated under _manager->lock.
+
+Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/ttm/ttm_page_alloc_dma.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c
++++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c
+@@ -1016,6 +1016,8 @@ static int ttm_dma_pool_mm_shrink(struct
+               return 0;
+       mutex_lock(&_manager->lock);
++      if (!_manager->npools)
++              goto out;
+       pool_offset = pool_offset % _manager->npools;
+       list_for_each_entry(p, &_manager->pools, pools) {
+               unsigned nr_free;
+@@ -1033,6 +1035,7 @@ static int ttm_dma_pool_mm_shrink(struct
+                        p->pool->dev_name, p->pool->name, current->pid,
+                        nr_free, shrink_pages);
+       }
++out:
+       mutex_unlock(&_manager->lock);
+       /* return estimated number of unused pages in pool */
+       return ttm_dma_pool_get_num_unused_pages();
index 0c550aeefaa7292502d4e3f83171a9c750f5900f..750efe287adc00dd8197c17e4c2cc14c23d9074b 100644 (file)
@@ -5,3 +5,6 @@ drm-tilcdc-tfp410-fix-dangling-sysfs-connector-node.patch
 drm-tilcdc-panel-fix-leak-when-unloading-the-module.patch
 drm-tilcdc-fix-release-order-on-exit.patch
 drm-tilcdc-fix-double-kfree.patch
+drm-ttm-fix-possible-division-by-0-in-ttm_dma_pool_shrink_scan.patch
+drm-ttm-choose-a-pool-to-shrink-correctly-in-ttm_dma_pool_shrink_scan.patch
+drm-radeon-load-the-lm63-driver-for-an-lm64-thermal-chip.patch