From: Alex Hung <alex.hung@amd.com>
To: Mario Limonciello <mario.limonciello@amd.com>,
amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 5/5] drm/amd/display: Add a new dcdebugmask to allow turning off brightness curve
Date: Fri, 28 Feb 2025 15:04:48 -0700 [thread overview]
Message-ID: <fc6e46e3-e302-47a9-948f-90a30aae7878@amd.com> (raw)
In-Reply-To: <20250228185145.186319-6-mario.limonciello@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
On 2/28/25 11:51, Mario Limonciello wrote:
> Upgrading the kernel may cause some systems that were previously not using
> a firmware specified brightness curve to use one.
>
> In the event of problems with this curve (for example an interpolation
> error) add a new dcdebugmask value that can be used to turn it off. Also
> add an info message to show that custom brightness curves are currently in
> use.
>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++
> drivers/gpu/drm/amd/include/amd_shared.h | 4 ++++
> 2 files changed, 9 insertions(+)
>
> 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 b252c67f2bc4..63b66e2c9ab9 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -4767,6 +4767,9 @@ static u32 convert_brightness_from_user(const struct amdgpu_dm_backlight_caps *c
> for (int i = 0; i < caps->data_points; i++) {
> u8 signal, lum;
>
> + if (amdgpu_dc_debug_mask & DC_DISABLE_CUSTOM_BRIGHTNESS_CURVE)
> + break;
> +
> signal = caps->luminance_data[i].input_signal;
> lum = caps->luminance_data[i].luminance;
>
> @@ -4951,6 +4954,8 @@ amdgpu_dm_register_backlight_device(struct amdgpu_dm_connector *aconnector)
> } else
> props.brightness = AMDGPU_MAX_BL_LEVEL;
>
> + if (caps.data_points && !(amdgpu_dc_debug_mask & DC_DISABLE_CUSTOM_BRIGHTNESS_CURVE))
> + drm_info(drm, "Using custom brightness curve\n");
> props.max_brightness = AMDGPU_MAX_BL_LEVEL;
> props.type = BACKLIGHT_RAW;
>
> diff --git a/drivers/gpu/drm/amd/include/amd_shared.h b/drivers/gpu/drm/amd/include/amd_shared.h
> index c0538763ec1a..485b713cfad0 100644
> --- a/drivers/gpu/drm/amd/include/amd_shared.h
> +++ b/drivers/gpu/drm/amd/include/amd_shared.h
> @@ -354,6 +354,10 @@ enum DC_DEBUG_MASK {
> * @DC_DISABLE_SUBVP: If set, disable DCN Sub-Viewport feature in amdgpu driver.
> */
> DC_DISABLE_SUBVP = 0x20000,
> + /**
> + * @DC_DISABLE_CUSTOM_BRIGHTNESS_CURVE: If set, disable support for custom brightness curves
> + */
> + DC_DISABLE_CUSTOM_BRIGHTNESS_CURVE = 0x40000,
> };
>
> enum amd_dpm_forced_level;
prev parent reply other threads:[~2025-02-28 22:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-28 18:51 [PATCH v2 0/5] Add custom brightness curve support Mario Limonciello
2025-02-28 18:51 ` [PATCH v2 1/5] drm/amd: Copy entire structure in amdgpu_acpi_get_backlight_caps() Mario Limonciello
2025-03-03 15:03 ` Alex Hung
2025-02-28 18:51 ` [PATCH v2 2/5] drm/amd: Pass luminance data to amdgpu_dm_backlight_caps Mario Limonciello
2025-02-28 22:04 ` Alex Hung
2025-02-28 18:51 ` [PATCH v2 3/5] drm/amd/display: Avoid operating on copies of backlight caps Mario Limonciello
2025-02-28 22:04 ` Alex Hung
2025-02-28 18:51 ` [PATCH v2 4/5] drm/amd/display: Add support for custom brightness curve Mario Limonciello
2025-02-28 22:04 ` Alex Hung
2025-02-28 18:51 ` [PATCH v2 5/5] drm/amd/display: Add a new dcdebugmask to allow turning off " Mario Limonciello
2025-02-28 22:04 ` Alex Hung [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fc6e46e3-e302-47a9-948f-90a30aae7878@amd.com \
--to=alex.hung@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=mario.limonciello@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox