[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALT56yPvDW1dLNdZK0kkn53kTa0HcVXgYXp9Gim4MH4YjgEncw@mail.gmail.com>
Date: Wed, 2 Apr 2025 17:40:39 +0300
From: Dmitry Baryshkov <dbaryshkov@...il.com>
To: Gergo Koteles <soyer@....hu>
Cc: Dmitry Baryshkov <lumag@...nel.org>, regressions@...ts.linux.dev,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
amd-gfx@...ts.freedesktop.org, Hans de Goede <hdegoede@...hat.com>,
Alex Deucher <alexander.deucher@....com>, Mario Limonciello <mario.limonciello@....com>,
Alex Hung <alex.hung@....com>, Harry Wentland <harry.wentland@....com>
Subject: Re: amdgpu_dm_connector_mode_valid regression
On Wed, 2 Apr 2025 at 17:35, Gergo Koteles <soyer@....hu> wrote:
>
> Hi Dmitry,
>
> On Wed, 2025-04-02 at 16:36 +0300, Dmitry Baryshkov wrote:
> > > >
> > > > It works if I call
> > > > drm_mode_set_crtcinfo((struct drm_display_mode *)mode, 0) before
> > > > create_validate_stream_for_sink()
> > > > in amdgpu_dm_connector_mode_valid()
> > > >
> > > > or
> > > >
> > > > if I comment out the decide_crtc_timing_for_drm_display_mode() in
> > > > create_stream_for_sink()
> > > >
> > > > but a better fix than these can be imagined :)
> >
> > Would it help if you force recalculate_timings to be true if
> > (drm_mode->crtc_clock == 0)
> >
>
> Yes, it works with that one.
>
> But the code would start to become quite untraceable.
> duplicate mode in amdgpu_dm_connector_mode_valid()
> call drm_mode_set_crtcinfo() in amdgpu_dm_connector_mode_valid()
> duplicate mode in create_stream_for_sink()
> overwrite ctrc in decide_crtc_timing_for_drm_display_mode()
> if crtc_clock == 0 call drm_mode_set_crtcinfo() again in
> create_stream_for_sink()
Well... Unfortunately I don't know AMD driver details to comment on
this. The fix that you've posted below at least resolves a regression
without requiring us to revert r/o drm_mode argument patches.
>
> saved_mode is never used after this, so I can't add the condition here
> if (recalculate_timing)
> drm_mode_set_crtcinfo(&saved_mode, 0);
Agree
>
> This commit is related, I think:
> 1101185 ("drm/amd/display: fix the ability to use lower resolution
> modes on eDP")
>
> Regards,
> Gergo
>
> ---
> 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 bae83a129b5f..83c8c81d4015 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -6984,6 +6984,9 @@ create_stream_for_sink(struct drm_connector
> *connector,
> if (recalculate_timing)
> drm_mode_set_crtcinfo(&saved_mode, 0);
>
> + if (mode.crtc_clock == 0)
> + drm_mode_set_crtcinfo(&mode, 0);
> +
I'd say, please post this and let AMD maintainers act upon it.
> /*
> * If scaling is enabled and refresh rate didn't change
> * we copy the vic and polarities of the old timings
> --
--
With best wishes
Dmitry
Powered by blists - more mailing lists