AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Limonciello <mario.limonciello@amd.com>
To: "Mohamed, Zaeem" <Zaeem.Mohamed@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Cc: "Wentland, Harry" <Harry.Wentland@amd.com>,
	"Li, Sun peng (Leo)" <Sunpeng.Li@amd.com>,
	"Siqueira, Rodrigo" <Rodrigo.Siqueira@amd.com>,
	"Mahfooz, Hamza" <Hamza.Mahfooz@amd.com>,
	"Pillai, Aurabindo" <Aurabindo.Pillai@amd.com>,
	"Li, Roman" <Roman.Li@amd.com>, "Lin, Wayne" <Wayne.Lin@amd.com>,
	"Chung, ChiaHsuan (Tom)" <ChiaHsuan.Chung@amd.com>,
	"Zuo, Jerry" <Jerry.Zuo@amd.com>,
	"Chiu, Solomon" <Solomon.Chiu@amd.com>,
	"Wheeler, Daniel" <Daniel.Wheeler@amd.com>,
	"mark.herbert42@gmail.com" <mark.herbert42@gmail.com>
Subject: Re: [PATCH 07/17] drm/amd/display: Fix brightness level not retained over reboot
Date: Fri, 1 Nov 2024 19:43:39 -0500	[thread overview]
Message-ID: <e99d304f-4c39-4fcd-99e3-2aba0c9d5e56@amd.com> (raw)
In-Reply-To: <CY8PR12MB728973E40876CF83D6164DA2E2562@CY8PR12MB7289.namprd12.prod.outlook.com>

On 11/1/2024 14:48, Mohamed, Zaeem wrote:
> [AMD Official Use Only - AMD Internal Distribution Only]
> 
> Hi Mario,
> 
> Do I need to re-send the patch to amd-gfx after the tags have been added or is sending upstream enough?
> 
> Zaeem

Zaeem,

No need to resend to amd-gfx, they can be added when they're committed.

If you use "b4" [1] to apply them it will automatically pick them up. 
If they're applied manually then the person applying them can manually 
apply the tags too.

