From: "Tomasz Pakuła" <tomasz.pakula.oficjalny@gmail.com>
To: 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: [PATCH v2 06/19] drm/amd/display: Add PCON VRR ID check override
Date: Sun, 25 Jan 2026 19:39:01 +0100 [thread overview]
Message-ID: <20260125183914.459228-7-tomasz.pakula.oficjalny@gmail.com> (raw)
In-Reply-To: <20260125183914.459228-1-tomasz.pakula.oficjalny@gmail.com>
[Why]
It's currently very hard to test if a random PCON supports VRR and
report it's ID.
[How]
Adds override as part of dc debug mask. Allows faster testing and
reporting of VRR-compatible DP->HDMI adapters.
Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++++-
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 8 +++++++-
drivers/gpu/drm/amd/display/dc/dc.h | 1 +
drivers/gpu/drm/amd/display/dc/dm_helpers.h | 2 +-
drivers/gpu/drm/amd/include/amd_shared.h | 6 ++++++
5 files changed, 20 insertions(+), 3 deletions(-)
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 33b76c1850b1..7673143ba651 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2062,6 +2062,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
if (amdgpu_dc_debug_mask & DC_SKIP_DETECTION_LT)
adev->dm.dc->debug.skip_detection_link_training = true;
+ if (amdgpu_dc_debug_mask & DC_OVERRIDE_PCON_VRR_ID_CHECK)
+ adev->dm.dc->debug.override_pcon_vrr_id_check = true;
+
adev->dm.dc->debug.visual_confirm = amdgpu_dc_visual_confirm;
/* TODO: Remove after DP2 receiver gets proper support of Cable ID feature */
@@ -13296,7 +13299,8 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
if (amdgpu_dm_connector->dc_link) {
dpcd_caps = amdgpu_dm_connector->dc_link->dpcd_caps;
is_pcon = dpcd_caps.dongle_type == DISPLAY_DONGLE_DP_HDMI_CONVERTER;
- pcon_allowed = dm_helpers_is_vrr_pcon_allowed(amdgpu_dm_connector->dc_link);
+ pcon_allowed = dm_helpers_is_vrr_pcon_allowed(
+ amdgpu_dm_connector->dc_link, connector->dev);
}
/* Some eDP panels only have the refresh rate range info in DisplayID */
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index 45a91df619d9..cb8a2855ac10 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -1381,7 +1381,7 @@ void dm_helpers_dp_mst_update_branch_bandwidth(
// TODO
}
-bool dm_helpers_is_vrr_pcon_allowed(const struct dc_link *link)
+bool dm_helpers_is_vrr_pcon_allowed(const struct dc_link *link, const struct drm_device *dev)
{
if (link->dpcd_caps.dongle_type != DISPLAY_DONGLE_DP_HDMI_CONVERTER)
return false;
@@ -1399,6 +1399,12 @@ bool dm_helpers_is_vrr_pcon_allowed(const struct dc_link *link)
return true;
}
+ if (link->dc->debug.override_pcon_vrr_id_check) {
+ drm_info(dev, "Overriding VRR PCON check for ID: 0x%06x\n",
+ link->dpcd_caps.branch_dev_id);
+ return true;
+ }
+
return false;
}
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
index ff15e5990ec0..144b5357e6fb 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -1057,6 +1057,7 @@ struct dc_debug_options {
bool scl_reset_length10;
bool hdmi20_disable;
bool skip_detection_link_training;
+ bool override_pcon_vrr_id_check;
uint32_t edid_read_retry_times;
unsigned int force_odm_combine; //bit vector based on otg inst
unsigned int seamless_boot_odm_combine;
diff --git a/drivers/gpu/drm/amd/display/dc/dm_helpers.h b/drivers/gpu/drm/amd/display/dc/dm_helpers.h
index e51f1e489129..5e77deb09200 100644
--- a/drivers/gpu/drm/amd/display/dc/dm_helpers.h
+++ b/drivers/gpu/drm/amd/display/dc/dm_helpers.h
@@ -223,7 +223,7 @@ int dm_helpers_dmub_set_config_sync(struct dc_context *ctx,
enum dc_edid_status dm_helpers_get_sbios_edid(struct dc_link *link, struct dc_edid *edid);
-bool dm_helpers_is_vrr_pcon_allowed(const struct dc_link *link);
+bool dm_helpers_is_vrr_pcon_allowed(const struct dc_link *link, const struct drm_device *dev);
bool dm_helpers_is_fullscreen(struct dc_context *ctx, struct dc_stream_state *stream);
bool dm_helpers_is_hdr_on(struct dc_context *ctx, struct dc_stream_state *stream);
diff --git a/drivers/gpu/drm/amd/include/amd_shared.h b/drivers/gpu/drm/amd/include/amd_shared.h
index ac2d3701e2bd..894e1e738ce0 100644
--- a/drivers/gpu/drm/amd/include/amd_shared.h
+++ b/drivers/gpu/drm/amd/include/amd_shared.h
@@ -412,6 +412,12 @@ enum DC_DEBUG_MASK {
* @DC_SKIP_DETECTION_LT: (0x200000) If set, skip detection link training
*/
DC_SKIP_DETECTION_LT = 0x200000,
+
+ /**
+ * @DC_OVERRIDE_PCON_VRR_ID_CHECK: (0x400000) If set, always return true if checking for
+ * PCON VRR compatibility and print it's ID in kernel log.
+ */
+ DC_OVERRIDE_PCON_VRR_ID_CHECK = 0x400000,
};
enum amd_dpm_forced_level;
--
2.52.0
next prev parent reply other threads:[~2026-01-25 18:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-25 18:38 [PATCH v2 00/19] drm/amd: VRR fixes, HDMI Gaming Features Tomasz Pakuła
2026-01-25 18:38 ` [PATCH v2 01/19] drm/amd/display: Return if DisplayID not found in parse_amd_vsdb() Tomasz Pakuła
2026-01-25 18:38 ` [PATCH v2 02/19] drm/amd/display: Refactor amdgpu_dm_update_freesync_caps() Tomasz Pakuła
2026-01-25 18:38 ` [PATCH v2 03/19] drm/amd/display: Check for VRR range in CEA AMD vsdb Tomasz Pakuła
2026-01-25 18:38 ` [PATCH v2 04/19] drm/amd/display: Use bigger VRR range if found in " Tomasz Pakuła
2026-01-25 18:39 ` [PATCH v2 05/19] drm/amd/display: Refactor PCON VRR compatibility check Tomasz Pakuła
2026-01-25 18:39 ` Tomasz Pakuła [this message]
2026-01-25 18:39 ` [PATCH v2 07/19] drm/amd/display: Add CH7218 PCON ID Tomasz Pakuła
2026-01-25 18:39 ` [PATCH v2 08/19] drm/edid: Parse more info from HDMI Forum vsdb Tomasz Pakuła
2026-01-25 18:39 ` [PATCH v2 09/19] drm/amd/display: Rename PCON adaptive sync types Tomasz Pakuła
2026-01-25 18:39 ` [PATCH v2 10/19] drm/amd/display: Enable HDMI VRR over PCON Tomasz Pakuła
2026-01-25 18:39 ` [PATCH v2 11/19] drm/amd/display: Support HDMI VRRmax=0 Tomasz Pakuła
2026-01-25 18:39 ` [PATCH v2 12/19] drm/amd/display: Build HDMI vsif in correct slot Tomasz Pakuła
2026-01-25 18:39 ` [PATCH v2 13/19] drm/amd/display: Save HDMI gaming info to edid caps Tomasz Pakuła
2026-01-25 18:39 ` [PATCH v2 14/19] drm/amd/display: Restore ALLM support in HDMI vsif Tomasz Pakuła
2026-01-25 18:39 ` [PATCH v2 15/19] drm/amd/display: Trigger ALLM if it's available Tomasz Pakuła
2026-01-25 18:39 ` [PATCH v2 16/19] drm/amd/display: Add parameter to control ALLM behavior Tomasz Pakuła
2026-01-26 14:07 ` kernel test robot
2026-01-26 14:38 ` kernel test robot
2026-01-25 18:39 ` [PATCH v2 17/19] drm/amd/display: Reintroduce VTEM info frame Tomasz Pakuła
2026-01-25 18:39 ` [PATCH v2 18/19] drm/amd/display: Enable HDMI VRR Tomasz Pakuła
2026-01-25 18:39 ` [PATCH v2 19/19] drm/amd/display: Add HDMI VRR desktop mode 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=20260125183914.459228-7-tomasz.pakula.oficjalny@gmail.com \
--to=tomasz.pakula.oficjalny@gmail.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=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
all inboxes | Powered by JetHome®