AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Tomasz Pakuła" <tomasz.pakula.oficjalny@gmail.com>,
	alexander.deucher@amd.com, harry.wentland@amd.com,
	sunpeng.li@amd.com
Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch,
	siqueira@igalia.com, dri-devel@lists.freedesktop.org,
	amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	tomasz.pakula.oficjalny@gmail.com, bernhard.berger@gmail.com,
	michel.daenzer@mailbox.org, daniel@fooishbar.org
Subject: Re: [PATCH v4 07/27] drm/amd/display: Use bigger VRR range if found in AMD vsdb
Date: Thu, 26 Feb 2026 14:36:44 +0200	[thread overview]
Message-ID: <7da80c4be3e20c126017646f783b80136bb0700e@intel.com> (raw)
In-Reply-To: <20260216164516.36803-8-tomasz.pakula.oficjalny@gmail.com>

On Mon, 16 Feb 2026, Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com> wrote:
> [Why]
> Some monitors only expose their full VRR range in AMD vsdb for some
> reason.
>
> [How]
> Compare exposed ranges and use the bigger one.
> Only adjust lower limit if it doesn't support LFC
>
> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4177
> Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
> ---
>  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 31 +++++++++++++++++++
>  1 file changed, 31 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 b3bf5e0c19a5..f36059bb0324 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -13269,6 +13269,34 @@ static bool copy_range_to_amdgpu_connector(struct drm_connector *conn)
>  	return is_freesync_capable(range);
>  }
>  
> +static void extend_range_from_vsdb(struct drm_display_info *display,
> +				   const struct amdgpu_hdmi_vsdb_info *vsdb)
> +{
> +	u16 vrr_min = display->monitor_range.min_vfreq;
> +	u16 vrr_max = display->monitor_range.max_vfreq;
> +
> +	/* Always extend upper limit */
> +	if (vsdb->max_refresh_rate_hz > vrr_max)
> +		vrr_max = vsdb->max_refresh_rate_hz;
> +
> +	/*
> +	 * Only extend lower limit if current one disables LFC.
> +
> +	 * During widespread testing, we found that some manufacturers probably
> +	 * had issues with their monitors' lower VRR boundaries and adjusted
> +	 * them up (Gigabyte X34GS with official range 48 - 180, AMD vsdb 48 -
> +	 * 180 yet Monitor Ranges 55 - 180). After setting the lower boundary
> +	 * from AMD vsdb, such monitors start having blanking issues.
> +	 *
> +	 * Work around that by not touching VRR min if it still supports LFC.
> +	 */
> +	if (vsdb->min_refresh_rate_hz < vrr_min && (vrr_min * 2 >= vrr_max))
> +		vrr_min = vsdb->min_refresh_rate_hz;
> +
> +	display->monitor_range.min_vfreq = vrr_min;
> +	display->monitor_range.max_vfreq = vrr_max;

Random driver code should *not* modify struct drm_display_info,
especially the fields that drm_edid.c parses. Drivers should cease to
parse EDID and DisplayID altogether.

I'm on the verge of NAKing, to the extent that I have control over this,
any further improvements on driver EDID/DisplayID parsing, with the
expectation that everything's moved to shared EDID parser in drm_edid.c
first, and improved there.

BR,
Jani.


> +}
> +
>  /**
>   * amdgpu_dm_update_freesync_caps - Update Freesync capabilities
>   *
> @@ -13339,6 +13367,9 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
>  		if (is_monitor_range_invalid(connector))
>  			monitor_range_from_vsdb(&connector->display_info, &vsdb_info);
>  
> +		/* Try extending range if found in AMD vsdb */
> +		extend_range_from_vsdb(&connector->display_info, &vsdb_info);
> +
>  		if (dpcd_caps.allow_invalid_MSA_timing_param)
>  			freesync_capable = copy_range_to_amdgpu_connector(connector);

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-02-26 12:36 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-16 16:44 [PATCH v4 00/27] drm/amd: VRR fixes, HDMI Gaming Features Tomasz Pakuła
2026-02-16 16:44 ` [PATCH v4 01/27] drm/amd/display: Return if DisplayID not found in parse_amd_vsdb() Tomasz Pakuła
2026-02-16 16:44 ` [PATCH v4 02/27] drm/amd/display: Refactor amdgpu_dm_update_freesync_caps() Tomasz Pakuła
2026-02-16 16:44 ` [PATCH v4 03/27] drm/amd/display: Remove redundant edid checks Tomasz Pakuła
2026-02-16 16:44 ` [PATCH v4 04/27] drm/amd/display: Move DisplayID vrr parsing Tomasz Pakuła
2026-02-16 16:44 ` [PATCH v4 05/27] drm/amd/display: Always try to parse AMD vsdb Tomasz Pakuła
2026-02-16 16:44 ` [PATCH v4 06/27] drm/amd/display: Check for VRR range in CEA " Tomasz Pakuła
2026-02-16 16:44 ` [PATCH v4 07/27] drm/amd/display: Use bigger VRR range if found in " Tomasz Pakuła
2026-02-26 12:36   ` Jani Nikula [this message]
2026-02-26 13:42     ` Tomasz Pakuła
2026-03-17 10:03     ` Tomasz Pakuła
2026-03-20 14:48       ` Leo Li
2026-02-16 16:44 ` [PATCH v4 08/27] drm/amd/display: Separate DP/eDP and PCON paths completely Tomasz Pakuła
2026-02-16 16:44 ` [PATCH v4 09/27] drm/amd/display: Refactor PCON VRR compatibility check Tomasz Pakuła
2026-02-16 16:44 ` [PATCH v4 10/27] drm/amd/display: Add PCON VRR ID check override Tomasz Pakuła
2026-02-16 16:45 ` [PATCH v4 11/27] drm/amd/display: Add CH7218 PCON ID Tomasz Pakuła
2026-02-16 16:45 ` [PATCH v4 12/27] drm/edid: Parse more info from HDMI Forum vsdb Tomasz Pakuła
2026-02-16 16:45 ` [PATCH v4 13/27] drm/amd/display: Rename PCON adaptive sync types Tomasz Pakuła
2026-02-16 16:45 ` [PATCH v4 14/27] drm/amd/display: Enable HDMI VRR over PCON Tomasz Pakuła
2026-02-16 16:45 ` [PATCH v4 15/27] drm/amd/display: Support HDMI VRRmax=0 Tomasz Pakuła
2026-02-16 16:45 ` [PATCH v4 16/27] drm/amd/display: Build HDMI vsif in correct slot Tomasz Pakuła
2026-02-16 16:45 ` [PATCH v4 17/27] drm/amd/display: Save HDMI gaming info to edid caps Tomasz Pakuła
2026-02-16 16:45 ` [PATCH v4 18/27] drm/amd/display: Restore ALLM support in HDMI vsif Tomasz Pakuła
2026-02-16 16:45 ` [PATCH v4 19/27] drm/amd/display: Trigger ALLM if it's available Tomasz Pakuła
2026-02-16 16:45 ` [PATCH v4 20/27] drm/amd/display: Reintroduce VTEM info frame Tomasz Pakuła
2026-02-16 16:45 ` [PATCH v4 21/27] drm/amd/display: Enable HDMI VRR Tomasz Pakuła
2026-02-16 16:45 ` [PATCH v4 22/27] drm/amd/display: freesync_on_desktop support for " Tomasz Pakuła
2026-02-16 16:45 ` [PATCH v4 23/27] drm: Add passive_vrr_disabled property to crtc Tomasz Pakuła
2026-02-17  8:21   ` Michel Dänzer
2026-02-17 16:41     ` Tomasz Pakuła
2026-02-16 16:45 ` [PATCH v4 24/27] drm: Add passive_vrr_capable property to connector Tomasz Pakuła
2026-02-16 16:45 ` [PATCH v4 25/27] drm: Add ALLM properties " Tomasz Pakuła
2026-02-16 16:45 ` [PATCH v4 26/27] drm/amd/display: Use passive_vrr properties in amdgpu Tomasz Pakuła
2026-02-16 16:45 ` [PATCH v4 27/27] drm/amd/display: Use ALLM " Tomasz Pakuła

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=7da80c4be3e20c126017646f783b80136bb0700e@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=bernhard.berger@gmail.com \
    --cc=daniel@fooishbar.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=michel.daenzer@mailbox.org \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=siqueira@igalia.com \
    --cc=sunpeng.li@amd.com \
    --cc=tomasz.pakula.oficjalny@gmail.com \
    --cc=tzimmermann@suse.de \
    /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