mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Lane <richardlanedev@gmail.com>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: amd-gfx@lists.freedesktop.org,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Leo Li" <sunpeng.li@amd.com>,
	"Rodrigo Siqueira" <siqueira@igalia.com>,
	"Mario Limonciello" <mario.limonciello@amd.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] drm/amd/display: report synced Apple 5K tiles to PowerPlay for MCLK switch
Date: Wed, 28 Oct 2026 23:38:55 +0000	[thread overview]
Message-ID: <86cccaa4-62ac-4834-bc74-1755436b5be2@gmail.com> (raw)
In-Reply-To: <CADnq5_Nn7+baU=Rdaa8QzOCo64H=ch9HeDaEwtmbQwW0kP00nQ@mail.gmail.com>

On 27/10/2026 18:26, Alex Deucher wrote:
> On Tue, Oct 27, 2026 at 5:41 AM Richard Lane <richardlanedev@gmail.com> wrote:
>>
>> When driving both 2560x2880 tiles of an Apple 5K iMac panel, Display
>> Core's program_timing_sync() already aligns both CRTCs in hardware
>> during dc_commit_streams() because the two streams share identical
>> timings.
>>
>> However, on DCE < 12 (iMac15,1 through Polaris-based iMac19,1), Display
>> Core leaves pp_display_cfg.all_displays_in_sync unset. Because PowerPlay
>> is not informed that the two streams have synchronized vertical blanking
>> intervals, SMU7 prevents MCLK switching at idle or causes modeset
>> underflows.
>>
>> Report all_displays_in_sync = true to PowerPlay after committing both
>> tiled streams so SMU7 knows the tiles blank simultaneously and can
>> safely downclock MCLK at idle.
>>
>> Signed-off-by: Richard Lane <richardlanedev@gmail.com>
>> ---
>>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 13 +++++++++++++
>>  1 file changed, 13 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 548f975c7324..384a81371f80 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> @@ -4788,6 +4788,19 @@ static void amdgpu_dm_commit_streams(struct drm_atomic_commit *state,
>>         mutex_lock(&dm->dc_lock);
>>         dc_exit_ips_for_hw_access(dm->dc);
>>         WARN_ON(!dc_commit_streams(dm->dc, &params));
>> +       /*
>> +        * DCE < 12 leaves all_displays_in_sync unset; report synchronized
>> +        * Apple 5K tiles to PowerPlay after commit so SMU7 can downclock MCLK
>> +        * at idle without modeset underflows.
>> +        */
>> +       if (params.stream_count == 2 &&
>> +           params.streams[0]->link->tiled_peer == params.streams[1]->link) {
> 
> This should be made generic for any combination of displays with
> identical timings.
> 
> Alex
> 

I have changed it to the following to make it generic:

	if (params.stream_count > 1 &&
	    dm->dc->current_state->stream_status[0].timing_sync_info.group_size ==
	    params.stream_count) {

Richard

>> +               struct dm_pp_display_configuration *pp_cfg =
>> +                       &dm->dc->current_state->pp_display_cfg;
>> +
>> +               pp_cfg->all_displays_in_sync = true;
>> +               dm_pp_apply_display_requirements(dm->dc->ctx, pp_cfg);
>> +       }
>>
>>         bool frl_stream_found = false;
>>
>> --
>> 2.55.0


      reply	other threads:[~2026-10-28 23:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26 22:49 Richard Lane
2026-10-27 18:26 ` Alex Deucher
2026-10-28 23:38   ` Richard Lane [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=86cccaa4-62ac-4834-bc74-1755436b5be2@gmail.com \
    --to=richardlanedev@gmail.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=simona@ffwll.ch \
    --cc=siqueira@igalia.com \
    --cc=sunpeng.li@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

all inboxes | Powered by JetHome®