]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Mar 2024 14:01:41 +0000 (15:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Mar 2024 14:01:41 +0000 (15:01 +0100)
added patches:
drm-amd-display-use-freesync-when-drm_edid_feature_continuous_freq-found.patch
workqueue-shorten-events_freezable_power_efficient-name.patch

queue-6.6/drm-amd-display-use-freesync-when-drm_edid_feature_continuous_freq-found.patch [new file with mode: 0644]
queue-6.6/series
queue-6.6/workqueue-shorten-events_freezable_power_efficient-name.patch [new file with mode: 0644]

diff --git a/queue-6.6/drm-amd-display-use-freesync-when-drm_edid_feature_continuous_freq-found.patch b/queue-6.6/drm-amd-display-use-freesync-when-drm_edid_feature_continuous_freq-found.patch
new file mode 100644 (file)
index 0000000..38c6f0d
--- /dev/null
@@ -0,0 +1,70 @@
+From 2f14c0c8cae8e9e3b603a3f91909baba66540027 Mon Sep 17 00:00:00 2001
+From: Mario Limonciello <mario.limonciello@amd.com>
+Date: Tue, 5 Mar 2024 14:34:24 -0600
+Subject: drm/amd/display: Use freesync when `DRM_EDID_FEATURE_CONTINUOUS_FREQ` found
+
+From: Mario Limonciello <mario.limonciello@amd.com>
+
+commit 2f14c0c8cae8e9e3b603a3f91909baba66540027 upstream.
+
+The monitor shipped with the Framework 16 supports VRR [1], but it's not
+being advertised.
+
+This is because the detailed timing block doesn't contain
+`EDID_DETAIL_MONITOR_RANGE` which amdgpu looks for to find min and max
+frequencies.  This check however is superfluous for this case because
+update_display_info() calls drm_get_monitor_range() to get these ranges
+already.
+
+So if the `DRM_EDID_FEATURE_CONTINUOUS_FREQ` EDID feature is found then
+turn on freesync without extra checks.
+
+v2: squash in fix from Harry
+
+Closes: https://www.reddit.com/r/framework/comments/1b4y2i5/no_variable_refresh_rate_on_the_framework_16_on/
+Closes: https://www.reddit.com/r/framework/comments/1b6vzcy/framework_16_variable_refresh_rate/
+Closes: https://community.frame.work/t/resolved-no-vrr-freesync-with-amd-version/42338
+Link: https://gist.github.com/superm1/e8fbacfa4d0f53150231d3a3e0a13faf
+Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
+Reviewed-by: Harry Wentland <harry.wentland@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   22 ++++++++++++++--------
+ 1 file changed, 14 insertions(+), 8 deletions(-)
+
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+@@ -10746,18 +10746,24 @@ void amdgpu_dm_update_freesync_caps(stru
+       if (!adev->dm.freesync_module)
+               goto update;
+-      if (sink->sink_signal == SIGNAL_TYPE_DISPLAY_PORT
+-              || sink->sink_signal == SIGNAL_TYPE_EDP) {
++      if (edid && (sink->sink_signal == SIGNAL_TYPE_DISPLAY_PORT ||
++                   sink->sink_signal == SIGNAL_TYPE_EDP)) {
+               bool edid_check_required = false;
+-              if (edid) {
+-                      edid_check_required = is_dp_capable_without_timing_msa(
+-                                              adev->dm.dc,
+-                                              amdgpu_dm_connector);
++              if (is_dp_capable_without_timing_msa(adev->dm.dc,
++                                                   amdgpu_dm_connector)) {
++                      if (edid->features & DRM_EDID_FEATURE_CONTINUOUS_FREQ) {
++                              freesync_capable = true;
++                              amdgpu_dm_connector->min_vfreq = connector->display_info.monitor_range.min_vfreq;
++                              amdgpu_dm_connector->max_vfreq = connector->display_info.monitor_range.max_vfreq;
++                      } else {
++                              edid_check_required = edid->version > 1 ||
++                                                    (edid->version == 1 &&
++                                                     edid->revision > 1);
++                      }
+               }
+-              if (edid_check_required == true && (edid->version > 1 ||
+-                 (edid->version == 1 && edid->revision > 1))) {
++              if (edid_check_required) {
+                       for (i = 0; i < 4; i++) {
+                               timing  = &edid->detailed_timings[i];
index a29dff2300d24a33b68fbc3f5a32c245affd7c85..dfe2bc6265e3fc04b80312a1e51ec52af07ee9d6 100644 (file)
@@ -191,3 +191,5 @@ drm-bridge-add-edid_read-hook-and-drm_bridge_edid_re.patch
 drm-bridge-lt8912b-use-drm_bridge_edid_read.patch
 drm-bridge-lt8912b-clear-the-edid-property-on-failur.patch
 drm-bridge-lt8912b-do-not-return-negative-values-fro.patch
+workqueue-shorten-events_freezable_power_efficient-name.patch
+drm-amd-display-use-freesync-when-drm_edid_feature_continuous_freq-found.patch
diff --git a/queue-6.6/workqueue-shorten-events_freezable_power_efficient-name.patch b/queue-6.6/workqueue-shorten-events_freezable_power_efficient-name.patch
new file mode 100644 (file)
index 0000000..a3f6c9e
--- /dev/null
@@ -0,0 +1,31 @@
+From 8318d6a6362f5903edb4c904a8dd447e59be4ad1 Mon Sep 17 00:00:00 2001
+From: Audra Mitchell <audra@redhat.com>
+Date: Thu, 25 Jan 2024 14:05:32 -0500
+Subject: workqueue: Shorten events_freezable_power_efficient name
+
+From: Audra Mitchell <audra@redhat.com>
+
+commit 8318d6a6362f5903edb4c904a8dd447e59be4ad1 upstream.
+
+Since we have set the WQ_NAME_LEN to 32, decrease the name of
+events_freezable_power_efficient so that it does not trip the name length
+warning when the workqueue is created.
+
+Signed-off-by: Audra Mitchell <audra@redhat.com>
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/workqueue.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kernel/workqueue.c
++++ b/kernel/workqueue.c
+@@ -7109,7 +7109,7 @@ void __init workqueue_init_early(void)
+                                             WQ_FREEZABLE, 0);
+       system_power_efficient_wq = alloc_workqueue("events_power_efficient",
+                                             WQ_POWER_EFFICIENT, 0);
+-      system_freezable_power_efficient_wq = alloc_workqueue("events_freezable_power_efficient",
++      system_freezable_power_efficient_wq = alloc_workqueue("events_freezable_pwr_efficient",
+                                             WQ_FREEZABLE | WQ_POWER_EFFICIENT,
+                                             0);
+       BUG_ON(!system_wq || !system_highpri_wq || !system_long_wq ||