This series adds parsing of the Display Device Technology field from
the DisplayID v2.x Display Parameters Data Block (tag 0x21), enabling
panel type detection (LCD/OLED) through a standards-based source.

Previously, amdgpu_dm determined panel type only from AMD VSDB, DPCD
sink extended caps, and a Samsung luminance heuristic. A TODO comment
in dm_set_panel_type() acknowledged the need to also use DisplayID as
a source. This series resolves that by parsing the Display Parameters
block in DRM core and wiring it into amdgpu_dm's detection priority
chain as: VSDB > DPCD > DisplayID > Samsung heuristic.

Patch 1 extracts the section header processing into a helper and
removes the break so the iterator can walk through all data blocks.
The helper is invoked only once via a header_processed flag because
displayid_version() and displayid_primary_use() always return values
captured from the base section — they are fixed regardless of which
extension section the iterator is currently in, so processing the
header more than once would be redundant.

Chenyu Chen (3):
  drm/edid: extract section header processing into helper
  drm/edid: parse panel type from DisplayID 2.x Display Parameters
  drm/amd/display: use DisplayID panel type in dm_set_panel_type

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 +--
 drivers/gpu/drm/drm_displayid_internal.h      | 25 ++++++
 drivers/gpu/drm/drm_edid.c                    | 79 +++++++++++++++----
 include/drm/drm_connector.h                   |  6 ++
 include/uapi/drm/drm_mode.h                   |  1 +
 5 files changed, 103 insertions(+), 20 deletions(-)

-- 
2.43.0

Reply via email to