From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f65.google.com (mail-ej1-f65.google.com [209.85.218.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 098E431A810 for ; Tue, 3 Feb 2026 18:56:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770144992; cv=none; b=Xf3tWFYCUa3u9fgaOupZYd1WJ7UDKsnVIEXaAkJ9FyStAQni+tHDBi7wyXoK/HZ4OFcq6qAUB8nw6V2h7mEijR3IMzfyRxeXn7CcfITlR0jqG7kdYZx3nK5resYCh0ks8/3VK0kbGZLd2pXUY5SA2xXNBSgCYR8zJQkjUYHbf8Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770144992; c=relaxed/simple; bh=9PHKewTUNRuns8AS+6gd+qm4sFgqfmaS77QNcYcUbFY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=uEx7v+m23Ai0NXqwCn+rQNqbOZHS599bGhm6tMu6P19uV5STl8VCZrEgHfSWbMvc8x3Y5LxZFFS2ucse+yIvP4kKbRStuLYZAHY/noXU9jGqkTolBHjk3M+57tAYIrmbuVFqo+rfiaMg8sosUu7Kg4yzTlWSLHumihmHDgH0c9g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fqmtFoi+; arc=none smtp.client-ip=209.85.218.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fqmtFoi+" Received: by mail-ej1-f65.google.com with SMTP id a640c23a62f3a-b8719f5a2b5so69358866b.3 for ; Tue, 03 Feb 2026 10:56:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770144989; x=1770749789; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=8DB17b0cBX6Qw97KlErLRuuI9KRBT1rxn3aOxrZP4eU=; b=fqmtFoi+bPi4XTd8o6x8PRYybREd3ucY9Z+4fwHegUvLTuuoyKb9ehVgQ0jKZJk1HL KxxuP5PCJ009qpANcpB2bOkOdNJma3kSUfrJhiRdSqxvwbkDvuj0/614QdYpt5KrqkrL QDMUZz4MQPTvBylWn5+nTbq2pSciIJZnoXaZ7OImaHlRNOp33DdT3qqm2Ehzj2rbAxeT 4ULNfnsT5va3tIbi1bNZ3gxCYcdY3wcfcx0cXrgy5zT/15ExN8bc+go9PN5Ec3XUkemp WfRAJNLzZXXOUZoI3RqdoNuESspTs2nu434XU54B8p21aW/jCe4qeZCMZaZ4hqiSumHI ov0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770144989; x=1770749789; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8DB17b0cBX6Qw97KlErLRuuI9KRBT1rxn3aOxrZP4eU=; b=SqPE2u/Bg2b7mP1C9QnZ3WYM1TvNfWaNS8KUXTc5wFGppxoczlwgo9ZR8sraPfc8+h UTW6SkWxystPmGOpi9NjWKl7cLZb7rOQjkQVkqiDsOdhJYmh59KtZWru43k6hUXqRlMU jjjncQ7NF3HCHEH6OXUX+vu+F3u208arUlmm/4kOIZzVkRwhT4UaYOKadeFrykyrJkic ZjXtrnhWjfmc76B36G5WWcWhAJnIIYSxhj2pVEewREGcNkvIcyZuEdHLwcigFX9bKadb /W3Z2KUWSbRav15TnP22OLiHWtBlnZGnWP0+8Suf6Tr2BoIIrts9NAhwrUuPp5xAM3nK qG3w== X-Forwarded-Encrypted: i=1; AJvYcCVo2GyUdJYfk2hTqCVhRFH9Zi92Kzik2YTtwAx6jkdCohzTuLAAdKQFkmzNecNwyUWVdeDa2mLsNO7AaAA=@vger.kernel.org X-Gm-Message-State: AOJu0YxYqQDXD17tqnnQJ5gEG7RYstDTEPrQ6wDLG9YSxYrB09nBljn/ D/AsInqPG2+FIuQUwVBuSwLv9bf+UWXwubfDgESSNZS9Q2u1ANd99j9G X-Gm-Gg: AZuq6aK+XVn2mOzUcRcNJ00vyXzSWG9dJasU6v4wT+ROEaep7kaZP7Rt18lcvQJTjLy fz1XbB54D8b2uw1DWQgPevO5USPL31oZfrMXEQK1gG0/eNbK9nDs/PKywFy8UjA/omEu4479UYG qcP/gNPOjSV+DygB6Mzcx4upVE/yrzUAYM2SNnEdlgHY7ixnQMIGFQrlCgQ2aBUxiUQB0S7iD5f IiRBrPfK/T/4VrHTEkbRChCpIutBzmm8/0LsWi7n8rFUKfQ8Nf4rI8jUA37z2MABvoKzmcUsIXY IzKJzT4Z/qadc77a94J0KdPVTUZEtBLfkR6I/1I2NwP+unXBfoUBe60PY0F8uptfhAK1U0xJGxW 65mk6NlJDj641yFTaxMtctBTdN5SkHvxwNokrgRLR0Av8mjl/DaEhY1KjdoJCr49mlkZ+kYTJWS fa43Ga3aqpvI2oAK+sHVrM7jBtQPRREFyxM3xeCiQNnbz9RDKaf/00Hd08x6jNZ4Bp X-Received: by 2002:a17:907:a48:b0:b87:2099:9f6b with SMTP id a640c23a62f3a-b8e9f170ccemr21178866b.3.1770144989044; Tue, 03 Feb 2026 10:56:29 -0800 (PST) Received: from laptok.lan (87-205-5-123.static.ip.netia.com.pl. [87.205.5.123]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b8e9fad97a7sm16715766b.0.2026.02.03.10.56.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Feb 2026 10:56:28 -0800 (PST) From: =?UTF-8?q?Tomasz=20Paku=C5=82a?= 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, admin@ptr1337.dev Subject: [PATCH v3 00/19] drm/amd: VRR fixes, HDMI Gaming Features Date: Tue, 3 Feb 2026 19:56:07 +0100 Message-ID: <20260203185626.55428-1-tomasz.pakula.oficjalny@gmail.com> X-Mailer: git-send-email 2.52.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch series tackles a few things: - Fixes VRR not detected if monitor uses GTF flag for ranges instead of Range Limits Only - Detects if AMD vsdb carries a wider VRR range and uses it instead - DP->HDMI PCON changes which includes a module property to override PCON ID check - Parses HDMI gaming features in generic drm - Reintroduces proper HF-VSIF and VTEM info packets - Adds support for Auto Low Latency Mode - Adds support for HDMI VRR VRR range fixes are simple and fix VRR support for many monitors. They close about 5 issues on the amdgpu issue tracker. Adaptive Sync over PCON is only available as FreeSync over HDMI. TVs which do not support FreeSync, do not have working VRR with DP -> HDMI 2.1 adapters even though adapters will take care of HDMI VRR info packets. I myself validated these changes with my Samsung S95B + Bernhard validated on LG C4 + FreeSync-less Sony Bravia 8. I used Alienware AW3423DWF that only has HDMI 2.0 to check that FreeSync still triggers properly for "older" hardware, For missing VRRmax or VRRmax == 0, the upper boundary is the currently selected video mode refresh rate. I wasn't sure how best to implement it but ended up on a great solution. We first check if maybe there is a VRR range in AMD vsdb. If not, rely on limitation of base refresh rate in VTEM vsif. More history on previous shape of HF-VSIF and VTEM in their respective patches but the info packets were previously included in the driver code. HF-VSIF was improperly handled and VTEM doesn't seem to have been plumbed as it had no use before. I recoded these and this code should be much easier to understand and maintain. ALLM support uses the info from EDID to determine if ALLM is supported by sink and if that's the case, always signals for ALLM to be enabled. In PC use, be it for gaming, desktop use, work etc. we always want the lowest latency and less processing + possibly higher available refresh rates when gaming mode is turned on. HDMI VRR support relies on sending VTEM info packet in place of FreeSync info packets. Though VTEM has it's own place in the info packet pipeline, I didn't touch it as it already replaces FreeSync info packets. If there's a need to change this, please let me know for v2. Both features were tested and work just like they were intended to. Gaming mode is automatically triggered and HDMI VRR is used in place of FreeSync (if available). This HDMI VRR preference actually fixes VRR-induced flickering on many TVs (S95B in my case) with somehow subpar FreeSync implementation. I still think it's better to not force users to search for solutions manually especially since it seems like DP and eDP don't save info about FreeSync version and completely rely on basic VRR support. This would then be mirrored. There's still an issue with some TVs behaving like a mode change is happening when VRR is triggered and I'd like to maybe tackle this too. When using HDMI through PCON, VRR is always active, like it's in VRR_STATE_ACTIVE_FIXED mode. This makes my TV much nicer to use and replication this behavior would be worthwhile IMO. Everything in this patch series has been based on already public code/knowledge or trying things out until they work/break. This patch series supersedes previous patches/series: https://lore.kernel.org/amd-gfx/20251209231107.1968472-1-tomasz.pakula.oficjalny@gmail.com/ https://lore.kernel.org/amd-gfx/20260113214104.146856-1-tomasz.pakula.oficjalny@gmail.com/ https://lore.kernel.org/amd-gfx/20260113183540.86266-1-tomasz.pakula.oficjalny@gmail.com/ Built on top of amd-staging-drm-next Changes in v2: - Updated BRR max value to 1023 after testing one by one. This should've been obvious since 1023 is the max value for a 10-bit field - Fixed some comments, to silence "not a kernel doc" warning - Considered ALLM comments from Michel Dänzer, Daniel Stone and Jani Nikula. ALLM is now triggered if either VRR is active or Content Type Hint is set to "Game". Content type hint is already supported by amdgpu and fully plumbed. - Added module parameter for controlling ALLM trigger behavior. Now it can be configured to never trigger ALLM, trigger with VRR/Game (default) or be always forced on. - Added HDMI VRR desktop mode module parameter, which is on by default. This mimics how FreeSync is handeled on Windows and this fixes a lot of issues with unwanted screen blanking and glitches around entering/exiting VRR mode. - Moved hdmi vic mode check to one central function to avoid checking for 3D and ALLM in different places which could sometimes break the logic for translating HDMI VIC modes into CTA vic modes (when such translation is needed). Changes in v3: - Fixed wonky English - Less struct traversal in helper functions - Fixed possible NULL pointer dereference while checking if ALLM support is indicated in edid_caps of local_sink - Fixed ALLM bit assignment overriding 3D bit data in HF-VSIF - Fixed assignment of the upper 2 bits of BRR in VTEM Tomasz Pakuła (19): drm/amd/display: Return if DisplayID not found in parse_amd_vsdb() drm/amd/display: Refactor amdgpu_dm_update_freesync_caps() drm/amd/display: Check for VRR range in CEA AMD vsdb drm/amd/display: Use bigger VRR range if found in AMD vsdb drm/amd/display: Refactor PCON VRR compatibility check drm/amd/display: Add PCON VRR ID check override drm/amd/display: Add CH7218 PCON ID drm/edid: Parse more info from HDMI Forum vsdb drm/amd/display: Rename PCON adaptive sync types drm/amd/display: Enable HDMI VRR over PCON drm/amd/display: Support HDMI VRRmax=0 drm/amd/display: Build HDMI vsif in correct slot drm/amd/display: Save HDMI gaming info to edid caps drm/amd/display: Restore ALLM support in HDMI vsif drm/amd/display: Trigger ALLM if it's available drm/amd/display: Add parameter to control ALLM behavior drm/amd/display: Reintroduce VTEM info frame drm/amd/display: Enable HDMI VRR drm/amd/display: Add HDMI VRR desktop mode drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 27 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 207 ++++++++--- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 49 ++- .../gpu/drm/amd/display/dc/core/dc_resource.c | 5 +- drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dc_types.h | 7 +- drivers/gpu/drm/amd/display/dc/dm_helpers.h | 2 +- .../amd/display/include/ddc_service_types.h | 1 + .../amd/display/modules/freesync/freesync.c | 4 + .../amd/display/modules/inc/mod_info_packet.h | 18 +- .../display/modules/info_packet/info_packet.c | 342 ++++++++++++------ drivers/gpu/drm/amd/include/amd_shared.h | 6 + drivers/gpu/drm/drm_edid.c | 41 ++- include/drm/drm_connector.h | 47 +++ 15 files changed, 559 insertions(+), 200 deletions(-) -- 2.52.0