From: Chenyu Chen <chen-yu.chen@amd.com>
To: <amd-gfx@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org>
Cc: Harry Wentland <harry.wentland@amd.com>,
Leo Li <sunpeng.li@amd.com>, "Ray Wu" <Ray.Wu@amd.com>,
Limonciello Mario <Mario.Limonciello@amd.com>,
"Jani Nikula" <jani.nikula@intel.com>,
Chenyu Chen <chen-yu.chen@amd.com>,
"Mario Limonciello" <mario.limonciello@amd.com>
Subject: [PATCH 2/2] drm/amd/display: use DisplayID panel type in dm_set_panel_type
Date: Thu, 14 May 2026 14:54:21 +0800 [thread overview]
Message-ID: <20260514065606.1151834-3-chen-yu.chen@amd.com> (raw)
In-Reply-To: <20260514065606.1151834-1-chen-yu.chen@amd.com>
Wire up the newly parsed did_panel_type from drm_display_info into
amdgpu_dm's panel type detection path. When neither the AMD VSDB
nor DPCD determines the panel type, fall back to the DisplayID
Display Device Technology field to set PANEL_TYPE_LCD or
PANEL_TYPE_OLED accordingly.
Assisted-by: Copilot:Claude-Opus-4.6
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 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 e42a5eecdf46..353a4982333d 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -3944,11 +3944,13 @@ static void dm_set_panel_type(struct amdgpu_dm_connector *aconnector)
link->panel_type = PANEL_TYPE_OLED;
}
- /*
- * TODO: get panel type from DID2 that has device technology field
- * to specify if it's OLED or not. But we need to wait for DID2
- * support in DC and EDID parser to be able to use it here.
- */
+ /* If VSDB and DPCD didn't determine panel type, check DID */
+ if (link->panel_type == PANEL_TYPE_NONE) {
+ if (display_info->did_panel_type == DRM_MODE_PANEL_TYPE_LCD)
+ link->panel_type = PANEL_TYPE_LCD;
+ else if (display_info->did_panel_type == DRM_MODE_PANEL_TYPE_OLED)
+ link->panel_type = PANEL_TYPE_OLED;
+ }
if (link->panel_type == PANEL_TYPE_NONE) {
struct drm_amd_vsdb_info *vsdb = &display_info->amd_vsdb;
--
2.43.0
prev parent reply other threads:[~2026-05-14 6:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 6:54 [PATCH 0/2] drm: detect panel type from DisplayID 2.x Chenyu Chen
2026-05-14 6:54 ` [PATCH 1/2] drm/edid: parse panel type from DisplayID 2.x Display Parameters block Chenyu Chen
2026-05-15 8:23 ` Jani Nikula
2026-05-14 6:54 ` Chenyu Chen [this message]
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=20260514065606.1151834-3-chen-yu.chen@amd.com \
--to=chen-yu.chen@amd.com \
--cc=Mario.Limonciello@amd.com \
--cc=Ray.Wu@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=jani.nikula@intel.com \
--cc=sunpeng.li@amd.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.