drm/edid: Add a function to match EDID with identity
authorHsin-Yi Wang <hsinyi@chromium.org>
Thu, 7 Mar 2024 22:57:42 +0000 (14:57 -0800)
committerDouglas Anderson <dianders@chromium.org>
Thu, 14 Mar 2024 15:22:57 +0000 (08:22 -0700)
commit6e3fdedcf0bc03c852d9fdbb5443f1e43103195f
treec8e64f596612f5cefd9b2a9ca6bf2993d7b1ca9d
parenta0b39da11618897e0a2b85ea28e34b8cbcbd3274
drm/edid: Add a function to match EDID with identity

Create a type drm_edid_ident as the identity of an EDID. Currently it
contains panel id and monitor name.

Create a function that can match a given EDID and an identity:
1. Reject if the panel id doesn't match.
2. If name is not null in identity, try to match it in the detailed timing
   blocks. Note that some panel vendors put the monitor name after
   EDID_DETAIL_MONITOR_STRING.

Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240307230653.1807557-3-hsinyi@chromium.org
drivers/gpu/drm/drm_edid.c
include/drm/drm_edid.h