[PATCH v2 2/3] drm/panel: panel-edp: Match edp_panels with panel name

Dmitry Baryshkov dmitry.baryshkov at linaro.org
Wed Feb 28 03:59:14 UTC 2024


On Wed, 28 Feb 2024 at 03:11, Hsin-Yi Wang <hsinyi at chromium.org> wrote:
>
> It's found that some panels have variants that they share the same panel id
> although their EDID and names are different. When matching generic edp
> panels, we should first match with both panel id and panel name by checking
> if edid contains the name string. If not found, match with panel id only.
>
> Signed-off-by: Hsin-Yi Wang <hsinyi at chromium.org>
> ---
> v1->v2:
> match with panel name instead of crc hash.
> Note that we can't directly use drm_edid_get_monitor_name(), because some
> panel store the name after EDID_DETAIL_MONITOR_STRING instead of
> EDID_DETAIL_MONITOR_NAME.
> ---
>  drivers/gpu/drm/drm_edid.c        | 69 +++++++------------------------
>  drivers/gpu/drm/panel/panel-edp.c | 44 +++++++++++++++++---
>  include/drm/drm_edid.h            |  2 +-
>  3 files changed, 54 insertions(+), 61 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 15b97c8ed993..c4126475ff0a 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -2764,7 +2764,19 @@ const struct drm_edid *drm_edid_read(struct drm_connector *connector)
>  }
>  EXPORT_SYMBOL(drm_edid_read);
>
> -static u32 edid_extract_panel_id(const struct edid *edid)
> +/**
> + * edid_extract_panel_id - Extract a panel's ID from EDID
> + * @edid: EDID used to extract the panel's ID.
> + *
> + * Extract panel ID from EDID.
> + *
> + * Return: A 32-bit ID that should be different for each make/model of panel.
> + *         See the functions drm_edid_encode_panel_id() and
> + *         drm_edid_decode_panel_id() for some details on the structure of this
> + *         ID.
> + */
> +
> +u32 edid_extract_panel_id(const struct edid *edid)

drm_edid_extract_panel_id(), please

>  {
>         /*
>          * We represent the ID as a 32-bit number so it can easily be compared

[skipeed the rest, LGTM]

-- 
With best wishes
Dmitry


More information about the dri-devel mailing list