mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v7 0/4] drm: Minimum backlight overrides and implementation for amdgpu
@ 2024-11-11 18:09 Thomas Weißschuh
  2024-11-11 18:09 ` [PATCH v7 1/4] drm: Add panel backlight quirks Thomas Weißschuh
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Thomas Weißschuh @ 2024-11-11 18:09 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Airlie,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	Harry Wentland, Leo Li, Rodrigo Siqueira, Mario Limonciello,
	Matt Hartley, Kieran Levin, Hans de Goede, Jani Nikula,
	Xinhui Pan, Jonathan Corbet, Simona Vetter, Simona Vetter
  Cc: amd-gfx, dri-devel, linux-kernel, Dustin Howett, linux-doc,
	Thomas Weißschuh

The value of "min_input_signal" returned from ATIF on a Framework AMD 13
is "12". This leads to a fairly bright minimum display backlight.

Introduce a quirk to override "min_input_signal" to "0" which leads to a
much lower minimum brightness, which is still readable even in daylight.

One solution would be a fixed firmware version, which was announced but
has no timeline.

---
Changes in v7:
- Rebase on drm-next
- Drop now unnecessary hacky allocation of struct drm_edid
- Link to v6: https://lore.kernel.org/r/20240824-amdgpu-min-backlight-quirk-v6-0-1ed776a17fb3@weissschuh.net

Changes in v6:
- Clean up cover letter and commit messages
- Add my S-o-b to patch from Dustin
- Mention testing in combination with "panel_power_savings"
- Link to v5: https://lore.kernel.org/r/20240818-amdgpu-min-backlight-quirk-v5-0-b6c0ead0c73d@weissschuh.net

Changes in v5:
- Forward-declare struct drm_edid
- Reorder patches, quirk entries are last
- Add patch from Dustin for additional quirk entries
- Link to v4: https://lore.kernel.org/r/20240812-amdgpu-min-backlight-quirk-v4-0-56a63ff897b7@weissschuh.net

Changes in v4:
- Switch back to v2 implementation
- Add MODULE_DESCRIPTION()
- Simplify quirk infrastructure to only handle min backlight quirks.
  It can be extended if necessary.
- Expand documentation.
- Link to v3: https://lore.kernel.org/r/20240731-amdgpu-min-backlight-quirk-v3-0-46d40bb21a62@weissschuh.net

Changes in v3:
- Switch to cmdline override parameter
- Link to v2: https://lore.kernel.org/r/20240623-amdgpu-min-backlight-quirk-v2-0-cecf7f49da9b@weissschuh.net

Changes in v2:
- Introduce proper drm backlight quirk infrastructure
- Quirk by EDID and DMI instead of only DMI
- Limit quirk to only single Framework 13 matte panel
- Link to v1: https://lore.kernel.org/r/20240610-amdgpu-min-backlight-quirk-v1-1-8459895a5b2a@weissschuh.net

---
Dustin L. Howett (1):
      drm: panel-backlight-quirks: Add Framework 13 glossy and 2.8k panels

Thomas Weißschuh (3):
      drm: Add panel backlight quirks
      drm/amd/display: Add support for minimum backlight quirk
      drm: panel-backlight-quirks: Add Framework 13 matte panel

 Documentation/gpu/drm-kms-helpers.rst             |  3 +
 drivers/gpu/drm/Kconfig                           |  4 +
 drivers/gpu/drm/Makefile                          |  1 +
 drivers/gpu/drm/amd/amdgpu/Kconfig                |  1 +
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  6 ++
 drivers/gpu/drm/drm_panel_backlight_quirks.c      | 94 +++++++++++++++++++++++
 include/drm/drm_utils.h                           |  4 +
 7 files changed, 113 insertions(+)
---
base-commit: 377dda2cff59825079aee3906aa4904779747b0b
change-id: 20240610-amdgpu-min-backlight-quirk-8402fd8e736a

Best regards,
-- 
Thomas Weißschuh <linux@weissschuh.net>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v7 1/4] drm: Add panel backlight quirks
  2024-11-11 18:09 [PATCH v7 0/4] drm: Minimum backlight overrides and implementation for amdgpu Thomas Weißschuh
@ 2024-11-11 18:09 ` Thomas Weißschuh
  2024-11-11 18:09 ` [PATCH v7 2/4] drm/amd/display: Add support for minimum backlight quirk Thomas Weißschuh
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Weißschuh @ 2024-11-11 18:09 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Airlie,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	Harry Wentland, Leo Li, Rodrigo Siqueira, Mario Limonciello,
	Matt Hartley, Kieran Levin, Hans de Goede, Jani Nikula,
	Xinhui Pan, Jonathan Corbet, Simona Vetter, Simona Vetter
  Cc: amd-gfx, dri-devel, linux-kernel, Dustin Howett, linux-doc,
	Thomas Weißschuh

Panels using a PWM-controlled backlight source do not have a standard
way to communicate their valid PWM ranges.
On x86 the ranges are read from ACPI through driver-specific tables.
The built-in ranges are not necessarily correct, or may grow stale if an
older device can be retrofitted with newer panels.

Add a quirk infrastructure with which the minimum valid backlight value
can be maintained as part of the kernel.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Tested-by: Dustin L. Howett <dustin@howett.net>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
---
 Documentation/gpu/drm-kms-helpers.rst        |  3 ++
 drivers/gpu/drm/Kconfig                      |  4 ++
 drivers/gpu/drm/Makefile                     |  1 +
 drivers/gpu/drm/drm_panel_backlight_quirks.c | 70 ++++++++++++++++++++++++++++
 include/drm/drm_utils.h                      |  4 ++
 5 files changed, 82 insertions(+)

diff --git a/Documentation/gpu/drm-kms-helpers.rst b/Documentation/gpu/drm-kms-helpers.rst
index 8cf2f041af4704875910ce8228ae04615d0f21bd..b4ee25af1702b0019e0de5f9ee66d2dbdac2c664 100644
--- a/Documentation/gpu/drm-kms-helpers.rst
+++ b/Documentation/gpu/drm-kms-helpers.rst
@@ -221,6 +221,9 @@ Panel Helper Reference
 .. kernel-doc:: drivers/gpu/drm/drm_panel_orientation_quirks.c
    :export:
 
+.. kernel-doc:: drivers/gpu/drm/drm_panel_backlight_quirks.c
+   :export:
+
 Panel Self Refresh Helper Reference
 ===================================
 
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 5504721007cc190e7d768d42aa9633baa0115f5e..7cf9aa476b4745419f1002a7866fe974d852a2be 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -526,6 +526,10 @@ config DRM_HYPERV
 config DRM_EXPORT_FOR_TESTS
 	bool
 
+# Separate option as not all DRM drivers use it
+config DRM_PANEL_BACKLIGHT_QUIRKS
+	tristate
+
 config DRM_LIB_RANDOM
 	bool
 	default n
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index 463afad1b5ca6275e61223adc8ca036c3d4d6b03..06b73068d2483045f819b35095c7dc83d6fcbd53 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -95,6 +95,7 @@ drm-$(CONFIG_DRM_PANIC_SCREEN_QR_CODE) += drm_panic_qr.o
 obj-$(CONFIG_DRM)	+= drm.o
 
 obj-$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS) += drm_panel_orientation_quirks.o
+obj-$(CONFIG_DRM_PANEL_BACKLIGHT_QUIRKS) += drm_panel_backlight_quirks.o
 
 #
 # Memory-management helpers
diff --git a/drivers/gpu/drm/drm_panel_backlight_quirks.c b/drivers/gpu/drm/drm_panel_backlight_quirks.c
new file mode 100644
index 0000000000000000000000000000000000000000..6b8bbed77c7f1f3570a6e68c276244cfe4386f6c
--- /dev/null
+++ b/drivers/gpu/drm/drm_panel_backlight_quirks.c
@@ -0,0 +1,70 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <linux/array_size.h>
+#include <linux/dmi.h>
+#include <linux/mod_devicetable.h>
+#include <linux/module.h>
+#include <drm/drm_edid.h>
+#include <drm/drm_utils.h>
+
+struct drm_panel_min_backlight_quirk {
+	struct {
+		enum dmi_field field;
+		const char * const value;
+	} dmi_match;
+	struct drm_edid_ident ident;
+	u8 min_brightness;
+};
+
+static const struct drm_panel_min_backlight_quirk drm_panel_min_backlight_quirks[] = {
+};
+
+static bool drm_panel_min_backlight_quirk_matches(const struct drm_panel_min_backlight_quirk *quirk,
+						  const struct drm_edid *edid)
+{
+	if (!dmi_match(quirk->dmi_match.field, quirk->dmi_match.value))
+		return false;
+
+	if (!drm_edid_match(edid, &quirk->ident))
+		return false;
+
+	return true;
+}
+
+/**
+ * drm_get_panel_min_brightness_quirk - Get minimum supported brightness level for a panel.
+ * @edid: EDID of the panel to check
+ *
+ * This function checks for platform specific (e.g. DMI based) quirks
+ * providing info on the minimum backlight brightness for systems where this
+ * cannot be probed correctly from the hard-/firm-ware.
+ *
+ * Returns:
+ * A negative error value or
+ * an override value in the range [0, 255] representing 0-100% to be scaled to
+ * the drivers target range.
+ */
+int drm_get_panel_min_brightness_quirk(const struct drm_edid *edid)
+{
+	const struct drm_panel_min_backlight_quirk *quirk;
+	size_t i;
+
+	if (!IS_ENABLED(CONFIG_DMI))
+		return -ENODATA;
+
+	if (!edid)
+		return -EINVAL;
+
+	for (i = 0; i < ARRAY_SIZE(drm_panel_min_backlight_quirks); i++) {
+		quirk = &drm_panel_min_backlight_quirks[i];
+
+		if (drm_panel_min_backlight_quirk_matches(quirk, edid))
+			return quirk->min_brightness;
+	}
+
+	return -ENODATA;
+}
+EXPORT_SYMBOL(drm_get_panel_min_brightness_quirk);
+
+MODULE_DESCRIPTION("Quirks for panel backlight overrides");
+MODULE_LICENSE("GPL");
diff --git a/include/drm/drm_utils.h b/include/drm/drm_utils.h
index 70775748d243b0fd6e13a088d05c45f31cf34a4a..15fa9b6865f448cc8338c935874015fd74cb7bb2 100644
--- a/include/drm/drm_utils.h
+++ b/include/drm/drm_utils.h
@@ -12,8 +12,12 @@
 
 #include <linux/types.h>
 
+struct drm_edid;
+
 int drm_get_panel_orientation_quirk(int width, int height);
 
+int drm_get_panel_min_brightness_quirk(const struct drm_edid *edid);
+
 signed long drm_timeout_abs_to_jiffies(int64_t timeout_nsec);
 
 #endif

-- 
2.47.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v7 2/4] drm/amd/display: Add support for minimum backlight quirk
  2024-11-11 18:09 [PATCH v7 0/4] drm: Minimum backlight overrides and implementation for amdgpu Thomas Weißschuh
  2024-11-11 18:09 ` [PATCH v7 1/4] drm: Add panel backlight quirks Thomas Weißschuh
