[PATCH v4 11/14] drm/amd/display: create a function to fill dc_sink with edid data
Mario Limonciello
mario.limonciello at amd.com
Fri Jun 13 18:38:50 UTC 2025
On 6/13/2025 9:58 AM, Melissa Wen wrote:
> From: Rodrigo Siqueira <siqueira at igalia.com>
>
> As part of the effort of stopping using raw edid, this commit move the
> copy of the edid in DC to a dedicated function that will allow the usage
> of drm_edid in the next steps.
>
> v3:
> - remove superfulous cast (jani)
I don't think that changelog needs to end up in the eventual commit
history. But it's useful while still under review.
Could you put the changelog below the cutlist (---)?
>
> Signed-off-by: Rodrigo Siqueira <siqueira at igalia.com>
> Co-developer--by: Melissa Wen <mwen at igalia.com>
These tags are wrong. It's "Co-developed-by".
> Signed-off-by: Melissa Wen <mwen at igalia.com>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/dc_edid.c | 8 ++++++++
> drivers/gpu/drm/amd/display/amdgpu_dm/dc_edid.h | 2 ++
> drivers/gpu/drm/amd/display/dc/link/link_detection.c | 3 +--
> 3 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/dc_edid.c b/drivers/gpu/drm/amd/display/amdgpu_dm/dc_edid.c
> index fab873b091f5..a90545b176cc 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/dc_edid.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/dc_edid.c
> @@ -17,3 +17,11 @@ bool dc_edid_is_same_edid(struct dc_sink *prev_sink,
> return (memcmp(old_edid->raw_edid,
> new_edid->raw_edid, new_edid->length) == 0);
> }
> +
> +void dc_edid_copy_edid_to_dc(struct dc_sink *dc_sink,
> + const void *edid,
> + int len)
> +{
> + memmove(dc_sink->dc_edid.raw_edid, edid, len);
> + dc_sink->dc_edid.length = len;
> +}
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/dc_edid.h b/drivers/gpu/drm/amd/display/amdgpu_dm/dc_edid.h
> index 7e3b1177bc8a..f42cd5bbc730 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/dc_edid.h
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/dc_edid.h
> @@ -7,5 +7,7 @@
>
> bool dc_edid_is_same_edid(struct dc_sink *prev_sink,
> struct dc_sink *current_sink);
> +void dc_edid_copy_edid_to_dc(struct dc_sink *dc_sink,
> + const void *edid, int len);
>
> #endif /* __DC_EDID_H__ */
> diff --git a/drivers/gpu/drm/amd/display/dc/link/link_detection.c b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
> index 344356e26f8b..c28072f980cc 100644
> --- a/drivers/gpu/drm/amd/display/dc/link/link_detection.c
> +++ b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
> @@ -1401,8 +1401,7 @@ struct dc_sink *link_add_remote_sink(
> if (!dc_sink)
> return NULL;
>
> - memmove(dc_sink->dc_edid.raw_edid, (const uint8_t *) edid, len);
> - dc_sink->dc_edid.length = len;
> + dc_edid_copy_edid_to_dc(dc_sink, edid, len);
>
> if (!link_add_remote_sink_helper(
> link,
More information about the dri-devel
mailing list