[1] https://b4.docs.kernel.org/en/latest/
> 
> -----Original Message-----
> From: Limonciello, Mario <Mario.Limonciello@amd.com>
> Sent: Friday, November 1, 2024 11:43 AM
> To: Mohamed, Zaeem <Zaeem.Mohamed@amd.com>; amd-gfx@lists.freedesktop.org
> Cc: Wentland, Harry <Harry.Wentland@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Mahfooz, Hamza <Hamza.Mahfooz@amd.com>; Pillai, Aurabindo <Aurabindo.Pillai@amd.com>; Li, Roman <Roman.Li@amd.com>; Lin, Wayne <Wayne.Lin@amd.com>; Chung, ChiaHsuan (Tom) <ChiaHsuan.Chung@amd.com>; Zuo, Jerry <Jerry.Zuo@amd.com>; Chiu, Solomon <Solomon.Chiu@amd.com>; Wheeler, Daniel <Daniel.Wheeler@amd.com>; mark.herbert42@gmail.com
> Subject: Re: [PATCH 07/17] drm/amd/display: Fix brightness level not retained over reboot
> 
> On 11/1/2024 08:49, Zaeem Mohamed wrote:
>> From: Tom Chung <chiahsuan.chung@amd.com>
>>
>> [Why]
>> During boot up and resume the DC layer will reset the panel brightness
>> to fix a flicker issue.
>>
>> It will cause the dm->actual_brightness is not the current panel
>> brightness level. (the dm->brightness is the correct panel level)
>>
>> [How]
>> Set the backlight level after do the set mode.
>>
>> Reviewed-by: Sun peng Li <sunpeng.li@amd.com>
>> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
>> Signed-off-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
> 
> Some more tags, please explicitly add these while merging.
> 
> Cc: stable@vger.kernel.org
> Fixes: d9e865826c20 ("drm/amd/display: Simplify brightness initialization")
> Reported-by: Mark Herbert <mark.herbert42@gmail.com>
> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3655
> 
>> ---
>>    drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 15 +++++++++++++++
>>    1 file changed, 15 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 bbfc47f6595f..2599a99509de 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> @@ -9411,6 +9411,7 @@ static void amdgpu_dm_commit_streams(struct drm_atomic_state *state,
>>        bool mode_set_reset_required = false;
>>        u32 i;
>>        struct dc_commit_streams_params params = {dc_state->streams,
>> dc_state->stream_count};
>> +     bool set_backlight_level = false;
>>
>>        /* Disable writeback */
>>        for_each_old_connector_in_state(state, connector, old_con_state, i)
>> { @@ -9530,6 +9531,7 @@ static void amdgpu_dm_commit_streams(struct drm_atomic_state *state,
>>                        acrtc->hw_mode = new_crtc_state->mode;
>>                        crtc->hwmode = new_crtc_state->mode;
>>                        mode_set_reset_required = true;
>> +                     set_backlight_level = true;
>>                } else if (modereset_required(new_crtc_state)) {
>>                        drm_dbg_atomic(dev,
>>                                       "Atomic commit: RESET. crtc id %d:[%p]\n", @@ -9581,6
>> +9583,19 @@ static void amdgpu_dm_commit_streams(struct drm_atomic_state *state,
>>                                acrtc->otg_inst = status->primary_otg_inst;
>>                }
>>        }
>> +
>> +     /* During boot up and resume the DC layer will reset the panel brightness
>> +      * to fix a flicker issue.
>> +      * It will cause the dm->actual_brightness is not the current panel brightness
>> +      * level. (the dm->brightness is the correct panel level)
>> +      * So we set the backlight level with dm->brightness value after set mode
>> +      */
>> +     if (set_backlight_level) {
>> +             for (i = 0; i < dm->num_of_edps; i++) {
>> +                     if (dm->backlight_dev[i])
>> +                             amdgpu_dm_backlight_set_level(dm, i, dm->brightness[i]);
>> +             }
>> +     }
>>    }
>>
>>    static void dm_set_writeback(struct amdgpu_display_manager *dm,
> 


  reply	other threads:[~2024-11-02  0:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-01 13:49 [PATCH 00/17] DC Patches October 28, 2024 Zaeem Mohamed
2024-11-01 13:49 ` [PATCH 01/17] drm/amd/display: Do Not Fallback To SW Cursor If HW Cursor Required Zaeem Mohamed
2024-11-01 13:49 ` [PATCH 02/17] drm/amd/display: avoid divided by zero Zaeem Mohamed
2024-11-01 13:49 ` [PATCH 03/17] Revert "drm/amd/display: Block UHBR Based On USB-C PD Cable ID" Zaeem Mohamed
2024-11-01 13:49 ` [PATCH 04/17] drm/amd/display: fix rxstatus_msg_sz type narrowing Zaeem Mohamed
2024-11-01 13:49 ` [PATCH 05/17] drm/amd/display: Remove inaccessible registers from DMU diagnostics Zaeem Mohamed
2024-11-01 13:49 ` [PATCH 06/17] drm/amd/display: fix asserts in SPL during bootup Zaeem Mohamed
2024-11-01 13:49 ` [PATCH 07/17] drm/amd/display: Fix brightness level not retained over reboot Zaeem Mohamed
2024-11-01 15:43   ` Mario Limonciello
2024-11-01 19:48     ` Mohamed, Zaeem
2024-11-02  0:43       ` Mario Limonciello [this message]
2024-11-01 13:49 ` [PATCH 08/17] drm/amd/display: SPL cleanup Zaeem Mohamed
2024-11-01 13:49 ` [PATCH 09/17] drm/amd/display: Remove hw w/a toggle if on DP2/HPO Zaeem Mohamed
2024-11-01 13:49 ` [PATCH 10/17] drm/amd/display: Remove otg w/a toggling on HPO interfaces Zaeem Mohamed
2024-11-01 13:49 ` [PATCH 11/17] drm/amd/display: parse umc_info or vram_info based on ASIC Zaeem Mohamed
2024-11-01 13:49 ` [PATCH 12/17] drm/amd/display: Minimize wait for pending updates Zaeem Mohamed
2024-11-01 13:49 ` [PATCH 13/17] drm/amd/display: Don't write DP_MSTM_CTRL after LT Zaeem Mohamed
2024-11-01 13:49 ` [PATCH 14/17] drm/amd/display: [FW Promotion] Release 0.0.241.0 Zaeem Mohamed
2024-11-01 13:49 ` [PATCH 15/17] drm/amd/display: Implement new backlight_level_params structure Zaeem Mohamed
2024-11-01 13:49 ` [PATCH 16/17] drm/amd/display: Prune Invalid Modes For HDMI Output Zaeem Mohamed
2024-11-01 13:49 ` [PATCH 17/17] drm/amd/display: 3.2.308 Zaeem Mohamed
2024-11-01 14:47 ` [PATCH 00/17] DC Patches October 28, 2024 Wheeler, Daniel

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=e99d304f-4c39-4fcd-99e3-2aba0c9d5e56@amd.com \
    --to=mario.limonciello@amd.com \
    --cc=Aurabindo.Pillai@amd.com \
    --cc=ChiaHsuan.Chung@amd.com \
    --cc=Daniel.Wheeler@amd.com \
    --cc=Hamza.Mahfooz@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Jerry.Zuo@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Roman.Li@amd.com \
    --cc=Solomon.Chiu@amd.com \
    --cc=Sunpeng.Li@amd.com \
    --cc=Wayne.Lin@amd.com \
    --cc=Zaeem.Mohamed@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=mark.herbert42@gmail.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