@ 2024-11-11 18:09 ` Thomas Weißschuh
  2024-11-11 18:09 ` [PATCH v7 3/4] drm: panel-backlight-quirks: Add Framework 13 matte panel Thomas Weißschuh
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Weißschuh @ 2024-11-11 18:09 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Airlie,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	Harry Wentland, Leo Li, Rodrigo Siqueira, Mario Limonciello,
	Matt Hartley, Kieran Levin, Hans de Goede, Jani Nikula,
	Xinhui Pan, Jonathan Corbet, Simona Vetter, Simona Vetter
  Cc: amd-gfx, dri-devel, linux-kernel, Dustin Howett, linux-doc,
	Thomas Weißschuh

Not all platforms provide the full range of PWM backlight capabilities
supported by the hardware through ATIF.
Use the generic drm panel minimum backlight quirk infrastructure to
override the capabilities where necessary.

Testing the backlight quirk together with the "panel_power_savings"
sysfs file has not shown any negative impact.
One quirk seems to be that 0% at panel_power_savings=0 seems to be
slightly darker than at panel_power_savings=4.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Tested-by: Dustin L. Howett <dustin@howett.net>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/Kconfig                | 1 +
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/Kconfig b/drivers/gpu/drm/amd/amdgpu/Kconfig
index 41fa3377d9cf566294c6f86eedd8b31a22c77510..1a11cab741aca4483673f8e7794b4d3022d269e6 100644
--- a/drivers/gpu/drm/amd/amdgpu/Kconfig
+++ b/drivers/gpu/drm/amd/amdgpu/Kconfig
@@ -26,6 +26,7 @@ config DRM_AMDGPU
 	select DRM_BUDDY
 	select DRM_SUBALLOC_HELPER
 	select DRM_EXEC
