diff options
author | Jani Nikula <jani.nikula@intel.com> | 2024-04-09 11:46:10 +0200 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2024-04-15 14:42:49 +0200 |
commit | 3f56e5514bfd99aaba649e4af6b11a11b731d3a2 (patch) | |
tree | 825bf5e90b135d7c35f5ebe0a25257dbc48ce38a /include/drm | |
parent | drm/edid: add drm_edid_get_product_id() (diff) | |
download | linux-3f56e5514bfd99aaba649e4af6b11a11b731d3a2.tar.xz linux-3f56e5514bfd99aaba649e4af6b11a11b731d3a2.zip |
drm/edid: add drm_edid_print_product_id()
Add a function to print a decoded EDID vendor and product id to a drm
printer, optionally with the raw data.
v2:
- refactor date printing
- use seq_buf to avoid kasprintf() (Ville)
- handle week == 0 (Ville)
- use be16_to_cpu() on manufacturer_name
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Melissa Wen <mwen@igalia.com> # v1
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/32bbc83ee6557809ef6d7a5edb1bc8ef4d56d10f.1712655867.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_edid.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index 8bdd8d54815d..8e0e32349332 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h @@ -30,6 +30,7 @@ struct drm_connector; struct drm_device; struct drm_display_mode; struct drm_edid; +struct drm_printer; struct hdmi_avi_infoframe; struct hdmi_vendor_infoframe; struct i2c_adapter; @@ -481,6 +482,8 @@ int drm_edid_connector_add_modes(struct drm_connector *connector); bool drm_edid_is_digital(const struct drm_edid *drm_edid); void drm_edid_get_product_id(const struct drm_edid *drm_edid, struct drm_edid_product_id *id); +void drm_edid_print_product_id(struct drm_printer *p, + const struct drm_edid_product_id *id, bool raw); const u8 *drm_find_edid_extension(const struct drm_edid *drm_edid, int ext_id, int *ext_index); |