aboutsummaryrefslogtreecommitdiff
path: root/SOURCES/steamdeck-oled-hw-quirks.patch
diff options
context:
space:
mode:
Diffstat (limited to 'SOURCES/steamdeck-oled-hw-quirks.patch')
-rw-r--r--SOURCES/steamdeck-oled-hw-quirks.patch110
1 files changed, 86 insertions, 24 deletions
diff --git a/SOURCES/steamdeck-oled-hw-quirks.patch b/SOURCES/steamdeck-oled-hw-quirks.patch
index 644c270..28cb762 100644
--- a/SOURCES/steamdeck-oled-hw-quirks.patch
+++ b/SOURCES/steamdeck-oled-hw-quirks.patch
@@ -125,10 +125,10 @@ diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h b/drivers/gpu/drm/amd/amdg
index b8633df418d43..77a1bedaee98c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
-@@ -416,8 +416,6 @@
- struct drm_property *regamma_tf_property;
+@@ -346,8 +346,6 @@ struct amdgpu_mode_info {
+ const enum drm_plane_type *plane_type;
};
-
+
-#define AMDGPU_MAX_BL_LEVEL 0xFF
-
struct amdgpu_backlight_privdata {
@@ -277,6 +277,89 @@ index e1a77a0d66336..8e61c86819fe2 100644
GitLab
+From f1f63fbd6a31efad6165f4b35b20ba65f25f877b Mon Sep 17 00:00:00 2001
+From: Christian Marcheselli <christianm@valvesoftware.com>
+Date: Thu, 23 Feb 2023 16:41:42 -0800
+Subject: [PATCH] Galileo-only workaround for backlight settings
+
+(cherry picked from commit 657d5054e6ed013000111db0cc2612f525d5e42d)
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+index e959aa28b019..ccda049be022 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+@@ -147,7 +147,7 @@ MODULE_FIRMWARE(FIRMWARE_NAVI12_DMCU);
+ #define PSP_FOOTER_BYTES 0x100
+
+ /* Maximum backlight level. */
+-#define AMDGPU_MAX_BL_LEVEL 0xFFFF
++#define AMDGPU_MAX_BL_LEVEL 0xFFF
+
+ /**
+ * DOC: overview
+@@ -4103,9 +4103,12 @@ static u32 convert_brightness_from_user(const struct amdgpu_dm_backlight_caps *c
+ {
+ unsigned min, max;
+
+- if (!get_brightness_range(caps, &min, &max))
+- return brightness;
++ //if (!get_brightness_range(caps, &min, &max))
++ // return brightness;
++ min = 0;
++ max = 500000;
+
++ DRM_INFO("[%s, %d] brightness range %d - %d", __func__, __LINE__, min, max);
+ // Rescale 0..AMDGPU_MAX_BL_LEVEL to min..max
+ return min + DIV_ROUND_CLOSEST((max - min) * brightness,
+ AMDGPU_MAX_BL_LEVEL);
+--
+GitLab
+
+
+From 234d6d21b9eda7fba368e6423626db4bd04e4afd Mon Sep 17 00:00:00 2001
+From: "Pierre-Loup A. Griffais" <pgriffais@valvesoftware.com>
+Date: Tue, 7 Nov 2023 16:57:15 -0800
+Subject: [PATCH] Revert "Galileo-only workaround for backlight settings"
+
+This reverts commit f1f63fbd6a31efad6165f4b35b20ba65f25f877b.
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+index b004154ba913..6d7df6ae890a 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+@@ -147,7 +147,7 @@ MODULE_FIRMWARE(FIRMWARE_NAVI12_DMCU);
+ #define PSP_FOOTER_BYTES 0x100
+
+ /* Maximum backlight level. */
+-#define AMDGPU_MAX_BL_LEVEL 0xFFF
++#define AMDGPU_MAX_BL_LEVEL 0xFFFF
+
+ /**
+ * DOC: overview
+@@ -4123,12 +4123,9 @@ static u32 convert_brightness_from_user(const struct amdgpu_dm_backlight_caps *c
+ {
+ unsigned min, max;
+
+- //if (!get_brightness_range(caps, &min, &max))
+- // return brightness;
+- min = 0;
+- max = 500000;
++ if (!get_brightness_range(caps, &min, &max))
++ return brightness;
+
+- DRM_INFO("[%s, %d] brightness range %d - %d", __func__, __LINE__, min, max);
+ // Rescale 0..AMDGPU_MAX_BL_LEVEL to min..max
+ return min + DIV_ROUND_CLOSEST((max - min) * brightness,
+ AMDGPU_MAX_BL_LEVEL);
+--
+GitLab
+
From ab7d646eacf9f1c745d284e293211569a4428573 Mon Sep 17 00:00:00 2001
From: "Pierre-Loup A. Griffais" <pgriffais@valvesoftware.com>
Date: Wed, 8 Nov 2023 19:45:52 -0800
@@ -352,18 +435,6 @@ index 30e7c627f21a7..472fa2c8ebcec 100644
/*
* Synopsys USB 3.x host HAPS platform has a class code of
-diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
-index b76ff08506181..95f33dadb2be2 100644
---- a/include/linux/pci_ids.h
-+++ b/include/linux/pci_ids.h
-@@ -568,7 +568,6 @@
- #define PCI_DEVICE_ID_AMD_1AH_M00H_DF_F3 0x12c3
- #define PCI_DEVICE_ID_AMD_1AH_M20H_DF_F3 0x16fb
- #define PCI_DEVICE_ID_AMD_MI200_DF_F3 0x14d3
--#define PCI_DEVICE_ID_AMD_VANGOGH_USB 0x163a
- #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703
- #define PCI_DEVICE_ID_AMD_LANCE 0x2000
- #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001
--
GitLab
@@ -435,15 +506,6 @@ index b87797bc5874..28e6fa8d7860 100644
adev->family < AMDGPU_FAMILY_AI) {
spin_lock_irqsave(&adev_to_drm(adev)->event_lock, flags);
mod_freesync_handle_v_update(
-@@ -8098,7 +8098,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
- int planes_count = 0, vpos, hpos;
- unsigned long flags;
- u32 target_vblank, last_flip_vblank;
-- bool vrr_active = amdgpu_dm_crtc_vrr_active(acrtc_state);
-+ bool vrr_active = true;//amdgpu_dm_crtc_vrr_active(acrtc_state);
- bool cursor_update = false;
- bool pflip_present = false;
- bool dirty_rects_changed = false;
--
GitLab