From: Greg Kroah-Hartman Date: Thu, 30 Jul 2015 19:16:35 +0000 (-0700) Subject: 3.14-stable patches X-Git-Tag: v4.1.4~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=93d8df8fb0e918b5fa34a1b2464165a74933dd31;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: dm-btree-remove-fix-bug-in-redistribute3.patch dm-btree-silence-lockdep-lock-inversion-in-dm_btree_del.patch dm-space-map-metadata-fix-occasional-leak-of-a-metadata-block-on-resize.patch dm-stats-fix-divide-by-zero-if-number_of_areas-arg-is-zero.patch drm-add-a-check-for-x-y-in-drm_mode_setcrtc.patch drm-qxl-do-not-cause-spice-server-to-clean-our-objects.patch drm-qxl-do-not-leak-memory-if-qxl_release_list_add-fails.patch drm-radeon-add-a-dpm-quirk-for-sapphire-radeon-r9-270x-2gb-gddr5.patch drm-radeon-compute-ring-fix-hibernation-ci-gpu-family-v2.patch drm-radeon-don-t-flush-the-gart-tlb-if-rdev-gart.ptr-null.patch drm-radeon-sdma-fix-hibernation-ci-gpu-family.patch drm-radeon-take-the-mode_config-mutex-when-dealing-with-hpds-v2.patch mmc-block-add-missing-mmc_blk_put-in-power_ro_lock_show.patch --- diff --git a/queue-3.14/dm-btree-remove-fix-bug-in-redistribute3.patch b/queue-3.14/dm-btree-remove-fix-bug-in-redistribute3.patch new file mode 100644 index 00000000000..bb6dc99dd46 --- /dev/null +++ b/queue-3.14/dm-btree-remove-fix-bug-in-redistribute3.patch @@ -0,0 +1,48 @@ +From 4c7e309340ff85072e96f529582d159002c36734 Mon Sep 17 00:00:00 2001 +From: Dennis Yang +Date: Fri, 26 Jun 2015 15:25:48 +0100 +Subject: dm btree remove: fix bug in redistribute3 + +From: Dennis Yang + +commit 4c7e309340ff85072e96f529582d159002c36734 upstream. + +redistribute3() shares entries out across 3 nodes. Some entries were +being moved the wrong way, breaking the ordering. This manifested as a +BUG() in dm-btree-remove.c:shift() when entries were removed from the +btree. + +For additional context see: +https://www.redhat.com/archives/dm-devel/2015-May/msg00113.html + +Signed-off-by: Dennis Yang +Signed-off-by: Joe Thornber +Signed-off-by: Mike Snitzer +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/persistent-data/dm-btree-remove.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/md/persistent-data/dm-btree-remove.c ++++ b/drivers/md/persistent-data/dm-btree-remove.c +@@ -309,8 +309,8 @@ static void redistribute3(struct dm_btre + + if (s < 0 && nr_center < -s) { + /* not enough in central node */ +- shift(left, center, nr_center); +- s = nr_center - target; ++ shift(left, center, -nr_center); ++ s += nr_center; + shift(left, right, s); + nr_right += s; + } else +@@ -323,7 +323,7 @@ static void redistribute3(struct dm_btre + if (s > 0 && nr_center < s) { + /* not enough in central node */ + shift(center, right, nr_center); +- s = target - nr_center; ++ s -= nr_center; + shift(left, right, s); + nr_left -= s; + } else diff --git a/queue-3.14/dm-btree-silence-lockdep-lock-inversion-in-dm_btree_del.patch b/queue-3.14/dm-btree-silence-lockdep-lock-inversion-in-dm_btree_del.patch new file mode 100644 index 00000000000..33783b7cf0f --- /dev/null +++ b/queue-3.14/dm-btree-silence-lockdep-lock-inversion-in-dm_btree_del.patch @@ -0,0 +1,32 @@ +From 1c7518794a3647eb345d59ee52844e8a40405198 Mon Sep 17 00:00:00 2001 +From: Joe Thornber +Date: Fri, 3 Jul 2015 14:51:32 +0100 +Subject: dm btree: silence lockdep lock inversion in dm_btree_del() + +From: Joe Thornber + +commit 1c7518794a3647eb345d59ee52844e8a40405198 upstream. + +Allocate memory using GFP_NOIO when deleting a btree. dm_btree_del() +can be called via an ioctl and we don't want to recurse into the FS or +block layer. + +Signed-off-by: Joe Thornber +Signed-off-by: Mike Snitzer +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/persistent-data/dm-btree.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/md/persistent-data/dm-btree.c ++++ b/drivers/md/persistent-data/dm-btree.c +@@ -255,7 +255,7 @@ int dm_btree_del(struct dm_btree_info *i + int r; + struct del_stack *s; + +- s = kmalloc(sizeof(*s), GFP_KERNEL); ++ s = kmalloc(sizeof(*s), GFP_NOIO); + if (!s) + return -ENOMEM; + s->info = info; diff --git a/queue-3.14/dm-space-map-metadata-fix-occasional-leak-of-a-metadata-block-on-resize.patch b/queue-3.14/dm-space-map-metadata-fix-occasional-leak-of-a-metadata-block-on-resize.patch new file mode 100644 index 00000000000..84e9956897f --- /dev/null +++ b/queue-3.14/dm-space-map-metadata-fix-occasional-leak-of-a-metadata-block-on-resize.patch @@ -0,0 +1,106 @@ +From 6096d91af0b65a3967139b32d5adbb3647858a26 Mon Sep 17 00:00:00 2001 +From: Joe Thornber +Date: Wed, 17 Jun 2015 13:35:19 +0100 +Subject: dm space map metadata: fix occasional leak of a metadata block on resize + +From: Joe Thornber + +commit 6096d91af0b65a3967139b32d5adbb3647858a26 upstream. + +The metadata space map has a simplified 'bootstrap' mode that is +operational when extending the space maps. Whilst in this mode it's +possible for some refcount decrement operations to become queued (eg, as +a result of shadowing one of the bitmap indexes). These decrements were +not being applied when switching out of bootstrap mode. + +The effect of this bug was the leaking of a 4k metadata block. This is +detected by the latest version of thin_check as a non fatal error. + +Signed-off-by: Joe Thornber +Signed-off-by: Mike Snitzer +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/persistent-data/dm-space-map-metadata.c | 50 ++++++++++++++------- + 1 file changed, 35 insertions(+), 15 deletions(-) + +--- a/drivers/md/persistent-data/dm-space-map-metadata.c ++++ b/drivers/md/persistent-data/dm-space-map-metadata.c +@@ -204,6 +204,27 @@ static void in(struct sm_metadata *smm) + smm->recursion_count++; + } + ++static int apply_bops(struct sm_metadata *smm) ++{ ++ int r = 0; ++ ++ while (!brb_empty(&smm->uncommitted)) { ++ struct block_op bop; ++ ++ r = brb_pop(&smm->uncommitted, &bop); ++ if (r) { ++ DMERR("bug in bop ring buffer"); ++ break; ++ } ++ ++ r = commit_bop(smm, &bop); ++ if (r) ++ break; ++ } ++ ++ return r; ++} ++ + static int out(struct sm_metadata *smm) + { + int r = 0; +@@ -216,21 +237,8 @@ static int out(struct sm_metadata *smm) + return -ENOMEM; + } + +- if (smm->recursion_count == 1) { +- while (!brb_empty(&smm->uncommitted)) { +- struct block_op bop; +- +- r = brb_pop(&smm->uncommitted, &bop); +- if (r) { +- DMERR("bug in bop ring buffer"); +- break; +- } +- +- r = commit_bop(smm, &bop); +- if (r) +- break; +- } +- } ++ if (smm->recursion_count == 1) ++ apply_bops(smm); + + smm->recursion_count--; + +@@ -702,6 +710,12 @@ static int sm_metadata_extend(struct dm_ + } + old_len = smm->begin; + ++ r = apply_bops(smm); ++ if (r) { ++ DMERR("%s: apply_bops failed", __func__); ++ goto out; ++ } ++ + r = sm_ll_commit(&smm->ll); + if (r) + goto out; +@@ -771,6 +785,12 @@ int dm_sm_metadata_create(struct dm_spac + if (r) + return r; + ++ r = apply_bops(smm); ++ if (r) { ++ DMERR("%s: apply_bops failed", __func__); ++ return r; ++ } ++ + return sm_metadata_commit(sm); + } + diff --git a/queue-3.14/dm-stats-fix-divide-by-zero-if-number_of_areas-arg-is-zero.patch b/queue-3.14/dm-stats-fix-divide-by-zero-if-number_of_areas-arg-is-zero.patch new file mode 100644 index 00000000000..a04c797d254 --- /dev/null +++ b/queue-3.14/dm-stats-fix-divide-by-zero-if-number_of_areas-arg-is-zero.patch @@ -0,0 +1,31 @@ +From dd4c1b7d0c95be1c9245118a3accc41a16f1db67 Mon Sep 17 00:00:00 2001 +From: Mikulas Patocka +Date: Fri, 5 Jun 2015 09:50:42 -0400 +Subject: dm stats: fix divide by zero if 'number_of_areas' arg is zero + +From: Mikulas Patocka + +commit dd4c1b7d0c95be1c9245118a3accc41a16f1db67 upstream. + +If the number_of_areas argument was zero the kernel would crash on +div-by-zero. Add better input validation. + +Signed-off-by: Mikulas Patocka +Signed-off-by: Mike Snitzer +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/dm-stats.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/md/dm-stats.c ++++ b/drivers/md/dm-stats.c +@@ -795,6 +795,8 @@ static int message_stats_create(struct m + return -EINVAL; + + if (sscanf(argv[2], "/%u%c", &divisor, &dummy) == 1) { ++ if (!divisor) ++ return -EINVAL; + step = end - start; + if (do_div(step, divisor)) + step++; diff --git a/queue-3.14/drm-add-a-check-for-x-y-in-drm_mode_setcrtc.patch b/queue-3.14/drm-add-a-check-for-x-y-in-drm_mode_setcrtc.patch new file mode 100644 index 00000000000..a1e34007668 --- /dev/null +++ b/queue-3.14/drm-add-a-check-for-x-y-in-drm_mode_setcrtc.patch @@ -0,0 +1,42 @@ +From 01447e9f04ba1c49a9534ae6a5a6f26c2bb05226 Mon Sep 17 00:00:00 2001 +From: Zhao Junwang +Date: Tue, 7 Jul 2015 17:08:35 +0800 +Subject: drm: add a check for x/y in drm_mode_setcrtc + +From: Zhao Junwang + +commit 01447e9f04ba1c49a9534ae6a5a6f26c2bb05226 upstream. + +legacy setcrtc ioctl does take a 32 bit value which might indeed +overflow + +the checks of crtc_req->x > INT_MAX and crtc_req->y > INT_MAX aren't +needed any more with this + +v2: -polish the annotation according to Daniel's comment + +Cc: Daniel Vetter +Signed-off-by: Zhao Junwang +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/drm_crtc.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/drm_crtc.c ++++ b/drivers/gpu/drm/drm_crtc.c +@@ -2155,8 +2155,11 @@ int drm_mode_setcrtc(struct drm_device * + if (!drm_core_check_feature(dev, DRIVER_MODESET)) + return -EINVAL; + +- /* For some reason crtc x/y offsets are signed internally. */ +- if (crtc_req->x > INT_MAX || crtc_req->y > INT_MAX) ++ /* ++ * Universal plane src offsets are only 16.16, prevent havoc for ++ * drivers using universal plane code internally. ++ */ ++ if (crtc_req->x & 0xffff0000 || crtc_req->y & 0xffff0000) + return -ERANGE; + + drm_modeset_lock_all(dev); diff --git a/queue-3.14/drm-qxl-do-not-cause-spice-server-to-clean-our-objects.patch b/queue-3.14/drm-qxl-do-not-cause-spice-server-to-clean-our-objects.patch new file mode 100644 index 00000000000..da27439ee0a --- /dev/null +++ b/queue-3.14/drm-qxl-do-not-cause-spice-server-to-clean-our-objects.patch @@ -0,0 +1,34 @@ +From 2fa19535ca6abcbfd1ccc9ef694db52f49f77747 Mon Sep 17 00:00:00 2001 +From: Frediano Ziglio +Date: Wed, 3 Jun 2015 12:09:09 +0100 +Subject: drm/qxl: Do not cause spice-server to clean our objects + +From: Frediano Ziglio + +commit 2fa19535ca6abcbfd1ccc9ef694db52f49f77747 upstream. + +If objects are moved back from system memory to VRAM (and spice id +created again) memory is already initialized so we need to set flag +to not clear memory. +If you don't do it after a while using desktop many images turns to +black or transparents. + +Signed-off-by: Frediano Ziglio +Reviewed-by: Dave Airlie +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/qxl/qxl_cmd.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/gpu/drm/qxl/qxl_cmd.c ++++ b/drivers/gpu/drm/qxl/qxl_cmd.c +@@ -505,6 +505,7 @@ int qxl_hw_surface_alloc(struct qxl_devi + + cmd = (struct qxl_surface_cmd *)qxl_release_map(qdev, release); + cmd->type = QXL_SURFACE_CMD_CREATE; ++ cmd->flags = QXL_SURF_FLAG_KEEP_DATA; + cmd->u.surface_create.format = surf->surf.format; + cmd->u.surface_create.width = surf->surf.width; + cmd->u.surface_create.height = surf->surf.height; diff --git a/queue-3.14/drm-qxl-do-not-leak-memory-if-qxl_release_list_add-fails.patch b/queue-3.14/drm-qxl-do-not-leak-memory-if-qxl_release_list_add-fails.patch new file mode 100644 index 00000000000..bd6d5dfa3bb --- /dev/null +++ b/queue-3.14/drm-qxl-do-not-leak-memory-if-qxl_release_list_add-fails.patch @@ -0,0 +1,36 @@ +From 8451cc964c1d193b989c41a44e5e77109cc696f8 Mon Sep 17 00:00:00 2001 +From: Frediano Ziglio +Date: Wed, 3 Jun 2015 12:09:10 +0100 +Subject: drm/qxl: Do not leak memory if qxl_release_list_add fails + +From: Frediano Ziglio + +commit 8451cc964c1d193b989c41a44e5e77109cc696f8 upstream. + +If the function fails reference counter to the object is not decremented +causing leaks. +This is hard to spot as it happens only on very low memory situations. + +Signed-off-by: Frediano Ziglio +Reviewed-by: Dave Airlie +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/qxl/qxl_ioctl.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/qxl/qxl_ioctl.c ++++ b/drivers/gpu/drm/qxl/qxl_ioctl.c +@@ -122,8 +122,10 @@ static struct qxl_bo *qxlhw_handle_to_bo + qobj = gem_to_qxl_bo(gobj); + + ret = qxl_release_list_add(release, qobj); +- if (ret) ++ if (ret) { ++ drm_gem_object_unreference_unlocked(gobj); + return NULL; ++ } + + return qobj; + } diff --git a/queue-3.14/drm-radeon-add-a-dpm-quirk-for-sapphire-radeon-r9-270x-2gb-gddr5.patch b/queue-3.14/drm-radeon-add-a-dpm-quirk-for-sapphire-radeon-r9-270x-2gb-gddr5.patch new file mode 100644 index 00000000000..8616cfdbfbe --- /dev/null +++ b/queue-3.14/drm-radeon-add-a-dpm-quirk-for-sapphire-radeon-r9-270x-2gb-gddr5.patch @@ -0,0 +1,29 @@ +From 5dfc71bc44d91d1620505c064fa22b0b3db58a9d Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Thu, 9 Jul 2015 21:08:17 -0400 +Subject: drm/radeon: add a dpm quirk for Sapphire Radeon R9 270X 2GB GDDR5 + +From: Alex Deucher + +commit 5dfc71bc44d91d1620505c064fa22b0b3db58a9d upstream. + +bug: +https://bugs.freedesktop.org/show_bug.cgi?id=76490 + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/si_dpm.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/gpu/drm/radeon/si_dpm.c ++++ b/drivers/gpu/drm/radeon/si_dpm.c +@@ -2914,6 +2914,7 @@ static struct si_dpm_quirk si_dpm_quirk_ + /* PITCAIRN - https://bugs.freedesktop.org/show_bug.cgi?id=76490 */ + { PCI_VENDOR_ID_ATI, 0x6810, 0x1462, 0x3036, 0, 120000 }, + { PCI_VENDOR_ID_ATI, 0x6811, 0x174b, 0xe271, 0, 120000 }, ++ { PCI_VENDOR_ID_ATI, 0x6810, 0x174b, 0xe271, 85000, 90000 }, + { 0, 0, 0, 0 }, + }; + diff --git a/queue-3.14/drm-radeon-compute-ring-fix-hibernation-ci-gpu-family-v2.patch b/queue-3.14/drm-radeon-compute-ring-fix-hibernation-ci-gpu-family-v2.patch new file mode 100644 index 00000000000..549afc7a3d4 --- /dev/null +++ b/queue-3.14/drm-radeon-compute-ring-fix-hibernation-ci-gpu-family-v2.patch @@ -0,0 +1,89 @@ +From 161569deaa03cf3c00ed63352006193f250b0648 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= +Date: Fri, 19 Jun 2015 10:32:15 -0400 +Subject: drm/radeon: compute ring fix hibernation (CI GPU family) v2. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= + +commit 161569deaa03cf3c00ed63352006193f250b0648 upstream. + +In order for hibernation to reliably work we need to cleanup more +thoroughly the compute ring. Hibernation is different from suspend +resume as when we resume from hibernation the hardware is first +fully initialize by regular kernel then freeze callback happens +(which correspond to a suspend inside the radeon kernel driver) +and turn off each of the block. It turns out we were not cleanly +shutting down the compute ring. This patch fix that. + +Hibernation and suspend to ram were tested (several times) on : +Bonaire +Hawaii +Mullins +Kaveri +Kabini + +Changed since v1: + - Factor the ring stop logic into a function taking ring as arg. + +Signed-off-by: Jérôme Glisse +Reviewed-by: Christian König +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/cik.c | 34 ++++++++++++++++++++++++++++++++++ + 1 file changed, 34 insertions(+) + +--- a/drivers/gpu/drm/radeon/cik.c ++++ b/drivers/gpu/drm/radeon/cik.c +@@ -4148,6 +4148,31 @@ void cik_compute_set_wptr(struct radeon_ + WDOORBELL32(ring->doorbell_index, ring->wptr); + } + ++static void cik_compute_stop(struct radeon_device *rdev, ++ struct radeon_ring *ring) ++{ ++ u32 j, tmp; ++ ++ cik_srbm_select(rdev, ring->me, ring->pipe, ring->queue, 0); ++ /* Disable wptr polling. */ ++ tmp = RREG32(CP_PQ_WPTR_POLL_CNTL); ++ tmp &= ~WPTR_POLL_EN; ++ WREG32(CP_PQ_WPTR_POLL_CNTL, tmp); ++ /* Disable HQD. */ ++ if (RREG32(CP_HQD_ACTIVE) & 1) { ++ WREG32(CP_HQD_DEQUEUE_REQUEST, 1); ++ for (j = 0; j < rdev->usec_timeout; j++) { ++ if (!(RREG32(CP_HQD_ACTIVE) & 1)) ++ break; ++ udelay(1); ++ } ++ WREG32(CP_HQD_DEQUEUE_REQUEST, 0); ++ WREG32(CP_HQD_PQ_RPTR, 0); ++ WREG32(CP_HQD_PQ_WPTR, 0); ++ } ++ cik_srbm_select(rdev, 0, 0, 0, 0); ++} ++ + /** + * cik_cp_compute_enable - enable/disable the compute CP MEs + * +@@ -4161,6 +4186,15 @@ static void cik_cp_compute_enable(struct + if (enable) + WREG32(CP_MEC_CNTL, 0); + else { ++ /* ++ * To make hibernation reliable we need to clear compute ring ++ * configuration before halting the compute ring. ++ */ ++ mutex_lock(&rdev->srbm_mutex); ++ cik_compute_stop(rdev,&rdev->ring[CAYMAN_RING_TYPE_CP1_INDEX]); ++ cik_compute_stop(rdev,&rdev->ring[CAYMAN_RING_TYPE_CP2_INDEX]); ++ mutex_unlock(&rdev->srbm_mutex); ++ + WREG32(CP_MEC_CNTL, (MEC_ME1_HALT | MEC_ME2_HALT)); + rdev->ring[CAYMAN_RING_TYPE_CP1_INDEX].ready = false; + rdev->ring[CAYMAN_RING_TYPE_CP2_INDEX].ready = false; diff --git a/queue-3.14/drm-radeon-don-t-flush-the-gart-tlb-if-rdev-gart.ptr-null.patch b/queue-3.14/drm-radeon-don-t-flush-the-gart-tlb-if-rdev-gart.ptr-null.patch new file mode 100644 index 00000000000..e9b45965c24 --- /dev/null +++ b/queue-3.14/drm-radeon-don-t-flush-the-gart-tlb-if-rdev-gart.ptr-null.patch @@ -0,0 +1,56 @@ +From 233709d2cd6bbaaeda0aeb8d11f6ca7f98563b39 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michel=20D=C3=A4nzer?= +Date: Fri, 3 Jul 2015 10:02:27 +0900 +Subject: drm/radeon: Don't flush the GART TLB if rdev->gart.ptr == NULL +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: =?UTF-8?q?Michel=20D=C3=A4nzer?= + +commit 233709d2cd6bbaaeda0aeb8d11f6ca7f98563b39 upstream. + +This can be the case when the GPU is powered off, e.g. via vgaswitcheroo +or runpm. When the GPU is powered up again, radeon_gart_table_vram_pin +flushes the TLB after setting rdev->gart.ptr to non-NULL. + +Fixes panic on powering off R7xx GPUs. + +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61529 +Reviewed-by: Christian König +Signed-off-by: Michel Dänzer +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_gart.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +--- a/drivers/gpu/drm/radeon/radeon_gart.c ++++ b/drivers/gpu/drm/radeon/radeon_gart.c +@@ -251,8 +251,10 @@ void radeon_gart_unbind(struct radeon_de + } + } + } +- mb(); +- radeon_gart_tlb_flush(rdev); ++ if (rdev->gart.ptr) { ++ mb(); ++ radeon_gart_tlb_flush(rdev); ++ } + } + + /** +@@ -294,8 +296,10 @@ int radeon_gart_bind(struct radeon_devic + } + } + } +- mb(); +- radeon_gart_tlb_flush(rdev); ++ if (rdev->gart.ptr) { ++ mb(); ++ radeon_gart_tlb_flush(rdev); ++ } + return 0; + } + diff --git a/queue-3.14/drm-radeon-sdma-fix-hibernation-ci-gpu-family.patch b/queue-3.14/drm-radeon-sdma-fix-hibernation-ci-gpu-family.patch new file mode 100644 index 00000000000..bd05b9571b2 --- /dev/null +++ b/queue-3.14/drm-radeon-sdma-fix-hibernation-ci-gpu-family.patch @@ -0,0 +1,54 @@ +From 2ba8d1bb8f6b589037f7db1f01144fc80750e8f7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= +Date: Fri, 19 Jun 2015 10:32:16 -0400 +Subject: drm/radeon: SDMA fix hibernation (CI GPU family). +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= + +commit 2ba8d1bb8f6b589037f7db1f01144fc80750e8f7 upstream. + +In order for hibernation to reliably work we need to properly turn +off the SDMA block, sadly after numerous attemps i haven't not found +proper sequence for clean and full shutdown. So simply reset both +SDMA block, this makes hibernation works reliably on sea island GPU +family (CI) + +Hibernation and suspend to ram were tested (several times) on : +Bonaire +Hawaii +Mullins +Kaveri +Kabini + +Signed-off-by: Jérôme Glisse +Reviewed-by: Christian König +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/cik_sdma.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +--- a/drivers/gpu/drm/radeon/cik_sdma.c ++++ b/drivers/gpu/drm/radeon/cik_sdma.c +@@ -266,6 +266,17 @@ static void cik_sdma_gfx_stop(struct rad + } + rdev->ring[R600_RING_TYPE_DMA_INDEX].ready = false; + rdev->ring[CAYMAN_RING_TYPE_DMA1_INDEX].ready = false; ++ ++ /* FIXME use something else than big hammer but after few days can not ++ * seem to find good combination so reset SDMA blocks as it seems we ++ * do not shut them down properly. This fix hibernation and does not ++ * affect suspend to ram. ++ */ ++ WREG32(SRBM_SOFT_RESET, SOFT_RESET_SDMA | SOFT_RESET_SDMA1); ++ (void)RREG32(SRBM_SOFT_RESET); ++ udelay(50); ++ WREG32(SRBM_SOFT_RESET, 0); ++ (void)RREG32(SRBM_SOFT_RESET); + } + + /** diff --git a/queue-3.14/drm-radeon-take-the-mode_config-mutex-when-dealing-with-hpds-v2.patch b/queue-3.14/drm-radeon-take-the-mode_config-mutex-when-dealing-with-hpds-v2.patch new file mode 100644 index 00000000000..68540649b65 --- /dev/null +++ b/queue-3.14/drm-radeon-take-the-mode_config-mutex-when-dealing-with-hpds-v2.patch @@ -0,0 +1,35 @@ +From 39fa10f7e21574a70cecf1fed0f9b36535aa68a0 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Fri, 15 May 2015 11:48:52 -0400 +Subject: drm/radeon: take the mode_config mutex when dealing with hpds (v2) + +From: Alex Deucher + +commit 39fa10f7e21574a70cecf1fed0f9b36535aa68a0 upstream. + +Since we are messing with state in the worker. + +v2: drop the changes in the mst worker + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_irq_kms.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/gpu/drm/radeon/radeon_irq_kms.c ++++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c +@@ -79,10 +79,12 @@ static void radeon_hotplug_work_func(str + struct drm_mode_config *mode_config = &dev->mode_config; + struct drm_connector *connector; + ++ mutex_lock(&mode_config->mutex); + if (mode_config->num_connector) { + list_for_each_entry(connector, &mode_config->connector_list, head) + radeon_connector_hotplug(connector); + } ++ mutex_unlock(&mode_config->mutex); + /* Just fire off a uevent and let userspace tell us what to do */ + drm_helper_hpd_irq_event(dev); + } diff --git a/queue-3.14/mmc-block-add-missing-mmc_blk_put-in-power_ro_lock_show.patch b/queue-3.14/mmc-block-add-missing-mmc_blk_put-in-power_ro_lock_show.patch new file mode 100644 index 00000000000..c1281064d51 --- /dev/null +++ b/queue-3.14/mmc-block-add-missing-mmc_blk_put-in-power_ro_lock_show.patch @@ -0,0 +1,32 @@ +From 9098f84cced870f54d8c410dd2444cfa61467fa0 Mon Sep 17 00:00:00 2001 +From: Tomas Winkler +Date: Thu, 16 Jul 2015 15:50:45 +0200 +Subject: mmc: block: Add missing mmc_blk_put() in power_ro_lock_show() + +From: Tomas Winkler + +commit 9098f84cced870f54d8c410dd2444cfa61467fa0 upstream. + +Enclosing mmc_blk_put() is missing in power_ro_lock_show() sysfs handler, +let's add it. + +Fixes: add710eaa886 ("mmc: boot partition ro lock support") +Signed-off-by: Tomas Winkler +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mmc/card/block.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/mmc/card/block.c ++++ b/drivers/mmc/card/block.c +@@ -205,6 +205,8 @@ static ssize_t power_ro_lock_show(struct + + ret = snprintf(buf, PAGE_SIZE, "%d\n", locked); + ++ mmc_blk_put(md); ++ + return ret; + } + diff --git a/queue-3.14/series b/queue-3.14/series index 8f9c66dfeb3..7b08b5d2cf3 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -64,3 +64,16 @@ usb-cp210x-add-id-for-aruba-networks-controllers.patch usb-option-add-2020-4000-id.patch usb-serial-destroy-serial_minors-idr-on-module-exit.patch usb-xhci-bugfix-for-null-pointer-deference-in-xhci_endpoint_init-function.patch +dm-stats-fix-divide-by-zero-if-number_of_areas-arg-is-zero.patch +dm-space-map-metadata-fix-occasional-leak-of-a-metadata-block-on-resize.patch +dm-btree-remove-fix-bug-in-redistribute3.patch +dm-btree-silence-lockdep-lock-inversion-in-dm_btree_del.patch +mmc-block-add-missing-mmc_blk_put-in-power_ro_lock_show.patch +drm-qxl-do-not-cause-spice-server-to-clean-our-objects.patch +drm-qxl-do-not-leak-memory-if-qxl_release_list_add-fails.patch +drm-radeon-take-the-mode_config-mutex-when-dealing-with-hpds-v2.patch +drm-radeon-compute-ring-fix-hibernation-ci-gpu-family-v2.patch +drm-radeon-sdma-fix-hibernation-ci-gpu-family.patch +drm-radeon-don-t-flush-the-gart-tlb-if-rdev-gart.ptr-null.patch +drm-radeon-add-a-dpm-quirk-for-sapphire-radeon-r9-270x-2gb-gddr5.patch +drm-add-a-check-for-x-y-in-drm_mode_setcrtc.patch