--- /dev/null
+From 39e16ba16c147e662bf9fbcee9a99d70d420382f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Mon, 4 Sep 2017 21:02:45 +0200
+Subject: dma-buf: make reservation_object_copy_fences rcu save
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Christian König <christian.koenig@amd.com>
+
+commit 39e16ba16c147e662bf9fbcee9a99d70d420382f upstream.
+
+Stop requiring that the src reservation object is locked for this operation.
+
+Acked-by: Chunming Zhou <david1.zhou@amd.com>
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/1504551766-5093-1-git-send-email-deathsimple@vodafone.de
+Signed-off-by: Lyude Paul <lyude@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/dma-buf/reservation.c | 56 +++++++++++++++++++++++++++++++-----------
+ 1 file changed, 42 insertions(+), 14 deletions(-)
+
+--- a/drivers/dma-buf/reservation.c
++++ b/drivers/dma-buf/reservation.c
+@@ -266,8 +266,7 @@ EXPORT_SYMBOL(reservation_object_add_exc
+ * @dst: the destination reservation object
+ * @src: the source reservation object
+ *
+-* Copy all fences from src to dst. Both src->lock as well as dst-lock must be
+-* held.
++* Copy all fences from src to dst. dst-lock must be held.
+ */
+ int reservation_object_copy_fences(struct reservation_object *dst,
+ struct reservation_object *src)
+@@ -277,33 +276,62 @@ int reservation_object_copy_fences(struc
+ size_t size;
+ unsigned i;
+
+- src_list = reservation_object_get_list(src);
++ rcu_read_lock();
++ src_list = rcu_dereference(src->fence);
+
++retry:
+ if (src_list) {
+- size = offsetof(typeof(*src_list),
+- shared[src_list->shared_count]);
++ unsigned shared_count = src_list->shared_count;
++
++ size = offsetof(typeof(*src_list), shared[shared_count]);
++ rcu_read_unlock();
++
+ dst_list = kmalloc(size, GFP_KERNEL);
+ if (!dst_list)
+ return -ENOMEM;
+
+- dst_list->shared_count = src_list->shared_count;
+- dst_list->shared_max = src_list->shared_count;
+- for (i = 0; i < src_list->shared_count; ++i)
+- dst_list->shared[i] =
+- dma_fence_get(src_list->shared[i]);
++ rcu_read_lock();
++ src_list = rcu_dereference(src->fence);
++ if (!src_list || src_list->shared_count > shared_count) {
++ kfree(dst_list);
++ goto retry;
++ }
++
++ dst_list->shared_count = 0;
++ dst_list->shared_max = shared_count;
++ for (i = 0; i < src_list->shared_count; ++i) {
++ struct dma_fence *fence;
++
++ fence = rcu_dereference(src_list->shared[i]);
++ if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT,
++ &fence->flags))
++ continue;
++
++ if (!dma_fence_get_rcu(fence)) {
++ kfree(dst_list);
++ src_list = rcu_dereference(src->fence);
++ goto retry;
++ }
++
++ if (dma_fence_is_signaled(fence)) {
++ dma_fence_put(fence);
++ continue;
++ }
++
++ dst_list->shared[dst_list->shared_count++] = fence;
++ }
+ } else {
+ dst_list = NULL;
+ }
+
++ new = dma_fence_get_rcu_safe(&src->fence_excl);
++ rcu_read_unlock();
++
+ kfree(dst->staged);
+ dst->staged = NULL;
+
+ src_list = reservation_object_get_list(dst);
+-
+ old = reservation_object_get_excl(dst);
+- new = reservation_object_get_excl(src);
+-
+- dma_fence_get(new);
+
+ preempt_disable();
+ write_seqcount_begin(&dst->seq);
--- /dev/null
+From 76d6172b6fab16455af4b67bb18a3f66011592f8 Mon Sep 17 00:00:00 2001
+From: Ken Wang <Ken.Wang@amd.com>
+Date: Fri, 29 Sep 2017 15:41:43 +0800
+Subject: drm/amdgpu: correct reference clock value on vega10
+
+From: Ken Wang <Ken.Wang@amd.com>
+
+commit 76d6172b6fab16455af4b67bb18a3f66011592f8 upstream.
+
+Old value from bringup was wrong.
+
+Signed-off-by: Ken Wang <Ken.Wang@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/amd/amdgpu/soc15.c | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/soc15.c
++++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
+@@ -279,10 +279,7 @@ static void soc15_init_golden_registers(
+ }
+ static u32 soc15_get_xclk(struct amdgpu_device *adev)
+ {
+- if (adev->asic_type == CHIP_VEGA10)
+- return adev->clock.spll.reference_freq/4;
+- else
+- return adev->clock.spll.reference_freq;
++ return adev->clock.spll.reference_freq;
+ }
+
+
--- /dev/null
+From a695e43712242c354748e9bae5d137d4337a7694 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Tue, 31 Oct 2017 09:36:13 +0100
+Subject: drm/amdgpu: fix error handling in amdgpu_bo_do_create
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Christian König <christian.koenig@amd.com>
+
+commit a695e43712242c354748e9bae5d137d4337a7694 upstream.
+
+The bo structure is freed up in case of an error, so we can't do any
+accounting if that happens.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Michel Dänzer <michel.daenzer@amd.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 | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+@@ -391,6 +391,9 @@ int amdgpu_bo_create_restricted(struct a
+ r = ttm_bo_init_reserved(&adev->mman.bdev, &bo->tbo, size, type,
+ &bo->placement, page_align, !kernel, NULL,
+ acc_size, sg, resv, &amdgpu_ttm_bo_destroy);
++ if (unlikely(r != 0))
++ return r;
++
+ bytes_moved = atomic64_read(&adev->num_bytes_moved) -
+ initial_bytes_moved;
+ if (adev->mc.visible_vram_size < adev->mc.real_vram_size &&
+@@ -400,9 +403,6 @@ int amdgpu_bo_create_restricted(struct a
+ else
+ amdgpu_cs_report_moved_bytes(adev, bytes_moved, 0);
+
+- if (unlikely(r != 0))
+- return r;
+-
+ if (kernel)
+ bo->tbo.priority = 1;
+
--- /dev/null
+From 40a9960b046290939b56ce8e51f365258f27f264 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Sat, 30 Sep 2017 11:13:28 +0300
+Subject: drm/amdgpu: potential uninitialized variable in amdgpu_vce_ring_parse_cs()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit 40a9960b046290939b56ce8e51f365258f27f264 upstream.
+
+We shifted some code around in commit 9cca0b8e5df0 ("drm/amdgpu: move
+amdgpu_cs_sysvm_access_required into find_mapping") and now my static
+checker complains that "r" might not be initialized at the end of the
+function. I've reviewed the code, and that seems possible, but it's
+also possible I may have missed something.
+
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.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_vce.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+@@ -647,7 +647,7 @@ int amdgpu_vce_ring_parse_cs(struct amdg
+ uint32_t allocated = 0;
+ uint32_t tmp, handle = 0;
+ uint32_t *size = &tmp;
+- int i, r, idx = 0;
++ int i, r = 0, idx = 0;
+
+ p->job->vm = NULL;
+ ib->gpu_addr = amdgpu_sa_bo_gpu_addr(ib->sa_bo);
--- /dev/null
+From 78aa02c713fcf19e9bc8511ab61a5fd6c877cc01 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Sat, 30 Sep 2017 11:14:13 +0300
+Subject: drm/amdgpu: Potential uninitialized variable in amdgpu_vm_update_directories()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit 78aa02c713fcf19e9bc8511ab61a5fd6c877cc01 upstream.
+
+After commit ea09729c9302 ("drm/amdgpu: rework page directory filling
+v2") then it becomes a lot harder to verify that "r" is initialized. My
+static checker complains and so I've reviewed the code. It does look
+like it might be buggy... Anyway, it doesn't hurt to set "r" to zero
+at the start.
+
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.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_vm.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+@@ -1201,7 +1201,7 @@ static void amdgpu_vm_invalidate_level(s
+ int amdgpu_vm_update_directories(struct amdgpu_device *adev,
+ struct amdgpu_vm *vm)
+ {
+- int r;
++ int r = 0;
+
+ r = amdgpu_vm_update_level(adev, vm, &vm->root, 0);
+ if (r)
--- /dev/null
+From c5066129af4436ab0da8eefe4289774a5409706d Mon Sep 17 00:00:00 2001
+From: ozeng <oak.zeng@amd.com>
+Date: Tue, 6 Jun 2017 10:53:28 -0500
+Subject: drm/amdgpu: Properly allocate VM invalidate eng v2
+
+From: ozeng <oak.zeng@amd.com>
+
+commit c5066129af4436ab0da8eefe4289774a5409706d upstream.
+
+v1: Properly allocate TLB invalidation engine to avoid conflict.
+v2: Added comments to codes
+
+Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Acked-by: Christian Konig <christian.koenig@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+@@ -395,7 +395,16 @@ static int gmc_v9_0_early_init(void *han
+ static int gmc_v9_0_late_init(void *handle)
+ {
+ struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+- unsigned vm_inv_eng[AMDGPU_MAX_VMHUBS] = { 3, 3 };
++ /*
++ * The latest engine allocation on gfx9 is:
++ * Engine 0, 1: idle
++ * Engine 2, 3: firmware
++ * Engine 4~13: amdgpu ring, subject to change when ring number changes
++ * Engine 14~15: idle
++ * Engine 16: kfd tlb invalidation
++ * Engine 17: Gart flushes
++ */
++ unsigned vm_inv_eng[AMDGPU_MAX_VMHUBS] = { 4, 4 };
+ unsigned i;
+
+ for(i = 0; i < adev->num_rings; ++i) {
+@@ -408,9 +417,9 @@ static int gmc_v9_0_late_init(void *hand
+ ring->funcs->vmhub);
+ }
+
+- /* Engine 17 is used for GART flushes */
++ /* Engine 16 is used for KFD and 17 for GART flushes */
+ for(i = 0; i < AMDGPU_MAX_VMHUBS; ++i)
+- BUG_ON(vm_inv_eng[i] > 17);
++ BUG_ON(vm_inv_eng[i] > 16);
+
+ return amdgpu_irq_get(adev, &adev->mc.vm_fault, 0);
+ }
--- /dev/null
+From ab6613b7eaefe85dadfc86025e901c55d71c0379 Mon Sep 17 00:00:00 2001
+From: Ken Wang <Ken.Wang@amd.com>
+Date: Wed, 8 Nov 2017 14:48:50 +0800
+Subject: drm/amdgpu: Remove check which is not valid for certain VBIOS
+
+From: Ken Wang <Ken.Wang@amd.com>
+
+commit ab6613b7eaefe85dadfc86025e901c55d71c0379 upstream.
+
+Fixes vbios fetching on certain headless boards.
+
+Signed-off-by: Ken Wang <Ken.Wang@amd.com>
+Acked-by: Alex Deucher <alexander.deucher@amd.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_bios.c | 6 ------
+ 1 file changed, 6 deletions(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
+@@ -59,12 +59,6 @@ static bool check_atom_bios(uint8_t *bio
+ return false;
+ }
+
+- tmp = bios[0x18] | (bios[0x19] << 8);
+- if (bios[tmp + 0x14] != 0x0) {
+- DRM_INFO("Not an x86 BIOS ROM\n");
+- return false;
+- }
+-
+ bios_header_start = bios[0x48] | (bios[0x49] << 8);
+ if (!bios_header_start) {
+ DRM_INFO("Can't locate bios header\n");
--- /dev/null
+From 378e2d5b504fe0231c557751e58b80fcf717cc20 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Mon, 4 Sep 2017 20:58:45 +0200
+Subject: drm/ttm: fix ttm_bo_cleanup_refs_or_queue once more
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Christian König <christian.koenig@amd.com>
+
+commit 378e2d5b504fe0231c557751e58b80fcf717cc20 upstream.
+
+With shared reservation objects __ttm_bo_reserve() can easily fail even on
+destroyed BOs. This prevents correct handling when we need to individualize
+the reservation object.
+
+Fix this by individualizing the object before even trying to reserve it.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Acked-by: Chunming Zhou <david1.zhou@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Lyude Paul <lyude@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/ttm/ttm_bo.c | 32 +++++++++++++++++---------------
+ 1 file changed, 17 insertions(+), 15 deletions(-)
+
+--- a/drivers/gpu/drm/ttm/ttm_bo.c
++++ b/drivers/gpu/drm/ttm/ttm_bo.c
+@@ -440,28 +440,29 @@ static void ttm_bo_cleanup_refs_or_queue
+ struct ttm_bo_global *glob = bo->glob;
+ int ret;
+
++ ret = ttm_bo_individualize_resv(bo);
++ if (ret) {
++ /* Last resort, if we fail to allocate memory for the
++ * fences block for the BO to become idle
++ */
++ reservation_object_wait_timeout_rcu(bo->resv, true, false,
++ 30 * HZ);
++ spin_lock(&glob->lru_lock);
++ goto error;
++ }
++
+ spin_lock(&glob->lru_lock);
+ ret = __ttm_bo_reserve(bo, false, true, NULL);
+-
+ if (!ret) {
+- if (!ttm_bo_wait(bo, false, true)) {
++ if (reservation_object_test_signaled_rcu(&bo->ttm_resv, true)) {
+ ttm_bo_del_from_lru(bo);
+ spin_unlock(&glob->lru_lock);
++ if (bo->resv != &bo->ttm_resv)
++ reservation_object_unlock(&bo->ttm_resv);
+ ttm_bo_cleanup_memtype_use(bo);
+-
+ return;
+ }
+
+- ret = ttm_bo_individualize_resv(bo);
+- if (ret) {
+- /* Last resort, if we fail to allocate memory for the
+- * fences block for the BO to become idle and free it.
+- */
+- spin_unlock(&glob->lru_lock);
+- ttm_bo_wait(bo, true, true);
+- ttm_bo_cleanup_memtype_use(bo);
+- return;
+- }
+ ttm_bo_flush_all_fences(bo);
+
+ /*
+@@ -474,11 +475,12 @@ static void ttm_bo_cleanup_refs_or_queue
+ ttm_bo_add_to_lru(bo);
+ }
+
+- if (bo->resv != &bo->ttm_resv)
+- reservation_object_unlock(&bo->ttm_resv);
+ __ttm_bo_unreserve(bo);
+ }
++ if (bo->resv != &bo->ttm_resv)
++ reservation_object_unlock(&bo->ttm_resv);
+
++error:
+ kref_get(&bo->list_kref);
+ list_add_tail(&bo->ddestroy, &bdev->ddestroy);
+ spin_unlock(&glob->lru_lock);
--- /dev/null
+From 68615eb01f82256c19e41967bfb3eef902f77033 Mon Sep 17 00:00:00 2001
+From: Peter Rosin <peda@axentia.se>
+Date: Mon, 27 Nov 2017 17:31:00 +0100
+Subject: hwmon: (jc42) optionally try to disable the SMBUS timeout
+
+From: Peter Rosin <peda@axentia.se>
+
+commit 68615eb01f82256c19e41967bfb3eef902f77033 upstream.
+
+With a nxp,se97 chip on an atmel sama5d31 board, the I2C adapter driver
+is not always capable of avoiding the 25-35 ms timeout as specified by
+the SMBUS protocol. This may cause silent corruption of the last bit of
+any transfer, e.g. a one is read instead of a zero if the sensor chip
+times out. This also affects the eeprom half of the nxp-se97 chip, where
+this silent corruption was originally noticed. Other I2C adapters probably
+suffer similar issues, e.g. bit-banging comes to mind as risky...
+
+The SMBUS register in the nxp chip is not a standard Jedec register, but
+it is not special to the nxp chips either, at least the atmel chips
+have the same mechanism. Therefore, do not special case this on the
+manufacturer, it is opt-in via the device property anyway.
+
+Signed-off-by: Peter Rosin <peda@axentia.se>
+Acked-by: Rob Herring <robh@kernel.org>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ Documentation/devicetree/bindings/hwmon/jc42.txt | 4 ++++
+ drivers/hwmon/jc42.c | 21 +++++++++++++++++++++
+ 2 files changed, 25 insertions(+)
+
+--- a/Documentation/devicetree/bindings/hwmon/jc42.txt
++++ b/Documentation/devicetree/bindings/hwmon/jc42.txt
+@@ -34,6 +34,10 @@ Required properties:
+
+ - reg: I2C address
+
++Optional properties:
++- smbus-timeout-disable: When set, the smbus timeout function will be disabled.
++ This is not supported on all chips.
++
+ Example:
+
+ temp-sensor@1a {
+--- a/drivers/hwmon/jc42.c
++++ b/drivers/hwmon/jc42.c
+@@ -22,6 +22,7 @@
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
++#include <linux/bitops.h>
+ #include <linux/module.h>
+ #include <linux/init.h>
+ #include <linux/slab.h>
+@@ -45,6 +46,7 @@ static const unsigned short normal_i2c[]
+ #define JC42_REG_TEMP 0x05
+ #define JC42_REG_MANID 0x06
+ #define JC42_REG_DEVICEID 0x07
++#define JC42_REG_SMBUS 0x22 /* NXP and Atmel, possibly others? */
+
+ /* Status bits in temperature register */
+ #define JC42_ALARM_CRIT_BIT 15
+@@ -75,6 +77,9 @@ static const unsigned short normal_i2c[]
+ #define GT_MANID 0x1c68 /* Giantec */
+ #define GT_MANID2 0x132d /* Giantec, 2nd mfg ID */
+
++/* SMBUS register */
++#define SMBUS_STMOUT BIT(7) /* SMBus time-out, active low */
++
+ /* Supported chips */
+
+ /* Analog Devices */
+@@ -495,6 +500,22 @@ static int jc42_probe(struct i2c_client
+
+ data->extended = !!(cap & JC42_CAP_RANGE);
+
++ if (device_property_read_bool(dev, "smbus-timeout-disable")) {
++ int smbus;
++
++ /*
++ * Not all chips support this register, but from a
++ * quick read of various datasheets no chip appears
++ * incompatible with the below attempt to disable
++ * the timeout. And the whole thing is opt-in...
++ */
++ smbus = i2c_smbus_read_word_swapped(client, JC42_REG_SMBUS);
++ if (smbus < 0)
++ return smbus;
++ i2c_smbus_write_word_swapped(client, JC42_REG_SMBUS,
++ smbus | SMBUS_STMOUT);
++ }
++
+ config = i2c_smbus_read_word_swapped(client, JC42_REG_CONFIG);
+ if (config < 0)
+ return config;
--- /dev/null
+From 8c97eeccf0ad8783c057830119467b877bdfced7 Mon Sep 17 00:00:00 2001
+From: Jeff Lien <jeff.lien@wdc.com>
+Date: Tue, 21 Nov 2017 10:44:37 -0600
+Subject: nvme-pci: add quirk for delay before CHK RDY for WDC SN200
+
+From: Jeff Lien <jeff.lien@wdc.com>
+
+commit 8c97eeccf0ad8783c057830119467b877bdfced7 upstream.
+
+And increase the existing delay to cover this device as well.
+
+Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/nvme/host/nvme.h | 2 +-
+ drivers/nvme/host/pci.c | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/nvme/host/nvme.h
++++ b/drivers/nvme/host/nvme.h
+@@ -108,7 +108,7 @@ static inline struct nvme_request *nvme_
+ * NVME_QUIRK_DELAY_BEFORE_CHK_RDY quirk enabled. The value (in ms) was
+ * found empirically.
+ */
+-#define NVME_QUIRK_DELAY_AMOUNT 2000
++#define NVME_QUIRK_DELAY_AMOUNT 2300
+
+ enum nvme_ctrl_state {
+ NVME_CTRL_NEW,
+--- a/drivers/nvme/host/pci.c
++++ b/drivers/nvme/host/pci.c
+@@ -2519,6 +2519,8 @@ static const struct pci_device_id nvme_i
+ .driver_data = NVME_QUIRK_IDENTIFY_CNS, },
+ { PCI_DEVICE(0x1c58, 0x0003), /* HGST adapter */
+ .driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
++ { PCI_DEVICE(0x1c58, 0x0023), /* WDC SN200 adapter */
++ .driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
+ { PCI_DEVICE(0x1c5f, 0x0540), /* Memblaze Pblaze4 adapter */
+ .driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
+ { PCI_DEVICE(0x144d, 0xa821), /* Samsung PM1725 */
--- /dev/null
+From 18c437caa5b18a235dd65cec224eab54bebcee65 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Tue, 14 Nov 2017 17:19:29 -0500
+Subject: Revert "drm/radeon: dont switch vt on suspend"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 18c437caa5b18a235dd65cec224eab54bebcee65 upstream.
+
+Fixes distorted colors on some cards on resume from suspend.
+
+This reverts commit b9729b17a414f99c61f4db9ac9f9ed987fa0cbfe.
+
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98832
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99163
+Bug: https://bugzilla.kernel.org/show_bug.cgi?id=107001
+Reviewed-by: Michel Dänzer <michel.daenzer@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_fb.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/gpu/drm/radeon/radeon_fb.c
++++ b/drivers/gpu/drm/radeon/radeon_fb.c
+@@ -245,7 +245,6 @@ static int radeonfb_create(struct drm_fb
+ }
+
+ info->par = rfbdev;
+- info->skip_vt_switch = true;
+
+ ret = radeon_framebuffer_init(rdev->ddev, &rfbdev->rfb, &mode_cmd, gobj);
+ if (ret) {
bcache-fix-building-error-on-mips.patch
bcache-only-permit-to-recovery-read-error-when-cache-device-is-clean.patch
bcache-recover-data-from-backing-when-data-is-clean.patch
+hwmon-jc42-optionally-try-to-disable-the-smbus-timeout.patch
+nvme-pci-add-quirk-for-delay-before-chk-rdy-for-wdc-sn200.patch
+revert-drm-radeon-dont-switch-vt-on-suspend.patch
+drm-amdgpu-potential-uninitialized-variable-in-amdgpu_vce_ring_parse_cs.patch
+drm-amdgpu-potential-uninitialized-variable-in-amdgpu_vm_update_directories.patch
+drm-amdgpu-correct-reference-clock-value-on-vega10.patch
+drm-amdgpu-fix-error-handling-in-amdgpu_bo_do_create.patch
+drm-amdgpu-properly-allocate-vm-invalidate-eng-v2.patch
+drm-amdgpu-remove-check-which-is-not-valid-for-certain-vbios.patch
+drm-ttm-fix-ttm_bo_cleanup_refs_or_queue-once-more.patch
+dma-buf-make-reservation_object_copy_fences-rcu-save.patch