Lines Matching defs:buf
32 static u32 drm_hdcp_get_revoked_ksv_count(const u8 *buf, u32 vrls_length)
37 vrl_ksv_cnt = *buf;
41 buf += vrl_sz;
55 static u32 drm_hdcp_get_revoked_ksvs(const u8 *buf, u8 **revoked_ksv_list,
62 vrl_ksv_cnt = *buf;
65 buf++;
70 buf, vrl_ksv_sz);
73 buf += vrl_ksv_sz;
81 static inline u32 get_vrl_length(const u8 *buf)
83 return drm_hdcp_be24_to_cpu(buf);
86 static int drm_hdcp_parse_hdcp1_srm(const u8 *buf, size_t count,
98 header = (struct hdcp_srm_header *)buf;
105 buf = buf + sizeof(*header);
106 vrl_length = get_vrl_length(buf);
123 buf += DRM_HDCP_1_4_VRL_LENGTH_SIZE;
124 ksv_count = drm_hdcp_get_revoked_ksv_count(buf, vrl_length);
136 if (drm_hdcp_get_revoked_ksvs(buf, revoked_ksv_list,
147 static int drm_hdcp_parse_hdcp2_srm(const u8 *buf, size_t count,
159 header = (struct hdcp_srm_header *)buf;
167 buf = buf + sizeof(*header);
168 vrl_length = get_vrl_length(buf);
186 buf += DRM_HDCP_2_VRL_LENGTH_SIZE;
187 ksv_count = (*buf << 2) | DRM_HDCP_2_KSV_COUNT_2_LSBITS(*(buf + 1));
200 buf += DRM_HDCP_2_NO_OF_DEV_PLUS_RESERVED_SZ;
203 memcpy(*revoked_ksv_list, buf, ksv_sz);
209 static inline bool is_srm_version_hdcp1(const u8 *buf)
211 return *buf == (u8)(DRM_HDCP_1_4_SRM_ID << 4);
214 static inline bool is_srm_version_hdcp2(const u8 *buf)
216 return *buf == (u8)(DRM_HDCP_2_SRM_ID << 4 | DRM_HDCP_2_INDICATOR);
219 static int drm_hdcp_srm_update(const u8 *buf, size_t count,
225 if (is_srm_version_hdcp1(buf))
226 return drm_hdcp_parse_hdcp1_srm(buf, count, revoked_ksv_list,
228 else if (is_srm_version_hdcp2(buf))
229 return drm_hdcp_parse_hdcp2_srm(buf, count, revoked_ksv_list,