+	select DRM_PANEL_BACKLIGHT_QUIRKS
 	# amdgpu depends on ACPI_VIDEO when ACPI is enabled, for select to work
 	# ACPI_VIDEO's dependencies must also be selected.
 	select INPUT if ACPI
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 f0a6816709ca7dad6415d16f9806f18065026cf7..19a58630e774029767bf2a27eb4ddf17e3c21129 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -93,6 +93,7 @@
 #include <drm/drm_fourcc.h>
 #include <drm/drm_edid.h>
 #include <drm/drm_eld.h>
+#include <drm/drm_utils.h>
 #include <drm/drm_vblank.h>
 #include <drm/drm_audio_component.h>
 #include <drm/drm_gem_atomic_helper.h>
@@ -3457,6 +3458,7 @@ static void update_connector_ext_caps(struct amdgpu_dm_connector *aconnector)
 	struct drm_connector *conn_base;
 	struct amdgpu_device *adev;
 	struct drm_luminance_range_info *luminance_range;
+	int min_input_signal_override;
 
 	if (aconnector->bl_idx == -1 ||
 	    aconnector->dc_link->connector_signal != SIGNAL_TYPE_EDP)
@@ -3491,6 +3493,10 @@ static void update_connector_ext_caps(struct amdgpu_dm_connector *aconnector)
 		caps->aux_min_input_signal = 0;
 		caps->aux_max_input_signal = 512;
 	}
