]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Feb 2023 14:43:32 +0000 (15:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Feb 2023 14:43:32 +0000 (15:43 +0100)
added patches:
arm64-efi-force-the-use-of-setvirtualaddressmap-on-emag-and-altra-max-machines.patch
drm-amd-display-fix-cursor-offset-on-rotation-180.patch
drm-amd-display-properly-handling-agp-aperture-in-vm-setup.patch
drm-amd-pm-bump-smu-13.0.0-driver_if-header-version.patch
drm-amd-pm-bump-smu-13.0.7-driver_if-header-version.patch
drm-amdgpu-add-unique_id-support-for-gc-11.0.1-2.patch
drm-amdgpu-fence-fix-oops-due-to-non-matching-drm_sched-init-fini.patch
drm-amdgpu-smu-skip-pptable-init-under-sriov.patch
drm-i915-fix-vbt-dsi-dvo-port-handling.patch
drm-i915-initialize-the-obj-flags-for-shmem-objects.patch
drm-i915-move-fd_install-after-last-use-of-fence.patch

12 files changed:
queue-6.1/arm64-efi-force-the-use-of-setvirtualaddressmap-on-emag-and-altra-max-machines.patch [new file with mode: 0644]
queue-6.1/drm-amd-display-fix-cursor-offset-on-rotation-180.patch [new file with mode: 0644]
queue-6.1/drm-amd-display-properly-handling-agp-aperture-in-vm-setup.patch [new file with mode: 0644]
queue-6.1/drm-amd-pm-bump-smu-13.0.0-driver_if-header-version.patch [new file with mode: 0644]
queue-6.1/drm-amd-pm-bump-smu-13.0.7-driver_if-header-version.patch [new file with mode: 0644]
queue-6.1/drm-amdgpu-add-unique_id-support-for-gc-11.0.1-2.patch [new file with mode: 0644]
queue-6.1/drm-amdgpu-fence-fix-oops-due-to-non-matching-drm_sched-init-fini.patch [new file with mode: 0644]
queue-6.1/drm-amdgpu-smu-skip-pptable-init-under-sriov.patch [new file with mode: 0644]
queue-6.1/drm-i915-fix-vbt-dsi-dvo-port-handling.patch [new file with mode: 0644]
queue-6.1/drm-i915-initialize-the-obj-flags-for-shmem-objects.patch [new file with mode: 0644]
queue-6.1/drm-i915-move-fd_install-after-last-use-of-fence.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/arm64-efi-force-the-use-of-setvirtualaddressmap-on-emag-and-altra-max-machines.patch b/queue-6.1/arm64-efi-force-the-use-of-setvirtualaddressmap-on-emag-and-altra-max-machines.patch
new file mode 100644 (file)
index 0000000..d2116c6
--- /dev/null
@@ -0,0 +1,50 @@
+From 190233164cd77115f8dea718cbac561f557092c6 Mon Sep 17 00:00:00 2001
+From: Darren Hart <darren@os.amperecomputing.com>
+Date: Wed, 8 Feb 2023 16:28:21 -0800
+Subject: arm64: efi: Force the use of SetVirtualAddressMap() on eMAG and Altra Max machines
+
+From: Darren Hart <darren@os.amperecomputing.com>
+
+commit 190233164cd77115f8dea718cbac561f557092c6 upstream.
+
+Commit 550b33cfd445 ("arm64: efi: Force the use of SetVirtualAddressMap()
+on Altra machines") identifies the Altra family via the family field in
+the type#1 SMBIOS record. eMAG and Altra Max machines are similarly
+affected but not detected with the strict strcmp test.
+
+The type1_family smbios string is not an entirely reliable means of
+identifying systems with this issue as OEMs can, and do, use their own
+strings for these fields. However, until we have a better solution,
+capture the bulk of these systems by adding strcmp matching for "eMAG"
+and "Altra Max".
+
+Fixes: 550b33cfd445 ("arm64: efi: Force the use of SetVirtualAddressMap() on Altra machines")
+Cc: <stable@vger.kernel.org> # 6.1.x
+Cc: Alexandru Elisei <alexandru.elisei@gmail.com>
+Signed-off-by: Darren Hart <darren@os.amperecomputing.com>
+Tested-by: Justin He <justin.he@arm.com>
+Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/firmware/efi/libstub/arm64-stub.c |    9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- a/drivers/firmware/efi/libstub/arm64-stub.c
++++ b/drivers/firmware/efi/libstub/arm64-stub.c
+@@ -20,10 +20,13 @@ static bool system_needs_vamap(void)
+       const u8 *type1_family = efi_get_smbios_string(1, family);
+       /*
+-       * Ampere Altra machines crash in SetTime() if SetVirtualAddressMap()
+-       * has not been called prior.
++       * Ampere eMAG, Altra, and Altra Max machines crash in SetTime() if
++       * SetVirtualAddressMap() has not been called prior.
+        */
+-      if (!type1_family || strcmp(type1_family, "Altra"))
++      if (!type1_family || (
++          strcmp(type1_family, "eMAG") &&
++          strcmp(type1_family, "Altra") &&
++          strcmp(type1_family, "Altra Max")))
+               return false;
+       efi_warn("Working around broken SetVirtualAddressMap()\n");
diff --git a/queue-6.1/drm-amd-display-fix-cursor-offset-on-rotation-180.patch b/queue-6.1/drm-amd-display-fix-cursor-offset-on-rotation-180.patch
new file mode 100644 (file)
index 0000000..dd4ebb5
--- /dev/null
@@ -0,0 +1,44 @@
+From 49d0555976f0972af68397ed996375c135b38ba7 Mon Sep 17 00:00:00 2001
+From: Melissa Wen <mwen@igalia.com>
+Date: Tue, 31 Jan 2023 15:05:46 -0100
+Subject: drm/amd/display: fix cursor offset on rotation 180
+
+From: Melissa Wen <mwen@igalia.com>
+
+commit 49d0555976f0972af68397ed996375c135b38ba7 upstream.
+
+Cursor gets clipped off in the middle of the screen with hw rotation
+180. Fix a miscalculation of cursor offset when it's placed near the
+edges in the pipe split case.
+
+Cursor bugs with hw rotation were reported on AMD issue tracker:
+https://gitlab.freedesktop.org/drm/amd/-/issues/2247
+
+The issues on rotation 270 was fixed by:
+https://lore.kernel.org/amd-gfx/20221118125935.4013669-22-Brian.Chang@amd.com/
+that partially addressed the rotation 180 too. So, this patch is the
+final bits for rotation 180.
+
+Reported-by: Xaver Hugl <xaver.hugl@gmail.com>
+Reviewed-by: Harry Wentland <harry.wentland@amd.com>
+Fixes: 9d84c7ef8a87 ("drm/amd/display: Correct cursor position on horizontal mirror")
+Signed-off-by: Melissa Wen <mwen@igalia.com>
+Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
++++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
+@@ -3612,7 +3612,7 @@ void dcn10_set_cursor_position(struct pi
+                                               (int)hubp->curs_attr.width || pos_cpy.x
+                                               <= (int)hubp->curs_attr.width +
+                                               pipe_ctx->plane_state->src_rect.x) {
+-                                              pos_cpy.x = temp_x + viewport_width;
++                                              pos_cpy.x = 2 * viewport_width - temp_x;
+                                       }
+                               }
+                       } else {
diff --git a/queue-6.1/drm-amd-display-properly-handling-agp-aperture-in-vm-setup.patch b/queue-6.1/drm-amd-display-properly-handling-agp-aperture-in-vm-setup.patch
new file mode 100644 (file)
index 0000000..636443a
--- /dev/null
@@ -0,0 +1,81 @@
+From 5c4e8c71d1202cd84d870e7e5cb8d6b52f9c3507 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Tue, 31 Jan 2023 09:56:46 -0500
+Subject: drm/amd/display: properly handling AGP aperture in vm setup
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 5c4e8c71d1202cd84d870e7e5cb8d6b52f9c3507 upstream.
+
+Take into account whether or not the AGP aperture is
+enabled or not when calculating the system aperture.
+
+Fixes white screens with DCN 3.1.4.
+
+Based on a patch from Yifan Zhang <yifan1.zhang@amd.com>
+
+Cc: Yifan Zhang <yifan1.zhang@amd.com>
+Acked-by: Harry Wentland <harry.wentland@amd.com>
+Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org # 6.1.x
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   42 ++++++++++++++--------
+ 1 file changed, 28 insertions(+), 14 deletions(-)
+
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+@@ -1193,24 +1193,38 @@ static void mmhub_read_system_context(st
+       memset(pa_config, 0, sizeof(*pa_config));
+-      logical_addr_low  = min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18;
+-      pt_base = amdgpu_gmc_pd_addr(adev->gart.bo);
+-
+-      if (adev->apu_flags & AMD_APU_IS_RAVEN2)
+-              /*
+-               * Raven2 has a HW issue that it is unable to use the vram which
+-               * is out of MC_VM_SYSTEM_APERTURE_HIGH_ADDR. So here is the
+-               * workaround that increase system aperture high address (add 1)
+-               * to get rid of the VM fault and hardware hang.
+-               */
+-              logical_addr_high = max((adev->gmc.fb_end >> 18) + 0x1, adev->gmc.agp_end >> 18);
+-      else
+-              logical_addr_high = max(adev->gmc.fb_end, adev->gmc.agp_end) >> 18;
+-
+       agp_base = 0;
+       agp_bot = adev->gmc.agp_start >> 24;
+       agp_top = adev->gmc.agp_end >> 24;
++      /* AGP aperture is disabled */
++      if (agp_bot == agp_top) {
++              logical_addr_low  = adev->gmc.vram_start >> 18;
++              if (adev->apu_flags & AMD_APU_IS_RAVEN2)
++                      /*
++                       * Raven2 has a HW issue that it is unable to use the vram which
++                       * is out of MC_VM_SYSTEM_APERTURE_HIGH_ADDR. So here is the
++                       * workaround that increase system aperture high address (add 1)
++                       * to get rid of the VM fault and hardware hang.
++                       */
++                      logical_addr_high = (adev->gmc.fb_end >> 18) + 0x1;
++              else
++                      logical_addr_high = adev->gmc.vram_end >> 18;
++      } else {
++              logical_addr_low  = min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18;
++              if (adev->apu_flags & AMD_APU_IS_RAVEN2)
++                      /*
++                       * Raven2 has a HW issue that it is unable to use the vram which
++                       * is out of MC_VM_SYSTEM_APERTURE_HIGH_ADDR. So here is the
++                       * workaround that increase system aperture high address (add 1)
++                       * to get rid of the VM fault and hardware hang.
++                       */
++                      logical_addr_high = max((adev->gmc.fb_end >> 18) + 0x1, adev->gmc.agp_end >> 18);
++              else
++                      logical_addr_high = max(adev->gmc.fb_end, adev->gmc.agp_end) >> 18;
++      }
++
++      pt_base = amdgpu_gmc_pd_addr(adev->gart.bo);
+       page_table_start.high_part = (u32)(adev->gmc.gart_start >> 44) & 0xF;
+       page_table_start.low_part = (u32)(adev->gmc.gart_start >> 12);
diff --git a/queue-6.1/drm-amd-pm-bump-smu-13.0.0-driver_if-header-version.patch b/queue-6.1/drm-amd-pm-bump-smu-13.0.0-driver_if-header-version.patch
new file mode 100644 (file)
index 0000000..c5cee46
--- /dev/null
@@ -0,0 +1,63 @@
+From 9874cc2df4e892c8744aa0472866cbf7c3cf1862 Mon Sep 17 00:00:00 2001
+From: Evan Quan <evan.quan@amd.com>
+Date: Tue, 31 Jan 2023 10:40:09 +0800
+Subject: drm/amd/pm: bump SMU 13.0.0 driver_if header version
+
+From: Evan Quan <evan.quan@amd.com>
+
+commit 9874cc2df4e892c8744aa0472866cbf7c3cf1862 upstream.
+
+This can suppress the warning caused by version mismatch.
+
+Signed-off-by: Evan Quan <evan.quan@amd.com>
+Acked-by: Alex Deucher <alexander.deucher@amd.com>
+Acked-by: Guchun Chen <guchun.chen@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org # 6.1.x
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ .../drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h   | 5 +++--
+ drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h                 | 2 +-
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h
+index d6b964cf73bd..4bc7aee4d44f 100644
+--- a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h
++++ b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h
+@@ -123,7 +123,8 @@
+                                                                       (1 << FEATURE_DS_FCLK_BIT) | \
+                                                                       (1 << FEATURE_DS_LCLK_BIT) | \
+                                                                       (1 << FEATURE_DS_DCFCLK_BIT) | \
+-                                                                      (1 << FEATURE_DS_UCLK_BIT))
++                                                                      (1 << FEATURE_DS_UCLK_BIT) | \
++                                                                      (1ULL << FEATURE_DS_VCN_BIT))
+ //For use with feature control messages
+ typedef enum {
+@@ -522,9 +523,9 @@ typedef enum  {
+   TEMP_HOTSPOT_M,
+   TEMP_MEM,
+   TEMP_VR_GFX,
+-  TEMP_VR_SOC,
+   TEMP_VR_MEM0,
+   TEMP_VR_MEM1,
++  TEMP_VR_SOC,
+   TEMP_VR_U,
+   TEMP_LIQUID0,
+   TEMP_LIQUID1,
+diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h b/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h
+index e8c6febb8b64..d9c4821bcfc8 100644
+--- a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h
++++ b/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h
+@@ -28,7 +28,7 @@
+ #define SMU13_DRIVER_IF_VERSION_INV 0xFFFFFFFF
+ #define SMU13_DRIVER_IF_VERSION_YELLOW_CARP 0x04
+ #define SMU13_DRIVER_IF_VERSION_ALDE 0x08
+-#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_0_0 0x34
++#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_0_0 0x37
+ #define SMU13_DRIVER_IF_VERSION_SMU_V13_0_4 0x07
+ #define SMU13_DRIVER_IF_VERSION_SMU_V13_0_5 0x04
+ #define SMU13_DRIVER_IF_VERSION_SMU_V13_0_0_10 0x32
+-- 
+2.39.1
+
diff --git a/queue-6.1/drm-amd-pm-bump-smu-13.0.7-driver_if-header-version.patch b/queue-6.1/drm-amd-pm-bump-smu-13.0.7-driver_if-header-version.patch
new file mode 100644 (file)
index 0000000..9802877
--- /dev/null
@@ -0,0 +1,78 @@
+From dc38b996db968f51f0fe45845a519c5cd7f6bd04 Mon Sep 17 00:00:00 2001
+From: Evan Quan <evan.quan@amd.com>
+Date: Tue, 7 Feb 2023 10:42:31 +0800
+Subject: drm/amd/pm: bump SMU 13.0.7 driver_if header version
+
+From: Evan Quan <evan.quan@amd.com>
+
+commit dc38b996db968f51f0fe45845a519c5cd7f6bd04 upstream.
+
+This can suppress the warning caused by version mismatch.
+
+Signed-off-by: Evan Quan <evan.quan@amd.com>
+Acked-by: Alex Deucher <alexander.deucher@amd.com>
+Acked-by: Guchun Chen <guchun.chen@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org # 6.1.x
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ .../inc/pmfw_if/smu13_driver_if_v13_0_7.h     | 29 ++++++++++---------
+ drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h  |  2 +-
+ 2 files changed, 16 insertions(+), 15 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h
+index d6b13933a98f..48a3a3952ceb 100644
+--- a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h
++++ b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h
+@@ -113,20 +113,21 @@
+ #define NUM_FEATURES                          64
+ #define ALLOWED_FEATURE_CTRL_DEFAULT 0xFFFFFFFFFFFFFFFFULL
+-#define ALLOWED_FEATURE_CTRL_SCPM        (1 << FEATURE_DPM_GFXCLK_BIT) | \
+-                                         (1 << FEATURE_DPM_GFX_POWER_OPTIMIZER_BIT) | \
+-                                         (1 << FEATURE_DPM_UCLK_BIT) | \
+-                                         (1 << FEATURE_DPM_FCLK_BIT) | \
+-                                         (1 << FEATURE_DPM_SOCCLK_BIT) | \
+-                                         (1 << FEATURE_DPM_MP0CLK_BIT) | \
+-                                         (1 << FEATURE_DPM_LINK_BIT) | \
+-                                         (1 << FEATURE_DPM_DCN_BIT) | \
+-                                         (1 << FEATURE_DS_GFXCLK_BIT) | \
+-                                         (1 << FEATURE_DS_SOCCLK_BIT) | \
+-                                         (1 << FEATURE_DS_FCLK_BIT) | \
+-                                         (1 << FEATURE_DS_LCLK_BIT) | \
+-                                         (1 << FEATURE_DS_DCFCLK_BIT) | \
+-                                         (1 << FEATURE_DS_UCLK_BIT)
++#define ALLOWED_FEATURE_CTRL_SCPM     ((1 << FEATURE_DPM_GFXCLK_BIT) | \
++                                      (1 << FEATURE_DPM_GFX_POWER_OPTIMIZER_BIT) | \
++                                      (1 << FEATURE_DPM_UCLK_BIT) | \
++                                      (1 << FEATURE_DPM_FCLK_BIT) | \
++                                      (1 << FEATURE_DPM_SOCCLK_BIT) | \
++                                      (1 << FEATURE_DPM_MP0CLK_BIT) | \
++                                      (1 << FEATURE_DPM_LINK_BIT) | \
++                                      (1 << FEATURE_DPM_DCN_BIT) | \
++                                      (1 << FEATURE_DS_GFXCLK_BIT) | \
++                                      (1 << FEATURE_DS_SOCCLK_BIT) | \
++                                      (1 << FEATURE_DS_FCLK_BIT) | \
++                                      (1 << FEATURE_DS_LCLK_BIT) | \
++                                      (1 << FEATURE_DS_DCFCLK_BIT) | \
++                                      (1 << FEATURE_DS_UCLK_BIT) | \
++                                      (1ULL << FEATURE_DS_VCN_BIT))
+ //For use with feature control messages
+ typedef enum {
+diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h b/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h
+index d9c4821bcfc8..992163e66f7b 100644
+--- a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h
++++ b/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h
+@@ -32,7 +32,7 @@
+ #define SMU13_DRIVER_IF_VERSION_SMU_V13_0_4 0x07
+ #define SMU13_DRIVER_IF_VERSION_SMU_V13_0_5 0x04
+ #define SMU13_DRIVER_IF_VERSION_SMU_V13_0_0_10 0x32
+-#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_7 0x35
++#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_7 0x37
+ #define SMU13_DRIVER_IF_VERSION_SMU_V13_0_10 0x1D
+ #define SMU13_MODE1_RESET_WAIT_TIME_IN_MS 500  //500ms
+-- 
+2.39.1
+
diff --git a/queue-6.1/drm-amdgpu-add-unique_id-support-for-gc-11.0.1-2.patch b/queue-6.1/drm-amdgpu-add-unique_id-support-for-gc-11.0.1-2.patch
new file mode 100644 (file)
index 0000000..229b534
--- /dev/null
@@ -0,0 +1,40 @@
+From c108a18462949fe709ebd6b0be68398d643bc285 Mon Sep 17 00:00:00 2001
+From: Kent Russell <kent.russell@amd.com>
+Date: Mon, 6 Feb 2023 12:21:42 -0500
+Subject: drm/amdgpu: Add unique_id support for GC 11.0.1/2
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Kent Russell <kent.russell@amd.com>
+
+commit c108a18462949fe709ebd6b0be68398d643bc285 upstream.
+
+These can support unique_id, so create the sysfs file for them
+
+Signed-off-by: Kent Russell <kent.russell@amd.com>
+Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org # 6.1.x
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/pm/amdgpu_pm.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+index a9170360d7e8..2f3e239e623d 100644
+--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
++++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+@@ -1991,6 +1991,8 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
+               case IP_VERSION(9, 4, 2):
+               case IP_VERSION(10, 3, 0):
+               case IP_VERSION(11, 0, 0):
++              case IP_VERSION(11, 0, 1):
++              case IP_VERSION(11, 0, 2):
+                       *states = ATTR_STATE_SUPPORTED;
+                       break;
+               default:
+-- 
+2.39.1
+
diff --git a/queue-6.1/drm-amdgpu-fence-fix-oops-due-to-non-matching-drm_sched-init-fini.patch b/queue-6.1/drm-amdgpu-fence-fix-oops-due-to-non-matching-drm_sched-init-fini.patch
new file mode 100644 (file)
index 0000000..7fd61db
--- /dev/null
@@ -0,0 +1,80 @@
+From 5ad7bbf3dba5c4a684338df1f285080f2588b535 Mon Sep 17 00:00:00 2001
+From: "Guilherme G. Piccoli" <gpiccoli@igalia.com>
+Date: Thu, 2 Feb 2023 10:48:56 -0300
+Subject: drm/amdgpu/fence: Fix oops due to non-matching drm_sched init/fini
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Guilherme G. Piccoli <gpiccoli@igalia.com>
+
+commit 5ad7bbf3dba5c4a684338df1f285080f2588b535 upstream.
+
+Currently amdgpu calls drm_sched_fini() from the fence driver sw fini
+routine - such function is expected to be called only after the
+respective init function - drm_sched_init() - was executed successfully.
+
+Happens that we faced a driver probe failure in the Steam Deck
+recently, and the function drm_sched_fini() was called even without
+its counter-part had been previously called, causing the following oops:
+
+amdgpu: probe of 0000:04:00.0 failed with error -110
+BUG: kernel NULL pointer dereference, address: 0000000000000090
+PGD 0 P4D 0
+Oops: 0002 [#1] PREEMPT SMP NOPTI
+CPU: 0 PID: 609 Comm: systemd-udevd Not tainted 6.2.0-rc3-gpiccoli #338
+Hardware name: Valve Jupiter/Jupiter, BIOS F7A0113 11/04/2022
+RIP: 0010:drm_sched_fini+0x84/0xa0 [gpu_sched]
+[...]
+Call Trace:
+ <TASK>
+ amdgpu_fence_driver_sw_fini+0xc8/0xd0 [amdgpu]
+ amdgpu_device_fini_sw+0x2b/0x3b0 [amdgpu]
+ amdgpu_driver_release_kms+0x16/0x30 [amdgpu]
+ devm_drm_dev_init_release+0x49/0x70
+ [...]
+
+To prevent that, check if the drm_sched was properly initialized for a
+given ring before calling its fini counter-part.
+
+Notice ideally we'd use sched.ready for that; such field is set as the latest
+thing on drm_sched_init(). But amdgpu seems to "override" the meaning of such
+field - in the above oops for example, it was a GFX ring causing the crash, and
+the sched.ready field was set to true in the ring init routine, regardless of
+the state of the DRM scheduler. Hence, we ended-up using sched.ops as per
+Christian's suggestion [0], and also removed the no_scheduler check [1].
+
+[0] https://lore.kernel.org/amd-gfx/984ee981-2906-0eaf-ccec-9f80975cb136@amd.com/
+[1] https://lore.kernel.org/amd-gfx/cd0e2994-f85f-d837-609f-7056d5fb7231@amd.com/
+
+Fixes: 067f44c8b459 ("drm/amdgpu: avoid over-handle of fence driver fini in s3 test (v2)")
+Suggested-by: Christian König <christian.koenig@amd.com>
+Cc: Guchun Chen <guchun.chen@amd.com>
+Cc: Luben Tuikov <luben.tuikov@amd.com>
+Cc: Mario Limonciello <mario.limonciello@amd.com>
+Reviewed-by: Luben Tuikov <luben.tuikov@amd.com>
+Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c |    8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+@@ -564,7 +564,13 @@ void amdgpu_fence_driver_sw_fini(struct
+               if (!ring || !ring->fence_drv.initialized)
+                       continue;
+-              if (!ring->no_scheduler)
++              /*
++               * Notice we check for sched.ops since there's some
++               * override on the meaning of sched.ready by amdgpu.
++               * The natural check would be sched.ready, which is
++               * set as drm_sched_init() finishes...
++               */
++              if (ring->sched.ops)
+                       drm_sched_fini(&ring->sched);
+               for (j = 0; j <= ring->fence_drv.num_fences_mask; ++j)
diff --git a/queue-6.1/drm-amdgpu-smu-skip-pptable-init-under-sriov.patch b/queue-6.1/drm-amdgpu-smu-skip-pptable-init-under-sriov.patch
new file mode 100644 (file)
index 0000000..579410a
--- /dev/null
@@ -0,0 +1,48 @@
+From c6ac406cd8ff610a2d5da298b1d3071acfcde7f0 Mon Sep 17 00:00:00 2001
+From: Jane Jian <Jane.Jian@amd.com>
+Date: Fri, 13 Jan 2023 18:53:45 +0800
+Subject: drm/amdgpu/smu: skip pptable init under sriov
+
+From: Jane Jian <Jane.Jian@amd.com>
+
+commit c6ac406cd8ff610a2d5da298b1d3071acfcde7f0 upstream.
+
+sriov does not need to init pptable from amdgpu driver
+we finish it from PF
+
+Signed-off-by: Jane Jian <Jane.Jian@amd.com>
+Acked-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org # 6.1.x
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
+index cf96c3f2affe..508e392547d7 100644
+--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
++++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
+@@ -407,6 +407,9 @@ static int smu_v13_0_0_setup_pptable(struct smu_context *smu)
+       struct amdgpu_device *adev = smu->adev;
+       int ret = 0;
++      if (amdgpu_sriov_vf(smu->adev))
++              return 0;
++
+       ret = smu_v13_0_0_get_pptable_from_pmfw(smu,
+                                               &smu_table->power_play_table,
+                                               &smu_table->power_play_table_size);
+@@ -1257,6 +1260,9 @@ static int smu_v13_0_0_get_thermal_temperature_range(struct smu_context *smu,
+               table_context->power_play_table;
+       PPTable_t *pptable = smu->smu_table.driver_pptable;
++      if (amdgpu_sriov_vf(smu->adev))
++              return 0;
++
+       if (!range)
+               return -EINVAL;
+-- 
+2.39.1
+
diff --git a/queue-6.1/drm-i915-fix-vbt-dsi-dvo-port-handling.patch b/queue-6.1/drm-i915-fix-vbt-dsi-dvo-port-handling.patch
new file mode 100644 (file)
index 0000000..7edc743
--- /dev/null
@@ -0,0 +1,89 @@
+From 6a7ff131f17f44c593173c5ee30e2c03ef211685 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
+Date: Tue, 7 Feb 2023 08:43:35 +0200
+Subject: drm/i915: Fix VBT DSI DVO port handling
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Ville Syrjälä <ville.syrjala@linux.intel.com>
+
+commit 6a7ff131f17f44c593173c5ee30e2c03ef211685 upstream.
+
+Turns out modern (icl+) VBTs still declare their DSI ports
+as MIPI-A and MIPI-C despite the PHYs now being A and B.
+Remap appropriately to allow the panels declared as MIPI-C
+to work.
+
+Cc: stable@vger.kernel.org
+Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8016
+Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20230207064337.18697-2-ville.syrjala@linux.intel.com
+Reviewed-by: Jani Nikula <jani.nikula@intel.com>
+(cherry picked from commit 118b5c136c04da705b274b0d39982bb8b7430fc5)
+Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/i915/display/intel_bios.c |   33 ++++++++++++++++++++----------
+ 1 file changed, 23 insertions(+), 10 deletions(-)
+
+--- a/drivers/gpu/drm/i915/display/intel_bios.c
++++ b/drivers/gpu/drm/i915/display/intel_bios.c
+@@ -2466,6 +2466,22 @@ static enum port dvo_port_to_port(struct
+                                         dvo_port);
+ }
++static enum port
++dsi_dvo_port_to_port(struct drm_i915_private *i915, u8 dvo_port)
++{
++      switch (dvo_port) {
++      case DVO_PORT_MIPIA:
++              return PORT_A;
++      case DVO_PORT_MIPIC:
++              if (DISPLAY_VER(i915) >= 11)
++                      return PORT_B;
++              else
++                      return PORT_C;
++      default:
++              return PORT_NONE;
++      }
++}
++
+ static int parse_bdb_230_dp_max_link_rate(const int vbt_max_link_rate)
+ {
+       switch (vbt_max_link_rate) {
+@@ -3406,19 +3422,16 @@ bool intel_bios_is_dsi_present(struct dr
+               dvo_port = child->dvo_port;
+-              if (dvo_port == DVO_PORT_MIPIA ||
+-                  (dvo_port == DVO_PORT_MIPIB && DISPLAY_VER(i915) >= 11) ||
+-                  (dvo_port == DVO_PORT_MIPIC && DISPLAY_VER(i915) < 11)) {
+-                      if (port)
+-                              *port = dvo_port - DVO_PORT_MIPIA;
+-                      return true;
+-              } else if (dvo_port == DVO_PORT_MIPIB ||
+-                         dvo_port == DVO_PORT_MIPIC ||
+-                         dvo_port == DVO_PORT_MIPID) {
++              if (dsi_dvo_port_to_port(i915, dvo_port) == PORT_NONE) {
+                       drm_dbg_kms(&i915->drm,
+                                   "VBT has unsupported DSI port %c\n",
+                                   port_name(dvo_port - DVO_PORT_MIPIA));
++                      continue;
+               }
++
++              if (port)
++                      *port = dsi_dvo_port_to_port(i915, dvo_port);
++              return true;
+       }
+       return false;
+@@ -3503,7 +3516,7 @@ bool intel_bios_get_dsc_params(struct in
+               if (!(child->device_type & DEVICE_TYPE_MIPI_OUTPUT))
+                       continue;
+-              if (child->dvo_port - DVO_PORT_MIPIA == encoder->port) {
++              if (dsi_dvo_port_to_port(i915, child->dvo_port) == encoder->port) {
+                       if (!devdata->dsc)
+                               return false;
diff --git a/queue-6.1/drm-i915-initialize-the-obj-flags-for-shmem-objects.patch b/queue-6.1/drm-i915-initialize-the-obj-flags-for-shmem-objects.patch
new file mode 100644 (file)
index 0000000..8e0d312
--- /dev/null
@@ -0,0 +1,42 @@
+From 44e4c5684fcc82d8f099656c4ea39d9571e2a8ac Mon Sep 17 00:00:00 2001
+From: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
+Date: Fri, 3 Feb 2023 19:22:05 +0530
+Subject: drm/i915: Initialize the obj flags for shmem objects
+
+From: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
+
+commit 44e4c5684fcc82d8f099656c4ea39d9571e2a8ac upstream.
+
+Obj flags for shmem objects is not being set correctly. Fixes in setting
+BO_ALLOC_USER flag which applies to shmem objs as well.
+
+v2: Add fixes tag (Tvrtko, Matt A)
+
+Fixes: 13d29c823738 ("drm/i915/ehl: unconditionally flush the pages on acquire")
+Cc: <stable@vger.kernel.org> # v5.15+
+Cc: Matthew Auld <matthew.auld@intel.com>
+Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
+Reviewed-by: Matthew Auld <matthew.auld@intel.com>
+Signed-off-by: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
+Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
+Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
+[tursulin: Grouped all tags together.]
+Link: https://patchwork.freedesktop.org/patch/msgid/20230203135205.4051149-1-aravind.iddamsetty@intel.com
+(cherry picked from commit bca0d1d3ceeb07be45a51c0fa4d57a0ce31b6aed)
+Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/i915/gem/i915_gem_shmem.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
++++ b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
+@@ -579,7 +579,7 @@ static int shmem_object_init(struct inte
+       mapping_set_gfp_mask(mapping, mask);
+       GEM_BUG_ON(!(mapping_gfp_mask(mapping) & __GFP_RECLAIM));
+-      i915_gem_object_init(obj, &i915_gem_shmem_ops, &lock_class, 0);
++      i915_gem_object_init(obj, &i915_gem_shmem_ops, &lock_class, flags);
+       obj->mem_flags |= I915_BO_FLAG_STRUCT_PAGE;
+       obj->write_domain = I915_GEM_DOMAIN_CPU;
+       obj->read_domains = I915_GEM_DOMAIN_CPU;
diff --git a/queue-6.1/drm-i915-move-fd_install-after-last-use-of-fence.patch b/queue-6.1/drm-i915-move-fd_install-after-last-use-of-fence.patch
new file mode 100644 (file)
index 0000000..7c0a260
--- /dev/null
@@ -0,0 +1,58 @@
+From 251e8c5b1b1fadcc387a8e618c7437d330bdac3e Mon Sep 17 00:00:00 2001
+From: Rob Clark <robdclark@chromium.org>
+Date: Fri, 3 Feb 2023 08:49:20 -0800
+Subject: drm/i915: Move fd_install after last use of fence
+
+From: Rob Clark <robdclark@chromium.org>
+
+commit 251e8c5b1b1fadcc387a8e618c7437d330bdac3e upstream.
+
+Because eb_composite_fence_create() drops the fence_array reference
+after creation of the sync_file, only the sync_file holds a ref to the
+fence.  But fd_install() makes that reference visable to userspace, so
+it must be the last thing we do with the fence.
+
+Signed-off-by: Rob Clark <robdclark@chromium.org>
+Fixes: 00dae4d3d35d ("drm/i915: Implement SINGLE_TIMELINE with a syncobj (v4)")
+Cc: <stable@vger.kernel.org> # v5.15+
+[tursulin: Added stable tag.]
+Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
+Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20230203164937.4035503-1-robdclark@gmail.com
+(cherry picked from commit 960dafa30455450d318756a9896a02727f2639e0)
+Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c |   14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
++++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
+@@ -3478,6 +3478,13 @@ err_request:
+                                  eb.composite_fence :
+                                  &eb.requests[0]->fence);
++      if (unlikely(eb.gem_context->syncobj)) {
++              drm_syncobj_replace_fence(eb.gem_context->syncobj,
++                                        eb.composite_fence ?
++                                        eb.composite_fence :
++                                        &eb.requests[0]->fence);
++      }
++
+       if (out_fence) {
+               if (err == 0) {
+                       fd_install(out_fence_fd, out_fence->file);
+@@ -3489,13 +3496,6 @@ err_request:
+               }
+       }
+-      if (unlikely(eb.gem_context->syncobj)) {
+-              drm_syncobj_replace_fence(eb.gem_context->syncobj,
+-                                        eb.composite_fence ?
+-                                        eb.composite_fence :
+-                                        &eb.requests[0]->fence);
+-      }
+-
+       if (!out_fence && eb.composite_fence)
+               dma_fence_put(eb.composite_fence);
index 175bf2a46c5a3e2f983f9c7456ceda560b6ea900..b105a89a6191f77315742a3a0ea98ac420fdd179 100644 (file)
@@ -101,3 +101,14 @@ arm64-dts-meson-gx-make-mmc-host-controller-interrupts-level-sensitive.patch
 arm64-dts-meson-g12-common-make-mmc-host-controller-interrupts-level-sensitive.patch
 arm64-dts-meson-axg-make-mmc-host-controller-interrupts-level-sensitive.patch
 fix-page-corruption-caused-by-racy-check-in-__free_pages.patch
+arm64-efi-force-the-use-of-setvirtualaddressmap-on-emag-and-altra-max-machines.patch
+drm-amd-pm-bump-smu-13.0.0-driver_if-header-version.patch
+drm-amdgpu-add-unique_id-support-for-gc-11.0.1-2.patch
+drm-amd-pm-bump-smu-13.0.7-driver_if-header-version.patch
+drm-amdgpu-fence-fix-oops-due-to-non-matching-drm_sched-init-fini.patch
+drm-amdgpu-smu-skip-pptable-init-under-sriov.patch
+drm-amd-display-properly-handling-agp-aperture-in-vm-setup.patch
+drm-amd-display-fix-cursor-offset-on-rotation-180.patch
+drm-i915-move-fd_install-after-last-use-of-fence.patch
+drm-i915-initialize-the-obj-flags-for-shmem-objects.patch
+drm-i915-fix-vbt-dsi-dvo-port-handling.patch