--- /dev/null
+From 5aa5630af2fdb3296d99b3471ad4b1233bfb2113 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 28 Feb 2020 22:36:07 +0100
+Subject: drm/amd/display: Add link_rate quirk for Apple 15" MBP 2017
+
+From: Mario Kleiner <mario.kleiner.de@gmail.com>
+
+[ Upstream commit dec9de2ada523b344eb2428abfedf9d6cd0a0029 ]
+
+This fixes a problem found on the MacBookPro 2017 Retina panel:
+
+The panel reports 10 bpc color depth in its EDID, and the
+firmware chooses link settings at boot which support enough
+bandwidth for 10 bpc (324000 kbit/sec aka LINK_RATE_RBR2
+aka 0xc), but the DP_MAX_LINK_RATE dpcd register only reports
+2.7 Gbps (multiplier value 0xa) as possible, in direct
+contradiction of what the firmware successfully set up.
+
+This restricts the panel to 8 bpc, not providing the full
+color depth of the panel on Linux <= 5.5. Additionally, commit
+'4a8ca46bae8a ("drm/amd/display: Default max bpc to 16 for eDP")'
+introduced into Linux 5.6-rc1 will unclamp panel depth to
+its full 10 bpc, thereby requiring a eDP bandwidth for all
+modes that exceeds the bandwidth available and causes all modes
+to fail validation -> No modes for the laptop panel -> failure
+to set any mode -> Panel goes dark.
+
+This patch adds a quirk specific to the MBP 2017 15" Retina
+panel to override reported max link rate to the correct maximum
+of 0xc = LINK_RATE_RBR2 to fix the darkness and reduced display
+precision.
+
+Please apply for Linux 5.6+ to avoid regressing Apple MBP panel
+support.
+
+Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+index 122249da03ab7..a4928854a3de5 100644
+--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
++++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+@@ -2440,6 +2440,17 @@ static bool retrieve_link_cap(struct dc_link *link)
+ sink_id.ieee_device_id,
+ sizeof(sink_id.ieee_device_id));
+
++ /* Quirk Apple MBP 2017 15" Retina panel: Wrong DP_MAX_LINK_RATE */
++ {
++ uint8_t str_mbp_2017[] = { 101, 68, 21, 101, 98, 97 };
++
++ if ((link->dpcd_caps.sink_dev_id == 0x0010fa) &&
++ !memcmp(link->dpcd_caps.sink_dev_id_str, str_mbp_2017,
++ sizeof(str_mbp_2017))) {
++ link->reported_link_cap.link_rate = 0x0c;
++ }
++ }
++
+ core_link_read_dpcd(
+ link,
+ DP_SINK_HW_REVISION_START,
+--
+2.20.1
+
--- /dev/null
+From a7f0aafc7015d598b2405d91aec36bec1746bde6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 18 Mar 2020 17:09:05 -0400
+Subject: drm/amdgpu: fix typo for vcn1 idle check
+
+From: James Zhu <James.Zhu@amd.com>
+
+[ Upstream commit acfc62dc68770aa665cc606891f6df7d6d1e52c0 ]
+
+fix typo for vcn1 idle check
+
+Signed-off-by: James Zhu <James.Zhu@amd.com>
+Reviewed-by: Leo Liu <leo.liu@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
+index 4f8f3bb218320..a54f8943ffa34 100644
+--- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
+@@ -857,7 +857,7 @@ static int vcn_v1_0_set_clockgating_state(void *handle,
+
+ if (enable) {
+ /* wait for STATUS to clear */
+- if (vcn_v1_0_is_idle(handle))
++ if (!vcn_v1_0_is_idle(handle))
+ return -EBUSY;
+ vcn_v1_0_enable_clock_gating(adev);
+ } else {
+--
+2.20.1
+
--- /dev/null
+From d0e85d9792bfc778dd388b3afc36fbf454b1d32e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 13 Mar 2020 09:41:52 +0100
+Subject: drm/bochs: downgrade pci_request_region failure from error to warning
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Gerd Hoffmann <kraxel@redhat.com>
+
+[ Upstream commit 8c34cd1a7f089dc03933289c5d4a4d1489549828 ]
+
+Shutdown of firmware framebuffer has a bunch of problems. Because
+of this the framebuffer region might still be reserved even after
+drm_fb_helper_remove_conflicting_pci_framebuffers() returned.
+
+Don't consider pci_request_region() failure for the framebuffer
+region as fatal error to workaround this issue.
+
+Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
+Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
+Acked-by: Sam Ravnborg <sam@ravnborg.org>
+Link: http://patchwork.freedesktop.org/patch/msgid/20200313084152.2734-1-kraxel@redhat.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/bochs/bochs_hw.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c
+index a39b0343c197d..401c218567af9 100644
+--- a/drivers/gpu/drm/bochs/bochs_hw.c
++++ b/drivers/gpu/drm/bochs/bochs_hw.c
+@@ -97,10 +97,8 @@ int bochs_hw_init(struct drm_device *dev, uint32_t flags)
+ size = min(size, mem);
+ }
+
+- if (pci_request_region(pdev, 0, "bochs-drm") != 0) {
+- DRM_ERROR("Cannot request framebuffer\n");
+- return -EBUSY;
+- }
++ if (pci_request_region(pdev, 0, "bochs-drm") != 0)
++ DRM_WARN("Cannot request framebuffer, boot fb still active?\n");
+
+ bochs->fb_map = ioremap(addr, size);
+ if (bochs->fb_map == NULL) {
+--
+2.20.1
+
--- /dev/null
+From 419f7184ce61b1b6ac511b830fce2a14a78fce79 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 16 Mar 2020 14:25:19 +0300
+Subject: initramfs: restore default compression behavior
+
+From: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
+
+[ Upstream commit 785d74ec3bbf26ac7f6e92e6e96a259aec0f107a ]
+
+Even though INITRAMFS_SOURCE kconfig option isn't set in most of
+defconfigs it is used (set) extensively by various build systems.
+Commit f26661e12765 ("initramfs: make initramfs compression choice
+non-optional") has changed default compression mode. Previously we
+compress initramfs using available compression algorithm. Now
+we don't use any compression at all by default.
+It significantly increases the image size in case of build system
+chooses embedded initramfs. Initially I faced with this issue while
+using buildroot.
+
+As of today it's not possible to set preferred compression mode
+in target defconfig as this option depends on INITRAMFS_SOURCE
+being set. Modification of all build systems either doesn't look
+like good option.
+
+Let's instead rewrite initramfs compression mode choices list
+the way that "INITRAMFS_COMPRESSION_NONE" will be the last option
+in the list. In that case it will be chosen only if all other
+options (which implements any compression) are not available.
+
+Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
+Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ usr/Kconfig | 22 +++++++++++-----------
+ 1 file changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/usr/Kconfig b/usr/Kconfig
+index 43658b8a975e5..8b4826de1189f 100644
+--- a/usr/Kconfig
++++ b/usr/Kconfig
+@@ -131,17 +131,6 @@ choice
+
+ If in doubt, select 'None'
+
+-config INITRAMFS_COMPRESSION_NONE
+- bool "None"
+- help
+- Do not compress the built-in initramfs at all. This may sound wasteful
+- in space, but, you should be aware that the built-in initramfs will be
+- compressed at a later stage anyways along with the rest of the kernel,
+- on those architectures that support this. However, not compressing the
+- initramfs may lead to slightly higher memory consumption during a
+- short time at boot, while both the cpio image and the unpacked
+- filesystem image will be present in memory simultaneously
+-
+ config INITRAMFS_COMPRESSION_GZIP
+ bool "Gzip"
+ depends on RD_GZIP
+@@ -214,6 +203,17 @@ config INITRAMFS_COMPRESSION_LZ4
+ If you choose this, keep in mind that most distros don't provide lz4
+ by default which could cause a build failure.
+
++config INITRAMFS_COMPRESSION_NONE
++ bool "None"
++ help
++ Do not compress the built-in initramfs at all. This may sound wasteful
++ in space, but, you should be aware that the built-in initramfs will be
++ compressed at a later stage anyways along with the rest of the kernel,
++ on those architectures that support this. However, not compressing the
++ initramfs may lead to slightly higher memory consumption during a
++ short time at boot, while both the cpio image and the unpacked
++ filesystem image will be present in memory simultaneously
++
+ endchoice
+
+ config INITRAMFS_COMPRESSION
+--
+2.20.1
+
--- /dev/null
+From 72bcfd93a5509ef41d2120f894ed583f082ebabe Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 9 Mar 2020 15:07:53 -0600
+Subject: nvme-rdma: Avoid double freeing of async event data
+
+From: Prabhath Sajeepa <psajeepa@purestorage.com>
+
+[ Upstream commit 9134ae2a2546cb96abddcd4469a79c77ee3a4480 ]
+
+The timeout of identify cmd, which is invoked as part of admin queue
+creation, can result in freeing of async event data both in
+nvme_rdma_timeout handler and error handling path of
+nvme_rdma_configure_admin queue thus causing NULL pointer reference.
+Call Trace:
+ ? nvme_rdma_setup_ctrl+0x223/0x800 [nvme_rdma]
+ nvme_rdma_create_ctrl+0x2ba/0x3f7 [nvme_rdma]
+ nvmf_dev_write+0xa54/0xcc6 [nvme_fabrics]
+ __vfs_write+0x1b/0x40
+ vfs_write+0xb2/0x1b0
+ ksys_write+0x61/0xd0
+ __x64_sys_write+0x1a/0x20
+ do_syscall_64+0x60/0x1e0
+ entry_SYSCALL_64_after_hwframe+0x44/0xa9
+
+Reviewed-by: Roland Dreier <roland@purestorage.com>
+Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Prabhath Sajeepa <psajeepa@purestorage.com>
+Signed-off-by: Keith Busch <kbusch@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/nvme/host/rdma.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
+index e4f167e35353f..9711bfbdf4316 100644
+--- a/drivers/nvme/host/rdma.c
++++ b/drivers/nvme/host/rdma.c
+@@ -815,9 +815,11 @@ out_free_tagset:
+ if (new)
+ nvme_rdma_free_tagset(&ctrl->ctrl, ctrl->ctrl.admin_tagset);
+ out_free_async_qe:
+- nvme_rdma_free_qe(ctrl->device->dev, &ctrl->async_event_sqe,
+- sizeof(struct nvme_command), DMA_TO_DEVICE);
+- ctrl->async_event_sqe.data = NULL;
++ if (ctrl->async_event_sqe.data) {
++ nvme_rdma_free_qe(ctrl->device->dev, &ctrl->async_event_sqe,
++ sizeof(struct nvme_command), DMA_TO_DEVICE);
++ ctrl->async_event_sqe.data = NULL;
++ }
+ out_free_queue:
+ nvme_rdma_free_queue(&ctrl->queues[0]);
+ return error;
+--
+2.20.1
+
net-ip_tunnel-fix-interface-lookup-with-no-key.patch
sctp-fix-refcount-bug-in-sctp_wfree.patch
sctp-fix-possibly-using-a-bad-saddr-with-a-given-dst.patch
+nvme-rdma-avoid-double-freeing-of-async-event-data.patch
+drm-amd-display-add-link_rate-quirk-for-apple-15-mbp.patch
+drm-bochs-downgrade-pci_request_region-failure-from-.patch
+initramfs-restore-default-compression-behavior.patch
+drm-amdgpu-fix-typo-for-vcn1-idle-check.patch
+tools-power-turbostat-fix-gcc-build-warnings.patch
+tools-power-turbostat-fix-missing-sys_lpi-counter-on.patch
--- /dev/null
+From 6ffd945ed0339d686f0257a6549b5f3ee7bbe166 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 19 Mar 2020 18:33:12 -0400
+Subject: tools/power turbostat: Fix gcc build warnings
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Len Brown <len.brown@intel.com>
+
+[ Upstream commit d8d005ba6afa502ca37ced5782f672c4d2fc1515 ]
+
+Warning: ‘__builtin_strncpy’ specified bound 20 equals destination size
+ [-Wstringop-truncation]
+
+reduce param to strncpy, to guarantee that a null byte is always copied
+into destination buffer.
+
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ tools/power/x86/turbostat/turbostat.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
+index 02d123871ef95..fb665fdc722a4 100644
+--- a/tools/power/x86/turbostat/turbostat.c
++++ b/tools/power/x86/turbostat/turbostat.c
+@@ -5144,9 +5144,9 @@ int add_counter(unsigned int msr_num, char *path, char *name,
+ }
+
+ msrp->msr_num = msr_num;
+- strncpy(msrp->name, name, NAME_BYTES);
++ strncpy(msrp->name, name, NAME_BYTES - 1);
+ if (path)
+- strncpy(msrp->path, path, PATH_BYTES);
++ strncpy(msrp->path, path, PATH_BYTES - 1);
+ msrp->width = width;
+ msrp->type = type;
+ msrp->format = format;
+--
+2.20.1
+
--- /dev/null
+From 9e9e239f68e87ce6c33588f33835cdf2bb34f03a Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 19 Mar 2020 18:26:05 -0400
+Subject: tools/power turbostat: Fix missing SYS_LPI counter on some
+ Chromebooks
+
+From: Len Brown <len.brown@intel.com>
+
+[ Upstream commit 1f81c5efc020314b2db30d77efe228b7e117750d ]
+
+Some Chromebook BIOS' do not export an ACPI LPIT, which is how
+Linux finds the residency counter for CPU and SYSTEM low power states,
+that is exports in /sys/devices/system/cpu/cpuidle/*residency_us
+
+When these sysfs attributes are missing, check the debugfs attrubte
+from the pmc_core driver, which accesses the same counter value.
+
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ tools/power/x86/turbostat/turbostat.c | 23 ++++++++++++++---------
+ 1 file changed, 14 insertions(+), 9 deletions(-)
+
+diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
+index fb665fdc722a4..2233cf722c692 100644
+--- a/tools/power/x86/turbostat/turbostat.c
++++ b/tools/power/x86/turbostat/turbostat.c
+@@ -299,6 +299,10 @@ int *irqs_per_cpu; /* indexed by cpu_num */
+
+ void setup_all_buffers(void);
+
++char *sys_lpi_file;
++char *sys_lpi_file_sysfs = "/sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us";
++char *sys_lpi_file_debugfs = "/sys/kernel/debug/pmc_core/slp_s0_residency_usec";
++
+ int cpu_is_not_present(int cpu)
+ {
+ return !CPU_ISSET_S(cpu, cpu_present_setsize, cpu_present_set);
+@@ -2844,8 +2848,6 @@ int snapshot_gfx_mhz(void)
+ *
+ * record snapshot of
+ * /sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us
+- *
+- * return 1 if config change requires a restart, else return 0
+ */
+ int snapshot_cpu_lpi_us(void)
+ {
+@@ -2865,17 +2867,14 @@ int snapshot_cpu_lpi_us(void)
+ /*
+ * snapshot_sys_lpi()
+ *
+- * record snapshot of
+- * /sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us
+- *
+- * return 1 if config change requires a restart, else return 0
++ * record snapshot of sys_lpi_file
+ */
+ int snapshot_sys_lpi_us(void)
+ {
+ FILE *fp;
+ int retval;
+
+- fp = fopen_or_die("/sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us", "r");
++ fp = fopen_or_die(sys_lpi_file, "r");
+
+ retval = fscanf(fp, "%lld", &cpuidle_cur_sys_lpi_us);
+ if (retval != 1)
+@@ -4743,10 +4742,16 @@ void process_cpuid()
+ else
+ BIC_NOT_PRESENT(BIC_CPU_LPI);
+
+- if (!access("/sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us", R_OK))
++ if (!access(sys_lpi_file_sysfs, R_OK)) {
++ sys_lpi_file = sys_lpi_file_sysfs;
+ BIC_PRESENT(BIC_SYS_LPI);
+- else
++ } else if (!access(sys_lpi_file_debugfs, R_OK)) {
++ sys_lpi_file = sys_lpi_file_debugfs;
++ BIC_PRESENT(BIC_SYS_LPI);
++ } else {
++ sys_lpi_file_sysfs = NULL;
+ BIC_NOT_PRESENT(BIC_SYS_LPI);
++ }
+
+ if (!quiet)
+ decode_misc_feature_control();
+--
+2.20.1
+