+
+	min_input_signal_override = drm_get_panel_min_brightness_quirk(aconnector->drm_edid);
+	if (min_input_signal_override >= 0)
+		caps->min_input_signal = min_input_signal_override;
 }
 
 void amdgpu_dm_update_connector_after_detect(

-- 
2.47.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v7 3/4] drm: panel-backlight-quirks: Add Framework 13 matte panel
  2024-11-11 18:09 [PATCH v7 0/4] drm: Minimum backlight overrides and implementation for amdgpu Thomas Weißschuh
  2024-11-11 18:09 ` [PATCH v7 1/4] drm: Add panel backlight quirks Thomas Weißschuh
  2024-11-11 18:09 ` [PATCH v7 2/4] drm/amd/display: Add support for minimum backlight quirk Thomas Weißschuh
@ 2024-11-11 18:09 ` Thomas Weißschuh
  2024-11-11 18:09 ` [PATCH v7 4/4] drm: panel-backlight-quirks: Add Framework 13 glossy and 2.8k panels Thomas Weißschuh
  2024-11-21 15:53 ` [PATCH v7 0/4] drm: Minimum backlight overrides and implementation for amdgpu Mario Limonciello
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Weißschuh @ 2024-11-11 18:09 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Airlie,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	Harry Wentland, Leo Li, Rodrigo Siqueira, Mario Limonciello,
	Matt Hartley, Kieran Levin, Hans de Goede, Jani Nikula,
	Xinhui Pan, Jonathan Corbet, Simona Vetter, Simona Vetter
  Cc: amd-gfx, dri-devel, linux-kernel, Dustin Howett, linux-doc,
	Thomas Weißschuh

The value of "min_input_signal" returned from ATIF on a Framework AMD 13
is "12". This leads to a fairly bright minimum display backlight.

Add a quirk to override that the minimum backlight PWM to "0" which
leads to a much lower minimum brightness, which is still visible.

Tested on a Framework AMD 13 BIOS 3.05 with the matte panel.

Link: https://community.frame.work/t/25711/9
Link: https://community.frame.work/t/47036
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Tested-by: Dustin L. Howett <dustin@howett.net>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
---
 drivers/gpu/drm/drm_panel_backlight_quirks.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/drm_panel_backlight_quirks.c b/drivers/gpu/drm/drm_panel_backlight_quirks.c
index 6b8bbed77c7f1f3570a6e68c276244cfe4386f6c..f2aefff618ddbb6c2170db5c9f535f3b6a465d1d 100644
--- a/drivers/gpu/drm/drm_panel_backlight_quirks.c
+++ b/drivers/gpu/drm/drm_panel_backlight_quirks.c
@@ -17,6 +17,14 @@ struct drm_panel_min_backlight_quirk {
 };
 
 static const struct drm_panel_min_backlight_quirk drm_panel_min_backlight_quirks[] = {
+	/* 13 inch matte panel */
+	{
+		.dmi_match.field = DMI_BOARD_VENDOR,
+		.dmi_match.value = "Framework",
+		.ident.panel_id = drm_edid_encode_panel_id('B', 'O', 'E', 0x0bca),
+		.ident.name = "NE135FBM-N41",
+		.min_brightness = 0,
+	},
 };
 
 static bool drm_panel_min_backlight_quirk_matches(const struct drm_panel_min_backlight_quirk *quirk,

-- 
2.47.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v7 4/4] drm: panel-backlight-quirks: Add Framework 13 glossy and 2.8k panels
  2024-11-11 18:09 [PATCH v7 0/4] drm: Minimum backlight overrides and implementation for amdgpu Thomas Weißschuh
                   ` (2 preceding siblings ...)
  2024-11-11 18:09 ` [PATCH v7 3/4] drm: panel-backlight-quirks: Add Framework 13 matte panel Thomas Weißschuh
@ 2024-11-11 18:09 ` Thomas Weißschuh
  2024-11-21 15:53 ` [PATCH v7 0/4] drm: Minimum backlight overrides and implementation for amdgpu Mario Limonciello
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Weißschuh @ 2024-11-11 18:09 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Airlie,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	Harry Wentland, Leo Li, Rodrigo Siqueira, Mario Limonciello,
	Matt Hartley, Kieran Levin, Hans de Goede, Jani Nikula,
	Xinhui Pan, Jonathan Corbet, Simona Vetter, Simona Vetter
  Cc: amd-gfx, dri-devel, linux-kernel, Dustin Howett, linux-doc,
	Thomas Weißschuh

From: "Dustin L. Howett" <dustin@howett.net>

I have tested these panels on the Framework Laptop 13 AMD with firmware
revision 3.05 (latest at time of submission).

Signed-off-by: Dustin L. Howett <dustin@howett.net>
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
---
 drivers/gpu/drm/drm_panel_backlight_quirks.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/drm_panel_backlight_quirks.c b/drivers/gpu/drm/drm_panel_backlight_quirks.c
index f2aefff618ddbb6c2170db5c9f535f3b6a465d1d..c477d98ade2b41314d4218281ced7d3c4d087769 100644
--- a/drivers/gpu/drm/drm_panel_backlight_quirks.c
+++ b/drivers/gpu/drm/drm_panel_backlight_quirks.c
@@ -25,6 +25,22 @@ static const struct drm_panel_min_backlight_quirk drm_panel_min_backlight_quirks
 		.ident.name = "NE135FBM-N41",
 		.min_brightness = 0,
 	},
+	/* 13 inch glossy panel */
+	{
+		.dmi_match.field = DMI_BOARD_VENDOR,
+		.dmi_match.value = "Framework",
+		.ident.panel_id = drm_edid_encode_panel_id('B', 'O', 'E', 0x095f),
+		.ident.name = "NE135FBM-N41",
+		.min_brightness = 0,
+	},
+	/* 13 inch 2.8k panel */
+	{
+		.dmi_match.field = DMI_BOARD_VENDOR,
+		.dmi_match.value = "Framework",
+		.ident.panel_id = drm_edid_encode_panel_id('B', 'O', 'E', 0x0cb4),
+		.ident.name = "NE135A1M-NY1",
+		.min_brightness = 0,
+	},
 };
 
 static bool drm_panel_min_backlight_quirk_matches(const struct drm_panel_min_backlight_quirk *quirk,

-- 
2.47.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v7 0/4] drm: Minimum backlight overrides and implementation for amdgpu
  2024-11-11 18:09 [PATCH v7 0/4] drm: Minimum backlight overrides and implementation for amdgpu Thomas Weißschuh
                   ` (3 preceding siblings ...)
  2024-11-11 18:09 ` [PATCH v7 4/4] drm: panel-backlight-quirks: Add Framework 13 glossy and 2.8k panels Thomas Weißschuh
@ 2024-11-21 15:53 ` Mario Limonciello
  4 siblings, 0 replies; 6+ messages in thread
