diff options
author | Jani Nikula <jani.nikula@intel.com> | 2023-10-31 13:16:43 +0300 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2023-11-09 17:48:27 +0300 |
commit | f415a6078f640ab15bae34d3c6a1d8e6071363de (patch) | |
tree | dc53de2a55adb7a81376baf4b3cf7b860e96cb8d /include | |
parent | 8af4681189e58a51be8a0fc9f0687e615cdb82c9 (diff) | |
download | linux-f415a6078f640ab15bae34d3c6a1d8e6071363de.tar.xz |
drm/eld: add helpers to modify the SADs of an ELD
Occasionally it's necessary for drivers to modify the SADs of an ELD,
but it's not so cool to have drivers poke at the ELD buffer directly.
Using the helpers to translate between 3-byte SAD and struct cea_sad,
add ELD helpers to get/set the SADs from/to an ELD.
v2: s/i/sad_index/ (Mitul)
Cc: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/8e9a05f2b1e0dd184132d636e1e778e8917ec25d.1698747331.git.jani.nikula@intel.com
Diffstat (limited to 'include')
-rw-r--r-- | include/drm/drm_eld.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/drm/drm_eld.h b/include/drm/drm_eld.h index 7b674256b9aa..0a88d10b28b0 100644 --- a/include/drm/drm_eld.h +++ b/include/drm/drm_eld.h @@ -8,6 +8,8 @@ #include <linux/types.h> +struct cea_sad; + /* ELD Header Block */ #define DRM_ELD_HEADER_BLOCK_SIZE 4 @@ -75,6 +77,9 @@ static inline int drm_eld_mnl(const u8 *eld) return (eld[DRM_ELD_CEA_EDID_VER_MNL] & DRM_ELD_MNL_MASK) >> DRM_ELD_MNL_SHIFT; } +int drm_eld_sad_get(const u8 *eld, int sad_index, struct cea_sad *cta_sad); +int drm_eld_sad_set(u8 *eld, int sad_index, const struct cea_sad *cta_sad); + /** * drm_eld_sad - Get ELD SAD structures. * @eld: pointer to an eld memory structure with sad_count set |