diff options
author | Joonas Lahtinen <joonas.lahtinen@linux.intel.com> | 2019-02-20 12:27:15 +0300 |
---|---|---|
committer | Joonas Lahtinen <joonas.lahtinen@linux.intel.com> | 2019-02-20 12:53:48 +0300 |
commit | b08e776c223c5faa2f2768d5e597cf6549445593 (patch) | |
tree | 05039e6ddc9774d9e02595033909aa4e33dd4e9e /include/drm/drm_hdcp.h | |
parent | d0781a89c06f46d0f75e4e142061b8accb67cbe5 (diff) | |
parent | 35c0272502cca0a1b461d310c23aac94a503983d (diff) | |
download | linux-b08e776c223c5faa2f2768d5e597cf6549445593.tar.xz |
Merge tag 'topic/mei-hdcp-2019-02-19' of git://anongit.freedesktop.org/drm/drm-intel into drm-intel-next-queued
Prep patches + headers for the mei-hdcp/i915 component interfaces
Also contains the prep work in the component helpers plus adjustements
for the snd-hda/i915 component interface.
Plus one small static inline in the drm_hdcp.h header that both i915
and mei_hdcp will need.
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
From: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190219071619.GA11016@phenom.ffwll.local
Diffstat (limited to 'include/drm/drm_hdcp.h')
-rw-r--r-- | include/drm/drm_hdcp.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/drm/drm_hdcp.h b/include/drm/drm_hdcp.h index d6dfef8cff6a..7260b31af276 100644 --- a/include/drm/drm_hdcp.h +++ b/include/drm/drm_hdcp.h @@ -252,4 +252,22 @@ struct hdcp2_dp_errata_stream_type { #define HDCP_2_2_HDMI_RXSTATUS_READY(x) ((x) & BIT(2)) #define HDCP_2_2_HDMI_RXSTATUS_REAUTH_REQ(x) ((x) & BIT(3)) +/* + * Helper functions to convert 24bit big endian hdcp sequence number to + * host format and back + */ +static inline +u32 drm_hdcp2_seq_num_to_u32(u8 seq_num[HDCP_2_2_SEQ_NUM_LEN]) +{ + return (u32)(seq_num[2] | seq_num[1] << 8 | seq_num[0] << 16); +} + +static inline +void drm_hdcp2_u32_to_seq_num(u8 seq_num[HDCP_2_2_SEQ_NUM_LEN], u32 val) +{ + seq_num[0] = val >> 16; + seq_num[1] = val >> 8; + seq_num[2] = val; +} + #endif |