From: Mario Limonciello @ 2024-11-21 15:53 UTC (permalink / raw)
  To: Thomas Weißschuh, Alex Deucher, Christian König,
	David Airlie, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Harry Wentland, Leo Li, Rodrigo Siqueira,
	Matt Hartley, Kieran Levin, Hans de Goede, Jani Nikula,
	Xinhui Pan, Jonathan Corbet, Simona Vetter, Simona Vetter
  Cc: amd-gfx, dri-devel, linux-kernel, Dustin Howett, linux-doc

On 11/11/2024 12:09, Thomas Weißschuh wrote:
> The value of "min_input_signal" returned from ATIF on a Framework AMD 13
> is "12". This leads to a fairly bright minimum display backlight.
> 
> Introduce a quirk to override "min_input_signal" to "0" which leads to a
> much lower minimum brightness, which is still readable even in daylight.
> 
> One solution would be a fixed firmware version, which was announced but
> has no timeline.

Hi Thomas,

Thanks for this resubmission and the rebase.  Apologies for the delay, 
but this is now picked up to drm-misc-next.

https://cgit.freedesktop.org/drm/drm-misc/commit/?id=22e5c7ae12145af13785e3ff138395d5b1a22116
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=c2753b2471c65955de18cbc58530641447e5bfe9
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=916ecc0db336768d80e14ef28a8c64a775274f95
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=d80b5c5b9be6b2e1cdeaaeaa8259523b63cae292

