release 6.14.7
This commit is contained in:
@@ -13,7 +13,7 @@ Signed-off-by: Christian Brauner <brauner@kernel.org>
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -1600,6 +1600,16 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
|
||||
@@ -1603,6 +1603,16 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
|
||||
the unaligned access emulation.
|
||||
see arch/parisc/kernel/unaligned.c for reference
|
||||
|
||||
@@ -30,7 +30,7 @@ Signed-off-by: Christian Brauner <brauner@kernel.org>
|
||||
config HAVE_PCSPKR_PLATFORM
|
||||
bool
|
||||
|
||||
@@ -1644,16 +1654,6 @@ config SGETMASK_SYSCALL
|
||||
@@ -1647,16 +1657,6 @@ config SGETMASK_SYSCALL
|
||||
|
||||
If unsure, leave the default option here.
|
||||
|
||||
|
@@ -1,98 +0,0 @@
|
||||
From dca14df8b269f207ac834149126964039142b596 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Deucher <alexander.deucher@amd.com>
|
||||
Date: Thu, 1 May 2025 13:00:16 -0400
|
||||
Subject: Revert "drm/amd: Stop evicting resources on APUs in suspend"
|
||||
|
||||
This reverts commit 3a9626c816db901def438dc2513622e281186d39.
|
||||
|
||||
This breaks S4 because we end up setting the s3/s0ix flags
|
||||
even when we are entering s4 since prepare is used by both
|
||||
flows. The causes both the S3/s0ix and s4 flags to be set
|
||||
which breaks several checks in the driver which assume they
|
||||
are mutually exclusive.
|
||||
|
||||
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3634
|
||||
Cc: Mario Limonciello <mario.limonciello@amd.com>
|
||||
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
||||
---
|
||||
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 --
|
||||
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 18 ------------------
|
||||
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 11 ++---------
|
||||
3 files changed, 2 insertions(+), 29 deletions(-)
|
||||
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
|
||||
@@ -1594,11 +1594,9 @@ static inline void amdgpu_acpi_get_backl
|
||||
#if defined(CONFIG_ACPI) && defined(CONFIG_SUSPEND)
|
||||
bool amdgpu_acpi_is_s3_active(struct amdgpu_device *adev);
|
||||
bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev);
|
||||
-void amdgpu_choose_low_power_state(struct amdgpu_device *adev);
|
||||
#else
|
||||
static inline bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev) { return false; }
|
||||
static inline bool amdgpu_acpi_is_s3_active(struct amdgpu_device *adev) { return false; }
|
||||
-static inline void amdgpu_choose_low_power_state(struct amdgpu_device *adev) { }
|
||||
#endif
|
||||
|
||||
void amdgpu_register_gpu_instance(struct amdgpu_device *adev);
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
|
||||
@@ -1533,22 +1533,4 @@ bool amdgpu_acpi_is_s0ix_active(struct a
|
||||
#endif /* CONFIG_AMD_PMC */
|
||||
}
|
||||
|
||||
-/**
|
||||
- * amdgpu_choose_low_power_state
|
||||
- *
|
||||
- * @adev: amdgpu_device_pointer
|
||||
- *
|
||||
- * Choose the target low power state for the GPU
|
||||
- */
|
||||
-void amdgpu_choose_low_power_state(struct amdgpu_device *adev)
|
||||
-{
|
||||
- if (adev->in_runpm)
|
||||
- return;
|
||||
-
|
||||
- if (amdgpu_acpi_is_s0ix_active(adev))
|
||||
- adev->in_s0ix = true;
|
||||
- else if (amdgpu_acpi_is_s3_active(adev))
|
||||
- adev->in_s3 = true;
|
||||
-}
|
||||
-
|
||||
#endif /* CONFIG_SUSPEND */
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
|
||||
@@ -4861,15 +4861,13 @@ int amdgpu_device_prepare(struct drm_dev
|
||||
struct amdgpu_device *adev = drm_to_adev(dev);
|
||||
int i, r;
|
||||
|
||||
- amdgpu_choose_low_power_state(adev);
|
||||
-
|
||||
if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
|
||||
return 0;
|
||||
|
||||
/* Evict the majority of BOs before starting suspend sequence */
|
||||
r = amdgpu_device_evict_resources(adev);
|
||||
if (r)
|
||||
- goto unprepare;
|
||||
+ return r;
|
||||
|
||||
flush_delayed_work(&adev->gfx.gfx_off_delay_work);
|
||||
|
||||
@@ -4880,15 +4878,10 @@ int amdgpu_device_prepare(struct drm_dev
|
||||
continue;
|
||||
r = adev->ip_blocks[i].version->funcs->prepare_suspend(&adev->ip_blocks[i]);
|
||||
if (r)
|
||||
- goto unprepare;
|
||||
+ return r;
|
||||
}
|
||||
|
||||
return 0;
|
||||
-
|
||||
-unprepare:
|
||||
- adev->in_s0ix = adev->in_s3 = adev->in_s4 = false;
|
||||
-
|
||||
- return r;
|
||||
}
|
||||
|
||||
/**
|
@@ -1,87 +0,0 @@
|
||||
From e9ee1b0a41166033eda14d11823826b79ce5131b Mon Sep 17 00:00:00 2001
|
||||
From: Alex Deucher <alexander.deucher@amd.com>
|
||||
Date: Thu, 1 May 2025 13:46:46 -0400
|
||||
Subject: drm/amdgpu: fix pm notifier handling
|
||||
|
||||
Set the s3/s0ix and s4 flags in the pm notifier so that we can skip
|
||||
the resource evictions properly in pm prepare based on whether
|
||||
we are suspending or hibernating. Drop the eviction as processes
|
||||
are not frozen at this time, we we can end up getting stuck trying
|
||||
to evict VRAM while applications continue to submit work which
|
||||
causes the buffers to get pulled back into VRAM.
|
||||
|
||||
v2: Move suspend flags out of pm notifier (Mario)
|
||||
|
||||
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4178
|
||||
Fixes: 2965e6355dcd ("drm/amd: Add Suspend/Hibernate notification callback support")
|
||||
Cc: Mario Limonciello <mario.limonciello@amd.com>
|
||||
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
||||
---
|
||||
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 18 +++++-------------
|
||||
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 10 +---------
|
||||
2 files changed, 6 insertions(+), 22 deletions(-)
|
||||
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
|
||||
@@ -4819,28 +4819,20 @@ static int amdgpu_device_evict_resources
|
||||
* @data: data
|
||||
*
|
||||
* This function is called when the system is about to suspend or hibernate.
|
||||
- * It is used to evict resources from the device before the system goes to
|
||||
- * sleep while there is still access to swap.
|
||||
+ * It is used to set the appropriate flags so that eviction can be optimized
|
||||
+ * in the pm prepare callback.
|
||||
*/
|
||||
static int amdgpu_device_pm_notifier(struct notifier_block *nb, unsigned long mode,
|
||||
void *data)
|
||||
{
|
||||
struct amdgpu_device *adev = container_of(nb, struct amdgpu_device, pm_nb);
|
||||
- int r;
|
||||
|
||||
switch (mode) {
|
||||
case PM_HIBERNATION_PREPARE:
|
||||
adev->in_s4 = true;
|
||||
- fallthrough;
|
||||
- case PM_SUSPEND_PREPARE:
|
||||
- r = amdgpu_device_evict_resources(adev);
|
||||
- /*
|
||||
- * This is considered non-fatal at this time because
|
||||
- * amdgpu_device_prepare() will also fatally evict resources.
|
||||
- * See https://gitlab.freedesktop.org/drm/amd/-/issues/3781
|
||||
- */
|
||||
- if (r)
|
||||
- drm_warn(adev_to_drm(adev), "Failed to evict resources, freeze active processes if problems occur: %d\n", r);
|
||||
+ break;
|
||||
+ case PM_POST_HIBERNATION:
|
||||
+ adev->in_s4 = false;
|
||||
break;
|
||||
}
|
||||
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
|
||||
@@ -2592,13 +2592,8 @@ static int amdgpu_pmops_freeze(struct de
|
||||
static int amdgpu_pmops_thaw(struct device *dev)
|
||||
{
|
||||
struct drm_device *drm_dev = dev_get_drvdata(dev);
|
||||
- struct amdgpu_device *adev = drm_to_adev(drm_dev);
|
||||
- int r;
|
||||
|
||||
- r = amdgpu_device_resume(drm_dev, true);
|
||||
- adev->in_s4 = false;
|
||||
-
|
||||
- return r;
|
||||
+ return amdgpu_device_resume(drm_dev, true);
|
||||
}
|
||||
|
||||
static int amdgpu_pmops_poweroff(struct device *dev)
|
||||
@@ -2611,9 +2606,6 @@ static int amdgpu_pmops_poweroff(struct
|
||||
static int amdgpu_pmops_restore(struct device *dev)
|
||||
{
|
||||
struct drm_device *drm_dev = dev_get_drvdata(dev);
|
||||
- struct amdgpu_device *adev = drm_to_adev(drm_dev);
|
||||
-
|
||||
- adev->in_s4 = false;
|
||||
|
||||
return amdgpu_device_resume(drm_dev, true);
|
||||
}
|
Reference in New Issue
Block a user