All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Hung <alex.hung@amd.com>
To: Melissa Wen <mwen@igalia.com>,
	Mario Limonciello <mario.limonciello@amd.com>,
	Rodrigo Siqueira <siqueira@igalia.com>,
	airlied@gmail.com, alexander.deucher@amd.com,
	andrzej.hajda@intel.com, christian.koenig@amd.com,
	harry.wentland@amd.com, maarten.lankhorst@linux.intel.com,
	mripard@kernel.org, neil.armstrong@linaro.org, rfoss@kernel.org,
	simona@ffwll.ch, sunpeng.li@amd.com, tzimmermann@suse.de
Cc: Michel Daenzer <michel.daenzer@mailbox.org>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
	kernel-dev@igalia.com
Subject: Re: [PATCH v6 00/14] drm/amd/display: more drm_edid to AMD display driver
Date: Mon, 28 Jul 2025 17:29:05 -0600	[thread overview]
Message-ID: <019ca526-5bdf-4c88-a994-a6babb9963c7@amd.com> (raw)
In-Reply-To: <20250726003816.435227-1-mwen@igalia.com>

Thanks. I will send v6 to promotion test.

On 7/25/25 18:33, Melissa Wen wrote:
> Hi,
> 
> Siqueira and I have been working on a solution to reduce the usage of
> drm_edid_raw in the AMD display driver, since the current guideline in
> the DRM subsystem is to stop handling raw edid data in driver-specific
> implementation and use opaque `drm_edid` object with common-code
> helpers.
> 
> To keep DC as an OS-agnostic component, we create a mid layer that
> isolates `drm_edid` helpers called in the DC code, while allowing other
> OSes to implement their specific implementation.
> 
> This work is an extension of [1].
> 
> - Patch 1 addresses a possible leak added by previous migration to
>    drm_edid.
> - Patch 2 allocates a temporary drm_edid from raw edid for parsing.
> - Patches 3-7 use common-code, drm_edid helpers to parse edid
>    capabilities instead of driver-specific solutions. For this, patch 4
>    introduces a new helper that gets monitor name from drm_edid.
> - Patches 8-9 are groundwork to reduce the noise of Linux/DRM specific
>    code in the DC shared code
> - Patch 10 creates a mid layer to make DC embraces different ways of
>    handling EDID by platforms.
> - Patch 11 move open-coded management of raw EDID data to the mid
>    layer created before.
> - Patch 12 introduces a helper that compares EDIDs from two drm_edids.
> - Patch 13 adds drm_edid to dc_sink struct and a mid-layer helper to
>    free `drm_edid`.
> - Patch 14 switch dc_edid to drm_edid across the driver in a way that
>    the DC shared code is little affected by Linux specific stuff.
> 
> [v1] https://lore.kernel.org/dri-devel/20250411201333.151335-1-mwen@igalia.com/
> Changes:
> - fix broken approach to get monitor name from eld (Jani)
>    - I introduced a new helper that gets monitor name from drm_edid
> - rename drm_edid_eq to drm_edid_eq_buf and doc fixes (Jani)
> - add NULL edid checks (Jani)
> - fix mishandling of product_id.manufacturer_name (Michel)
>    - I directly set it to manufacturer_id since sparse didn't complain.
> - add Mario's r-b in the first fix patch and fix commit msg typo.
> 
> [v2] https://lore.kernel.org/dri-devel/20250507001712.120215-1-mwen@igalia.com/
> Changes:
> - kernel-doc and commit msg fixes (Jani)
> - use drm_edid_legacy_init instead of open coded (Jani)
> - place drm_edid new func into the right section (Jani)
> - paramenter names fix (Jani)
> - add Jani's r-b to the patch 12
> - remove unnecessary include (Jani)
> - call dc_edid_sink_edid_free in link_detection, instead of drm_edid_free
> - rebase on top of asdn
> 
> [v3] https://lore.kernel.org/dri-devel/20250514202130.291324-1-mwen@igalia.com/
> Changes:
> - rebase to asdn
> - some kernel-doc fixes
> - move some changes to the right commit
> 
> [v4] https://lore.kernel.org/amd-gfx/20250613150015.245917-1-mwen@igalia.com/
> Changes:
> - fix comments and commit messages (Mario)
> - remove unnecessary drm_edid dup and fix mem leak (Mario)
> - add Mario's rb to patches 5-7
> 
> [v5] https://lore.kernel.org/amd-gfx/20250618152216.948406-1-mwen@igalia.com/
> Changes:
> - fix NULL pointer dereference (Alex H.) with the same approach proposed
>    by 7c3be3ce3dfae
> 
 > --->
> There are three specific points where we still use drm_edid_raw() in the
> driver:
> 1. raw edid data for write EDID checksum in DP_TEST_EDID_CHECKSUM via
>     drm_dp_dpcd_write(), that AFAIK there is no common code solution yet;
> 2. open-coded connectivity log for dc link detection, that maybe can be
>     moved to drm (?);
> 3. open-coded parser that I suspect is a lot of duplicated code, but
>     needs careful examining.
> 
> I suggest to address those points in a next phase for regression control.
> 
> [1] https://lore.kernel.org/amd-gfx/20250308142650.35920-1-mwen@igalia.com/
> 
> Let me know yours thoughts!
> 
> Melissa
> 
> Melissa Wen (12):
>    drm/amd/display: make sure drm_edid stored in aconnector doesn't leak
>    drm/amd/display: start using drm_edid helpers to parse EDID caps
>    drm/amd/display: use drm_edid_product_id for parsing EDID product info
>    drm/edid: introduce a helper that gets monitor name from drm_edid
>    drm/amd/display: get panel id with drm_edid helper
>    drm/amd/display: get SAD from drm_eld when parsing EDID caps
>    drm/amd/display: get SADB from drm_eld when parsing EDID caps
>    drm/amd/display: simplify dm_helpers_parse_edid_caps signature
>    drm/amd/display: change DC functions to accept private types for edid
>    drm/edid: introduce a helper that compares edid data from two drm_edid
>    drm/amd/display: add drm_edid to dc_sink
>    drm/amd/display: move dc_sink from dc_edid to drm_edid
> 
> Rodrigo Siqueira (2):
>    drm/amd/display: add a mid-layer file to handle EDID in DC
>    drm/amd/display: create a function to fill dc_sink with edid data
> 
>   .../gpu/drm/amd/display/amdgpu_dm/Makefile    |   1 +
>   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  33 +++---
>   .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 109 +++++++-----------
>   .../display/amdgpu_dm/amdgpu_dm_mst_types.c   |  21 ++--
>   .../gpu/drm/amd/display/amdgpu_dm/dc_edid.c   |  39 +++++++
>   .../gpu/drm/amd/display/amdgpu_dm/dc_edid.h   |  15 +++
>   .../drm/amd/display/dc/core/dc_link_exports.c |   9 +-
>   drivers/gpu/drm/amd/display/dc/core/dc_sink.c |   3 +
>   drivers/gpu/drm/amd/display/dc/dc.h           |  10 +-
>   drivers/gpu/drm/amd/display/dc/dm_helpers.h   |   7 +-
>   drivers/gpu/drm/amd/display/dc/inc/link.h     |   9 +-
>   .../drm/amd/display/dc/link/link_detection.c  |  30 ++---
>   .../drm/amd/display/dc/link/link_detection.h  |   9 +-
>   drivers/gpu/drm/bridge/sil-sii8620.c          |   2 +-
>   drivers/gpu/drm/display/drm_dp_mst_topology.c |   2 +-
>   drivers/gpu/drm/drm_edid.c                    |  54 +++++++--
>   include/drm/drm_edid.h                        |  10 +-
>   17 files changed, 199 insertions(+), 164 deletions(-)
>   create mode 100644 drivers/gpu/drm/amd/display/amdgpu_dm/dc_edid.c
>   create mode 100644 drivers/gpu/drm/amd/display/amdgpu_dm/dc_edid.h
> 


  parent reply	other threads:[~2025-07-28 23:29 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-26  0:33 [PATCH v6 00/14] drm/amd/display: more drm_edid to AMD display driver Melissa Wen
2025-07-26  0:33 ` [PATCH v6 01/14] drm/amd/display: make sure drm_edid stored in aconnector doesn't leak Melissa Wen
2025-07-26  0:33 ` [PATCH v6 02/14] drm/amd/display: start using drm_edid helpers to parse EDID caps Melissa Wen
2025-07-26  0:33 ` [PATCH v6 03/14] drm/amd/display: use drm_edid_product_id for parsing EDID product info Melissa Wen
2025-07-26  0:33 ` [PATCH v6 04/14] drm/edid: introduce a helper that gets monitor name from drm_edid Melissa Wen
2025-07-26  0:33 ` [PATCH v6 05/14] drm/amd/display: get panel id with drm_edid helper Melissa Wen
2025-07-26  0:33 ` [PATCH v6 06/14] drm/amd/display: get SAD from drm_eld when parsing EDID caps Melissa Wen
2025-07-26  0:33 ` [PATCH v6 07/14] drm/amd/display: get SADB " Melissa Wen
2025-07-26  0:33 ` [PATCH v6 08/14] drm/amd/display: simplify dm_helpers_parse_edid_caps signature Melissa Wen
2025-07-26  0:33 ` [PATCH v6 09/14] drm/amd/display: change DC functions to accept private types for edid Melissa Wen
2025-07-26  0:33 ` [PATCH v6 10/14] drm/amd/display: add a mid-layer file to handle EDID in DC Melissa Wen
2025-07-26  0:33 ` [PATCH v6 11/14] drm/amd/display: create a function to fill dc_sink with edid data Melissa Wen
2025-07-26  0:33 ` [PATCH v6 12/14] drm/edid: introduce a helper that compares edid data from two drm_edid Melissa Wen
2025-07-26  0:33 ` [PATCH v6 13/14] drm/amd/display: add drm_edid to dc_sink Melissa Wen
2025-08-11 21:27   ` Harry Wentland
2025-07-26  0:33 ` [PATCH v6 14/14] drm/amd/display: move dc_sink from dc_edid to drm_edid Melissa Wen
2025-08-11 21:29   ` Harry Wentland
2025-07-28 23:29 ` Alex Hung [this message]
2025-08-11 19:40   ` [PATCH v6 00/14] drm/amd/display: more drm_edid to AMD display driver Melissa Wen
2025-08-11 21:08     ` Alex Hung
2025-08-11 21:09       ` Limonciello, Mario
2025-08-11 21:26         ` Harry Wentland
2025-08-11 21:47           ` Melissa Wen
2025-08-12 20:39             ` Harry Wentland
2025-08-12 19:30           ` Limonciello, Mario

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=019ca526-5bdf-4c88-a994-a6babb9963c7@amd.com \
    --to=alex.hung@amd.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=andrzej.hajda@intel.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=jani.nikula@linux.intel.com \
    --cc=kernel-dev@igalia.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mario.limonciello@amd.com \
    --cc=michel.daenzer@mailbox.org \
    --cc=mripard@kernel.org \
    --cc=mwen@igalia.com \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@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 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.