drm_edid: Add a function to get EDID base block
authorHsin-Yi Wang <hsinyi@chromium.org>
Thu, 7 Mar 2024 22:57:41 +0000 (14:57 -0800)
committerDouglas Anderson <dianders@chromium.org>
Thu, 14 Mar 2024 15:20:26 +0000 (08:20 -0700)
commita0b39da11618897e0a2b85ea28e34b8cbcbd3274
treee50b3fcad2ee2819a5daccd95f0ebf28169300f6
parent751b58418250a56329d35de29329f547c43e7c7f
drm_edid: Add a function to get EDID base block

It's found that some panels have variants that they share the same panel id
although their EDID and names are different. Besides panel id, now we need
more information from the EDID base block to distinguish these panel
variants.

Add drm_edid_read_base_block() to return the EDID base block, which is
wrapped in struct drm_edid.

Caller can further use it to get panel id or check if the block contains
certain strings, such as panel name.

Merge drm_edid_get_panel_id() and edid_extract_panel_id() into one
function.

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-2-hsinyi@chromium.org
drivers/gpu/drm/drm_edid.c
drivers/gpu/drm/panel/panel-edp.c
include/drm/drm_edid.h