Thanks!

> 
> ---
> Changes in v7:
> - Rebase on drm-next
> - Drop now unnecessary hacky allocation of struct drm_edid
> - Link to v6: https://lore.kernel.org/r/20240824-amdgpu-min-backlight-quirk-v6-0-1ed776a17fb3@weissschuh.net
> 
> Changes in v6:
> - Clean up cover letter and commit messages
> - Add my S-o-b to patch from Dustin
> - Mention testing in combination with "panel_power_savings"
> - Link to v5: https://lore.kernel.org/r/20240818-amdgpu-min-backlight-quirk-v5-0-b6c0ead0c73d@weissschuh.net
> 
> Changes in v5:
> - Forward-declare struct drm_edid
> - Reorder patches, quirk entries are last
> - Add patch from Dustin for additional quirk entries
> - Link to v4: https://lore.kernel.org/r/20240812-amdgpu-min-backlight-quirk-v4-0-56a63ff897b7@weissschuh.net
> 
> Changes in v4:
> - Switch back to v2 implementation
> - Add MODULE_DESCRIPTION()
> - Simplify quirk infrastructure to only handle min backlight quirks.
>    It can be extended if necessary.
> - Expand documentation.
> - Link to v3: https://lore.kernel.org/r/20240731-amdgpu-min-backlight-quirk-v3-0-46d40bb21a62@weissschuh.net
> 
> Changes in v3:
> - Switch to cmdline override parameter
> - Link to v2: https://lore.kernel.org/r/20240623-amdgpu-min-backlight-quirk-v2-0-cecf7f49da9b@weissschuh.net
> 
> Changes in v2:
> - Introduce proper drm backlight quirk infrastructure
> - Quirk by EDID and DMI instead of only DMI
> - Limit quirk to only single Framework 13 matte panel
> - Link to v1: https://lore.kernel.org/r/20240610-amdgpu-min-backlight-quirk-v1-1-8459895a5b2a@weissschuh.net
> 
> ---
> Dustin L. Howett (1):
>        drm: panel-backlight-quirks: Add Framework 13 glossy and 2.8k panels
> 
> Thomas Weißschuh (3):
>        drm: Add panel backlight quirks
>        drm/amd/display: Add support for minimum backlight quirk
>        drm: panel-backlight-quirks: Add Framework 13 matte panel
> 
>   Documentation/gpu/drm-kms-helpers.rst             |  3 +
>   drivers/gpu/drm/Kconfig                           |  4 +
>   drivers/gpu/drm/Makefile                          |  1 +
>   drivers/gpu/drm/amd/amdgpu/Kconfig                |  1 +
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  6 ++
>   drivers/gpu/drm/drm_panel_backlight_quirks.c      | 94 +++++++++++++++++++++++
>   include/drm/drm_utils.h                           |  4 +
>   7 files changed, 113 insertions(+)
> ---
> base-commit: 377dda2cff59825079aee3906aa4904779747b0b
> change-id: 20240610-amdgpu-min-backlight-quirk-8402fd8e736a
> 
> Best regards,


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-11-21 15:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-11 18:09 [PATCH v7 0/4] drm: Minimum backlight overrides and implementation for amdgpu Thomas Weißschuh
2024-11-11 18:09 ` [PATCH v7 1/4] drm: Add panel backlight quirks Thomas Weißschuh
2024-11-11 18:09 ` [PATCH v7 2/4] drm/amd/display: Add support for minimum backlight quirk Thomas Weißschuh
2024-11-11 18:09 ` [PATCH v7 3/4] drm: panel-backlight-quirks: Add Framework 13 matte panel Thomas Weißschuh
2024-11-11 18:09 ` [PATCH v7 4/4] drm: panel-backlight-quirks: Add Framework 13 glossy and 2.8k panels Thomas Weißschuh
2024-11-21 15:53 ` [PATCH v7 0/4] drm: Minimum backlight overrides and implementation for amdgpu Mario Limonciello

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®