From: "Chen, Chen-Yu" <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>
Subject: Re: [PATCH v3 1/3] drm/edid: extract base section header processing into helper
Date: Tue, 26 May 2026 11:09:04 +0800 [thread overview]
Message-ID: <d4b22785-2718-45d4-9292-10bf8f8bff03@amd.com> (raw)
In-Reply-To: <20260526030254.1460480-2-chen-yu.chen@amd.com>
I forgot to include Mario's Reviewed-by in the commit message:
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
On 5/26/2026 10:59 AM, Chenyu Chen wrote:
> Extract the DisplayID base section header logging and non_desktop
> detection from update_displayid_info() into a dedicated helper,
> drm_displayid_process_base_section_header(). Remove the break so the
> iterator walks through all data blocks, preparing for future patches
> that will parse additional block types within the loop.
>
> The helper is called only once for the base section via a
> base_section_header_processed flag. Since version and primary_use are
> only captured from the base section, and extension sections carry a
> primary use of zero per spec, the non_desktop logic is unaffected.
>
> No functional change.
>
> Assisted-by: Copilot:Claude-Opus-4.6
> Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
> ---
> drivers/gpu/drm/drm_edid.c | 37 +++++++++++++++++++++----------------
> 1 file changed, 21 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 8031f021d4d0..7ad3f939dbe6 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -6715,30 +6715,35 @@ static void drm_reset_display_info(struct drm_connector *connector)
> memset(&info->amd_vsdb, 0, sizeof(info->amd_vsdb));
> }
>
> +static void drm_displayid_process_base_section_header(struct drm_connector *connector,
> + const struct displayid_iter *iter)
> +{
> + struct drm_display_info *info = &connector->display_info;
> +
> + drm_dbg_kms(connector->dev,
> + "[CONNECTOR:%d:%s] DisplayID extension version 0x%02x, primary use 0x%02x\n",
> + connector->base.id, connector->name,
> + displayid_version(iter),
> + displayid_primary_use(iter));
> + if (displayid_version(iter) == DISPLAY_ID_STRUCTURE_VER_20 &&
> + (displayid_primary_use(iter) == PRIMARY_USE_HEAD_MOUNTED_VR ||
> + displayid_primary_use(iter) == PRIMARY_USE_HEAD_MOUNTED_AR))
> + info->non_desktop = true;
> +}
> +
> static void update_displayid_info(struct drm_connector *connector,
> const struct drm_edid *drm_edid)
> {
> - struct drm_display_info *info = &connector->display_info;
> const struct displayid_block *block;
> struct displayid_iter iter;
> + bool base_section_header_processed = false;
>
> displayid_iter_edid_begin(drm_edid, &iter);
> displayid_iter_for_each(block, &iter) {
> - drm_dbg_kms(connector->dev,
> - "[CONNECTOR:%d:%s] DisplayID extension version 0x%02x, primary use 0x%02x\n",
> - connector->base.id, connector->name,
> - displayid_version(&iter),
> - displayid_primary_use(&iter));
> - if (displayid_version(&iter) == DISPLAY_ID_STRUCTURE_VER_20 &&
> - (displayid_primary_use(&iter) == PRIMARY_USE_HEAD_MOUNTED_VR ||
> - displayid_primary_use(&iter) == PRIMARY_USE_HEAD_MOUNTED_AR))
> - info->non_desktop = true;
> -
> - /*
> - * We're only interested in the base section here, no need to
> - * iterate further.
> - */
> - break;
> + if (!base_section_header_processed) {
> + drm_displayid_process_base_section_header(connector, &iter);
> + base_section_header_processed = true;
> + }
> }
> displayid_iter_end(&iter);
> }
next prev parent reply other threads:[~2026-05-26 3:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 2:59 [PATCH v3 0/3] drm: detect panel type from DisplayID 2.x Chenyu Chen
2026-05-26 2:59 ` [PATCH v3 1/3] drm/edid: extract base section header processing into helper Chenyu Chen
2026-05-26 3:09 ` Chen, Chen-Yu [this message]
2026-05-27 5:16 ` Claude review: " Claude Code Review Bot
2026-05-26 2:59 ` [PATCH v3 2/3] drm/edid: parse panel type from DisplayID 2.x Display Parameters Chenyu Chen
2026-05-26 3:09 ` Chen, Chen-Yu
2026-05-27 5:16 ` Claude review: " Claude Code Review Bot
2026-05-26 2:59 ` [PATCH v3 3/3] drm/amd/display: use DisplayID panel type in dm_set_panel_type Chenyu Chen
2026-05-26 3:09 ` Chen, Chen-Yu
2026-05-27 5:16 ` Claude review: " Claude Code Review Bot
2026-05-27 5:16 ` Claude review: drm: detect panel type from DisplayID 2.x Claude Code Review Bot
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=d4b22785-2718-45d4-9292-10bf8f8bff03@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox