[PATCH v4 03/14] drm/amd/display: use drm_edid_product_id for parsing EDID product info
Melissa Wen
mwen at igalia.com
Mon Jun 16 19:29:34 UTC 2025
On 13/06/2025 15:53, Mario Limonciello wrote:
> On 6/13/2025 9:58 AM, Melissa Wen wrote:
>> Since [1], we can use drm_edid_product_id to get debug info from
>> drm_edid instead of directly parsing EDID.
>>
>> Link:
>> https://lore.kernel.org/dri-devel/cover.1712655867.git.jani.nikula@intel.com/
>> [1]
>
> This is a pretty old commit. It's landed now a while, right?
> I'd say if you're going to reference it in the changelog it should be
> referenced by commit ABC123 ("Foo the bar").
Makes sense.
As it was a series, I'll try to find the most relevant commit and
replace the reference.
>
>> Signed-off-by: Melissa Wen <mwen at igalia.com>
>> ---
>> .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 15 ++++++++-------
>> 1 file changed, 8 insertions(+), 7 deletions(-)
>>
>> diff --git
>> a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
>> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
>> index 5543780f1024..b1085f1195f7 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
>> @@ -109,6 +109,7 @@ enum dc_edid_status dm_helpers_parse_edid_caps(
>> struct drm_device *dev = connector->dev;
>> struct edid *edid_buf = edid ? (struct edid *) edid->raw_edid :
>> NULL;
>> const struct drm_edid *drm_edid;
>> + struct drm_edid_product_id product_id;
>> struct cea_sad *sads;
>> int sad_count = -1;
>> int sadb_count = -1;
>> @@ -125,13 +126,13 @@ enum dc_edid_status dm_helpers_parse_edid_caps(
>> if (!drm_edid_valid(drm_edid))
>> result = EDID_BAD_CHECKSUM;
>> - edid_caps->manufacturer_id = (uint16_t) edid_buf->mfg_id[0] |
>> - ((uint16_t) edid_buf->mfg_id[1])<<8;
>> - edid_caps->product_id = (uint16_t) edid_buf->prod_code[0] |
>> - ((uint16_t) edid_buf->prod_code[1])<<8;
>> - edid_caps->serial_number = edid_buf->serial;
>> - edid_caps->manufacture_week = edid_buf->mfg_week;
>> - edid_caps->manufacture_year = edid_buf->mfg_year;
>> + drm_edid_get_product_id(drm_edid, &product_id);
>> +
>> + edid_caps->manufacturer_id = product_id.manufacturer_name;
>> + edid_caps->product_id = le16_to_cpu(product_id.product_code);
>> + edid_caps->serial_number = le32_to_cpu(product_id.serial_number);
>> + edid_caps->manufacture_week = product_id.week_of_manufacture;
>> + edid_caps->manufacture_year = product_id.year_of_manufacture;
>> drm_edid_get_monitor_name(edid_buf,
>> edid_caps->display_name,
>
More information about the dri-devel
mailing list