From: Gergo Koteles <soyer@irl.hu>
To: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Dmitry Baryshkov <lumag@kernel.org>,
regressions@lists.linux.dev, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org,
Hans de Goede <hdegoede@redhat.com>,
Alex Deucher <alexander.deucher@amd.com>,
Mario Limonciello <mario.limonciello@amd.com>,
Alex Hung <alex.hung@amd.com>,
Harry Wentland <harry.wentland@amd.com>
Subject: Re: amdgpu_dm_connector_mode_valid regression
Date: Wed, 02 Apr 2025 17:00:29 +0200 [thread overview]
Message-ID: <dfe09171d1968fd3a03784b04de23f9127adff8d.camel@irl.hu> (raw)
In-Reply-To: <CALT56yPvDW1dLNdZK0kkn53kTa0HcVXgYXp9Gim4MH4YjgEncw@mail.gmail.com>
Hi Dmitry,
On Wed, 2025-04-02 at 17:40 +0300, Dmitry Baryshkov wrote:
> On Wed, 2 Apr 2025 at 17:35, Gergo Koteles <soyer@irl.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.
>
>
This patch is probably not good yet, because I think it would bring up
the problem mentioned in 1101185 ("drm/amd/display: fix the ability to
use lower resolution modes on eDP") again.
Maybe someone will come up with a better one.
Regards,
Gergo
next prev parent reply other threads:[~2025-04-02 15:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-02 10:40 Gergo Koteles
2025-04-02 12:00 ` Gergo Koteles
2025-04-02 13:36 ` Dmitry Baryshkov
2025-04-02 14:35 ` Gergo Koteles
2025-04-02 14:40 ` Dmitry Baryshkov
2025-04-02 15:00 ` Gergo Koteles [this message]
2025-04-11 10:01 ` Marek Marczykowski-Górecki
2025-04-24 8:48 ` Marek Marczykowski-Górecki
2025-04-24 9:06 ` Gergo Koteles
2025-04-24 13:12 ` Alex Deucher
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=dfe09171d1968fd3a03784b04de23f9127adff8d.camel@irl.hu \
--to=soyer@irl.hu \
--cc=alex.hung@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dbaryshkov@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=mario.limonciello@amd.com \
--cc=regressions@lists.linux.dev \
/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®