• Home
  • Raw
  • Download

Lines Matching full:frame

55  * @frame: HDMI AVI infoframe
57 void hdmi_avi_infoframe_init(struct hdmi_avi_infoframe *frame) in hdmi_avi_infoframe_init() argument
59 memset(frame, 0, sizeof(*frame)); in hdmi_avi_infoframe_init()
61 frame->type = HDMI_INFOFRAME_TYPE_AVI; in hdmi_avi_infoframe_init()
62 frame->version = 2; in hdmi_avi_infoframe_init()
63 frame->length = HDMI_AVI_INFOFRAME_SIZE; in hdmi_avi_infoframe_init()
67 static int hdmi_avi_infoframe_check_only(const struct hdmi_avi_infoframe *frame) in hdmi_avi_infoframe_check_only() argument
69 if (frame->type != HDMI_INFOFRAME_TYPE_AVI || in hdmi_avi_infoframe_check_only()
70 frame->version != 2 || in hdmi_avi_infoframe_check_only()
71 frame->length != HDMI_AVI_INFOFRAME_SIZE) in hdmi_avi_infoframe_check_only()
74 if (frame->picture_aspect > HDMI_PICTURE_ASPECT_16_9) in hdmi_avi_infoframe_check_only()
82 * @frame: HDMI AVI infoframe
89 int hdmi_avi_infoframe_check(struct hdmi_avi_infoframe *frame) in hdmi_avi_infoframe_check() argument
91 return hdmi_avi_infoframe_check_only(frame); in hdmi_avi_infoframe_check()
97 * @frame: HDMI AVI infoframe
101 * Packs the information contained in the @frame structure into a binary
109 ssize_t hdmi_avi_infoframe_pack_only(const struct hdmi_avi_infoframe *frame, in hdmi_avi_infoframe_pack_only() argument
116 ret = hdmi_avi_infoframe_check_only(frame); in hdmi_avi_infoframe_pack_only()
120 length = HDMI_INFOFRAME_HEADER_SIZE + frame->length; in hdmi_avi_infoframe_pack_only()
127 ptr[0] = frame->type; in hdmi_avi_infoframe_pack_only()
128 ptr[1] = frame->version; in hdmi_avi_infoframe_pack_only()
129 ptr[2] = frame->length; in hdmi_avi_infoframe_pack_only()
135 ptr[0] = ((frame->colorspace & 0x3) << 5) | (frame->scan_mode & 0x3); in hdmi_avi_infoframe_pack_only()
141 if (frame->active_aspect & 0xf) in hdmi_avi_infoframe_pack_only()
145 if (frame->top_bar || frame->bottom_bar) in hdmi_avi_infoframe_pack_only()
148 if (frame->left_bar || frame->right_bar) in hdmi_avi_infoframe_pack_only()
151 ptr[1] = ((frame->colorimetry & 0x3) << 6) | in hdmi_avi_infoframe_pack_only()
152 ((frame->picture_aspect & 0x3) << 4) | in hdmi_avi_infoframe_pack_only()
153 (frame->active_aspect & 0xf); in hdmi_avi_infoframe_pack_only()
155 ptr[2] = ((frame->extended_colorimetry & 0x7) << 4) | in hdmi_avi_infoframe_pack_only()
156 ((frame->quantization_range & 0x3) << 2) | in hdmi_avi_infoframe_pack_only()
157 (frame->nups & 0x3); in hdmi_avi_infoframe_pack_only()
159 if (frame->itc) in hdmi_avi_infoframe_pack_only()
162 ptr[3] = frame->video_code & 0x7f; in hdmi_avi_infoframe_pack_only()
164 ptr[4] = ((frame->ycc_quantization_range & 0x3) << 6) | in hdmi_avi_infoframe_pack_only()
165 ((frame->content_type & 0x3) << 4) | in hdmi_avi_infoframe_pack_only()
166 (frame->pixel_repeat & 0xf); in hdmi_avi_infoframe_pack_only()
168 ptr[5] = frame->top_bar & 0xff; in hdmi_avi_infoframe_pack_only()
169 ptr[6] = (frame->top_bar >> 8) & 0xff; in hdmi_avi_infoframe_pack_only()
170 ptr[7] = frame->bottom_bar & 0xff; in hdmi_avi_infoframe_pack_only()
171 ptr[8] = (frame->bottom_bar >> 8) & 0xff; in hdmi_avi_infoframe_pack_only()
172 ptr[9] = frame->left_bar & 0xff; in hdmi_avi_infoframe_pack_only()
173 ptr[10] = (frame->left_bar >> 8) & 0xff; in hdmi_avi_infoframe_pack_only()
174 ptr[11] = frame->right_bar & 0xff; in hdmi_avi_infoframe_pack_only()
175 ptr[12] = (frame->right_bar >> 8) & 0xff; in hdmi_avi_infoframe_pack_only()
186 * @frame: HDMI AVI infoframe
192 * contained in the @frame structure into a binary representation that
200 ssize_t hdmi_avi_infoframe_pack(struct hdmi_avi_infoframe *frame, in hdmi_avi_infoframe_pack() argument
205 ret = hdmi_avi_infoframe_check(frame); in hdmi_avi_infoframe_pack()
209 return hdmi_avi_infoframe_pack_only(frame, buffer, size); in hdmi_avi_infoframe_pack()
215 * @frame: HDMI SPD infoframe
221 int hdmi_spd_infoframe_init(struct hdmi_spd_infoframe *frame, in hdmi_spd_infoframe_init() argument
224 memset(frame, 0, sizeof(*frame)); in hdmi_spd_infoframe_init()
226 frame->type = HDMI_INFOFRAME_TYPE_SPD; in hdmi_spd_infoframe_init()
227 frame->version = 1; in hdmi_spd_infoframe_init()
228 frame->length = HDMI_SPD_INFOFRAME_SIZE; in hdmi_spd_infoframe_init()
230 strncpy(frame->vendor, vendor, sizeof(frame->vendor)); in hdmi_spd_infoframe_init()
231 strncpy(frame->product, product, sizeof(frame->product)); in hdmi_spd_infoframe_init()
237 static int hdmi_spd_infoframe_check_only(const struct hdmi_spd_infoframe *frame) in hdmi_spd_infoframe_check_only() argument
239 if (frame->type != HDMI_INFOFRAME_TYPE_SPD || in hdmi_spd_infoframe_check_only()
240 frame->version != 1 || in hdmi_spd_infoframe_check_only()
241 frame->length != HDMI_SPD_INFOFRAME_SIZE) in hdmi_spd_infoframe_check_only()
249 * @frame: HDMI SPD infoframe
256 int hdmi_spd_infoframe_check(struct hdmi_spd_infoframe *frame) in hdmi_spd_infoframe_check() argument
258 return hdmi_spd_infoframe_check_only(frame); in hdmi_spd_infoframe_check()
264 * @frame: HDMI SPD infoframe
268 * Packs the information contained in the @frame structure into a binary
276 ssize_t hdmi_spd_infoframe_pack_only(const struct hdmi_spd_infoframe *frame, in hdmi_spd_infoframe_pack_only() argument
283 ret = hdmi_spd_infoframe_check_only(frame); in hdmi_spd_infoframe_pack_only()
287 length = HDMI_INFOFRAME_HEADER_SIZE + frame->length; in hdmi_spd_infoframe_pack_only()
294 ptr[0] = frame->type; in hdmi_spd_infoframe_pack_only()
295 ptr[1] = frame->version; in hdmi_spd_infoframe_pack_only()
296 ptr[2] = frame->length; in hdmi_spd_infoframe_pack_only()
302 memcpy(ptr, frame->vendor, sizeof(frame->vendor)); in hdmi_spd_infoframe_pack_only()
303 memcpy(ptr + 8, frame->product, sizeof(frame->product)); in hdmi_spd_infoframe_pack_only()
305 ptr[24] = frame->sdi; in hdmi_spd_infoframe_pack_only()
316 * @frame: HDMI SPD infoframe
322 * contained in the @frame structure into a binary representation that
330 ssize_t hdmi_spd_infoframe_pack(struct hdmi_spd_infoframe *frame, in hdmi_spd_infoframe_pack() argument
335 ret = hdmi_spd_infoframe_check(frame); in hdmi_spd_infoframe_pack()
339 return hdmi_spd_infoframe_pack_only(frame, buffer, size); in hdmi_spd_infoframe_pack()
345 * @frame: HDMI audio infoframe
349 int hdmi_audio_infoframe_init(struct hdmi_audio_infoframe *frame) in hdmi_audio_infoframe_init() argument
351 memset(frame, 0, sizeof(*frame)); in hdmi_audio_infoframe_init()
353 frame->type = HDMI_INFOFRAME_TYPE_AUDIO; in hdmi_audio_infoframe_init()
354 frame->version = 1; in hdmi_audio_infoframe_init()
355 frame->length = HDMI_AUDIO_INFOFRAME_SIZE; in hdmi_audio_infoframe_init()
361 static int hdmi_audio_infoframe_check_only(const struct hdmi_audio_infoframe *frame) in hdmi_audio_infoframe_check_only() argument
363 if (frame->type != HDMI_INFOFRAME_TYPE_AUDIO || in hdmi_audio_infoframe_check_only()
364 frame->version != 1 || in hdmi_audio_infoframe_check_only()
365 frame->length != HDMI_AUDIO_INFOFRAME_SIZE) in hdmi_audio_infoframe_check_only()
373 * @frame: HDMI audio infoframe
380 int hdmi_audio_infoframe_check(struct hdmi_audio_infoframe *frame) in hdmi_audio_infoframe_check() argument
382 return hdmi_audio_infoframe_check_only(frame); in hdmi_audio_infoframe_check()
388 * @frame: HDMI audio infoframe
392 * Packs the information contained in the @frame structure into a binary
400 ssize_t hdmi_audio_infoframe_pack_only(const struct hdmi_audio_infoframe *frame, in hdmi_audio_infoframe_pack_only() argument
408 ret = hdmi_audio_infoframe_check_only(frame); in hdmi_audio_infoframe_pack_only()
412 length = HDMI_INFOFRAME_HEADER_SIZE + frame->length; in hdmi_audio_infoframe_pack_only()
419 if (frame->channels >= 2) in hdmi_audio_infoframe_pack_only()
420 channels = frame->channels - 1; in hdmi_audio_infoframe_pack_only()
424 ptr[0] = frame->type; in hdmi_audio_infoframe_pack_only()
425 ptr[1] = frame->version; in hdmi_audio_infoframe_pack_only()
426 ptr[2] = frame->length; in hdmi_audio_infoframe_pack_only()
432 ptr[0] = ((frame->coding_type & 0xf) << 4) | (channels & 0x7); in hdmi_audio_infoframe_pack_only()
433 ptr[1] = ((frame->sample_frequency & 0x7) << 2) | in hdmi_audio_infoframe_pack_only()
434 (frame->sample_size & 0x3); in hdmi_audio_infoframe_pack_only()
435 ptr[2] = frame->coding_type_ext & 0x1f; in hdmi_audio_infoframe_pack_only()
436 ptr[3] = frame->channel_allocation; in hdmi_audio_infoframe_pack_only()
437 ptr[4] = (frame->level_shift_value & 0xf) << 3; in hdmi_audio_infoframe_pack_only()
439 if (frame->downmix_inhibit) in hdmi_audio_infoframe_pack_only()
451 * @frame: HDMI Audio infoframe
457 * contained in the @frame structure into a binary representation that
465 ssize_t hdmi_audio_infoframe_pack(struct hdmi_audio_infoframe *frame, in hdmi_audio_infoframe_pack() argument
470 ret = hdmi_audio_infoframe_check(frame); in hdmi_audio_infoframe_pack()
474 return hdmi_audio_infoframe_pack_only(frame, buffer, size); in hdmi_audio_infoframe_pack()
480 * @frame: HDMI vendor infoframe
484 int hdmi_vendor_infoframe_init(struct hdmi_vendor_infoframe *frame) in hdmi_vendor_infoframe_init() argument
486 memset(frame, 0, sizeof(*frame)); in hdmi_vendor_infoframe_init()
488 frame->type = HDMI_INFOFRAME_TYPE_VENDOR; in hdmi_vendor_infoframe_init()
489 frame->version = 1; in hdmi_vendor_infoframe_init()
491 frame->oui = HDMI_IEEE_OUI; in hdmi_vendor_infoframe_init()
497 frame->s3d_struct = HDMI_3D_STRUCTURE_INVALID; in hdmi_vendor_infoframe_init()
498 frame->length = HDMI_VENDOR_INFOFRAME_SIZE; in hdmi_vendor_infoframe_init()
504 static int hdmi_vendor_infoframe_length(const struct hdmi_vendor_infoframe *frame) in hdmi_vendor_infoframe_length() argument
507 if (frame->s3d_struct >= HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF) in hdmi_vendor_infoframe_length()
509 else if (frame->vic != 0 || frame->s3d_struct != HDMI_3D_STRUCTURE_INVALID) in hdmi_vendor_infoframe_length()
515 static int hdmi_vendor_infoframe_check_only(const struct hdmi_vendor_infoframe *frame) in hdmi_vendor_infoframe_check_only() argument
517 if (frame->type != HDMI_INFOFRAME_TYPE_VENDOR || in hdmi_vendor_infoframe_check_only()
518 frame->version != 1 || in hdmi_vendor_infoframe_check_only()
519 frame->oui != HDMI_IEEE_OUI) in hdmi_vendor_infoframe_check_only()
523 if (frame->vic != 0 && frame->s3d_struct != HDMI_3D_STRUCTURE_INVALID) in hdmi_vendor_infoframe_check_only()
526 if (frame->length != hdmi_vendor_infoframe_length(frame)) in hdmi_vendor_infoframe_check_only()
534 * @frame: HDMI infoframe
541 int hdmi_vendor_infoframe_check(struct hdmi_vendor_infoframe *frame) in hdmi_vendor_infoframe_check() argument
543 frame->length = hdmi_vendor_infoframe_length(frame); in hdmi_vendor_infoframe_check()
545 return hdmi_vendor_infoframe_check_only(frame); in hdmi_vendor_infoframe_check()
551 * @frame: HDMI infoframe
555 * Packs the information contained in the @frame structure into a binary
563 ssize_t hdmi_vendor_infoframe_pack_only(const struct hdmi_vendor_infoframe *frame, in hdmi_vendor_infoframe_pack_only() argument
570 ret = hdmi_vendor_infoframe_check_only(frame); in hdmi_vendor_infoframe_pack_only()
574 length = HDMI_INFOFRAME_HEADER_SIZE + frame->length; in hdmi_vendor_infoframe_pack_only()
581 ptr[0] = frame->type; in hdmi_vendor_infoframe_pack_only()
582 ptr[1] = frame->version; in hdmi_vendor_infoframe_pack_only()
583 ptr[2] = frame->length; in hdmi_vendor_infoframe_pack_only()
591 if (frame->s3d_struct != HDMI_3D_STRUCTURE_INVALID) { in hdmi_vendor_infoframe_pack_only()
593 ptr[8] = (frame->s3d_struct & 0xf) << 4; in hdmi_vendor_infoframe_pack_only()
594 if (frame->s3d_struct >= HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF) in hdmi_vendor_infoframe_pack_only()
595 ptr[9] = (frame->s3d_ext_data & 0xf) << 4; in hdmi_vendor_infoframe_pack_only()
596 } else if (frame->vic) { in hdmi_vendor_infoframe_pack_only()
598 ptr[8] = frame->vic; in hdmi_vendor_infoframe_pack_only()
612 * @frame: HDMI Vendor infoframe
618 * contained in the @frame structure into a binary representation that
626 ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame, in hdmi_vendor_infoframe_pack() argument
631 ret = hdmi_vendor_infoframe_check(frame); in hdmi_vendor_infoframe_pack()
635 return hdmi_vendor_infoframe_pack_only(frame, buffer, size); in hdmi_vendor_infoframe_pack()
640 hdmi_vendor_any_infoframe_check_only(const union hdmi_vendor_any_infoframe *frame) in hdmi_vendor_any_infoframe_check_only() argument
642 if (frame->any.type != HDMI_INFOFRAME_TYPE_VENDOR || in hdmi_vendor_any_infoframe_check_only()
643 frame->any.version != 1) in hdmi_vendor_any_infoframe_check_only()
652 * @frame: HDMI DRM infoframe
656 int hdmi_drm_infoframe_init(struct hdmi_drm_infoframe *frame) in hdmi_drm_infoframe_init() argument
658 memset(frame, 0, sizeof(*frame)); in hdmi_drm_infoframe_init()
660 frame->type = HDMI_INFOFRAME_TYPE_DRM; in hdmi_drm_infoframe_init()
661 frame->version = 1; in hdmi_drm_infoframe_init()
662 frame->length = HDMI_DRM_INFOFRAME_SIZE; in hdmi_drm_infoframe_init()
668 static int hdmi_drm_infoframe_check_only(const struct hdmi_drm_infoframe *frame) in hdmi_drm_infoframe_check_only() argument
670 if (frame->type != HDMI_INFOFRAME_TYPE_DRM || in hdmi_drm_infoframe_check_only()
671 frame->version != 1) in hdmi_drm_infoframe_check_only()
674 if (frame->length != HDMI_DRM_INFOFRAME_SIZE) in hdmi_drm_infoframe_check_only()
682 * @frame: HDMI DRM infoframe
687 int hdmi_drm_infoframe_check(struct hdmi_drm_infoframe *frame) in hdmi_drm_infoframe_check() argument
689 return hdmi_drm_infoframe_check_only(frame); in hdmi_drm_infoframe_check()
695 * @frame: HDMI DRM infoframe
699 * Packs the information contained in the @frame structure into a binary
707 ssize_t hdmi_drm_infoframe_pack_only(const struct hdmi_drm_infoframe *frame, in hdmi_drm_infoframe_pack_only() argument
714 length = HDMI_INFOFRAME_HEADER_SIZE + frame->length; in hdmi_drm_infoframe_pack_only()
721 ptr[0] = frame->type; in hdmi_drm_infoframe_pack_only()
722 ptr[1] = frame->version; in hdmi_drm_infoframe_pack_only()
723 ptr[2] = frame->length; in hdmi_drm_infoframe_pack_only()
729 *ptr++ = frame->eotf; in hdmi_drm_infoframe_pack_only()
730 *ptr++ = frame->metadata_type; in hdmi_drm_infoframe_pack_only()
733 *ptr++ = frame->display_primaries[i].x; in hdmi_drm_infoframe_pack_only()
734 *ptr++ = frame->display_primaries[i].x >> 8; in hdmi_drm_infoframe_pack_only()
735 *ptr++ = frame->display_primaries[i].y; in hdmi_drm_infoframe_pack_only()
736 *ptr++ = frame->display_primaries[i].y >> 8; in hdmi_drm_infoframe_pack_only()
739 *ptr++ = frame->white_point.x; in hdmi_drm_infoframe_pack_only()
740 *ptr++ = frame->white_point.x >> 8; in hdmi_drm_infoframe_pack_only()
742 *ptr++ = frame->white_point.y; in hdmi_drm_infoframe_pack_only()
743 *ptr++ = frame->white_point.y >> 8; in hdmi_drm_infoframe_pack_only()
745 *ptr++ = frame->max_display_mastering_luminance; in hdmi_drm_infoframe_pack_only()
746 *ptr++ = frame->max_display_mastering_luminance >> 8; in hdmi_drm_infoframe_pack_only()
748 *ptr++ = frame->min_display_mastering_luminance; in hdmi_drm_infoframe_pack_only()
749 *ptr++ = frame->min_display_mastering_luminance >> 8; in hdmi_drm_infoframe_pack_only()
751 *ptr++ = frame->max_cll; in hdmi_drm_infoframe_pack_only()
752 *ptr++ = frame->max_cll >> 8; in hdmi_drm_infoframe_pack_only()
754 *ptr++ = frame->max_fall; in hdmi_drm_infoframe_pack_only()
755 *ptr++ = frame->max_fall >> 8; in hdmi_drm_infoframe_pack_only()
766 * @frame: HDMI DRM infoframe
772 * contained in the @frame structure into a binary representation that
780 ssize_t hdmi_drm_infoframe_pack(struct hdmi_drm_infoframe *frame, in hdmi_drm_infoframe_pack() argument
785 ret = hdmi_drm_infoframe_check(frame); in hdmi_drm_infoframe_pack()
789 return hdmi_drm_infoframe_pack_only(frame, buffer, size); in hdmi_drm_infoframe_pack()
797 hdmi_vendor_any_infoframe_check(union hdmi_vendor_any_infoframe *frame) in hdmi_vendor_any_infoframe_check() argument
801 ret = hdmi_vendor_any_infoframe_check_only(frame); in hdmi_vendor_any_infoframe_check()
806 if (frame->any.oui != HDMI_IEEE_OUI) in hdmi_vendor_any_infoframe_check()
809 return hdmi_vendor_infoframe_check(&frame->hdmi); in hdmi_vendor_any_infoframe_check()
816 hdmi_vendor_any_infoframe_pack_only(const union hdmi_vendor_any_infoframe *frame, in hdmi_vendor_any_infoframe_pack_only() argument
821 ret = hdmi_vendor_any_infoframe_check_only(frame); in hdmi_vendor_any_infoframe_pack_only()
826 if (frame->any.oui != HDMI_IEEE_OUI) in hdmi_vendor_any_infoframe_pack_only()
829 return hdmi_vendor_infoframe_pack_only(&frame->hdmi, buffer, size); in hdmi_vendor_any_infoframe_pack_only()
837 hdmi_vendor_any_infoframe_pack(union hdmi_vendor_any_infoframe *frame, in hdmi_vendor_any_infoframe_pack() argument
842 ret = hdmi_vendor_any_infoframe_check(frame); in hdmi_vendor_any_infoframe_pack()
846 return hdmi_vendor_any_infoframe_pack_only(frame, buffer, size); in hdmi_vendor_any_infoframe_pack()
851 * @frame: HDMI infoframe
859 hdmi_infoframe_check(union hdmi_infoframe *frame) in hdmi_infoframe_check() argument
861 switch (frame->any.type) { in hdmi_infoframe_check()
863 return hdmi_avi_infoframe_check(&frame->avi); in hdmi_infoframe_check()
865 return hdmi_spd_infoframe_check(&frame->spd); in hdmi_infoframe_check()
867 return hdmi_audio_infoframe_check(&frame->audio); in hdmi_infoframe_check()
869 return hdmi_vendor_any_infoframe_check(&frame->vendor); in hdmi_infoframe_check()
871 WARN(1, "Bad infoframe type %d\n", frame->any.type); in hdmi_infoframe_check()
879 * @frame: HDMI infoframe
883 * Packs the information contained in the @frame structure into a binary
892 hdmi_infoframe_pack_only(const union hdmi_infoframe *frame, void *buffer, size_t size) in hdmi_infoframe_pack_only() argument
896 switch (frame->any.type) { in hdmi_infoframe_pack_only()
898 length = hdmi_avi_infoframe_pack_only(&frame->avi, in hdmi_infoframe_pack_only()
902 length = hdmi_drm_infoframe_pack_only(&frame->drm, in hdmi_infoframe_pack_only()
906 length = hdmi_spd_infoframe_pack_only(&frame->spd, in hdmi_infoframe_pack_only()
910 length = hdmi_audio_infoframe_pack_only(&frame->audio, in hdmi_infoframe_pack_only()
914 length = hdmi_vendor_any_infoframe_pack_only(&frame->vendor, in hdmi_infoframe_pack_only()
918 WARN(1, "Bad infoframe type %d\n", frame->any.type); in hdmi_infoframe_pack_only()
929 * @frame: HDMI infoframe
935 * contained in the @frame structure into a binary representation that
944 hdmi_infoframe_pack(union hdmi_infoframe *frame, in hdmi_infoframe_pack() argument
949 switch (frame->any.type) { in hdmi_infoframe_pack()
951 length = hdmi_avi_infoframe_pack(&frame->avi, buffer, size); in hdmi_infoframe_pack()
954 length = hdmi_drm_infoframe_pack(&frame->drm, buffer, size); in hdmi_infoframe_pack()
957 length = hdmi_spd_infoframe_pack(&frame->spd, buffer, size); in hdmi_infoframe_pack()
960 length = hdmi_audio_infoframe_pack(&frame->audio, buffer, size); in hdmi_infoframe_pack()
963 length = hdmi_vendor_any_infoframe_pack(&frame->vendor, in hdmi_infoframe_pack()
967 WARN(1, "Bad infoframe type %d\n", frame->any.type); in hdmi_infoframe_pack()
996 const struct hdmi_any_infoframe *frame) in hdmi_infoframe_log_header() argument
999 hdmi_infoframe_type_get_name(frame->type), in hdmi_infoframe_log_header()
1000 frame->version, frame->length); in hdmi_infoframe_log_header()
1192 const struct hdmi_avi_infoframe *frame) in hdmi_avi_infoframe_log() argument
1195 (const struct hdmi_any_infoframe *)frame); in hdmi_avi_infoframe_log()
1198 hdmi_colorspace_get_name(frame->colorspace)); in hdmi_avi_infoframe_log()
1200 hdmi_scan_mode_get_name(frame->scan_mode)); in hdmi_avi_infoframe_log()
1202 hdmi_colorimetry_get_name(frame->colorimetry)); in hdmi_avi_infoframe_log()
1204 hdmi_picture_aspect_get_name(frame->picture_aspect)); in hdmi_avi_infoframe_log()
1206 hdmi_active_aspect_get_name(frame->active_aspect)); in hdmi_avi_infoframe_log()
1207 hdmi_log(" itc: %s\n", frame->itc ? "IT Content" : "No Data"); in hdmi_avi_infoframe_log()
1209 hdmi_extended_colorimetry_get_name(frame->extended_colorimetry)); in hdmi_avi_infoframe_log()
1211 hdmi_quantization_range_get_name(frame->quantization_range)); in hdmi_avi_infoframe_log()
1212 hdmi_log(" nups: %s\n", hdmi_nups_get_name(frame->nups)); in hdmi_avi_infoframe_log()
1213 hdmi_log(" video code: %u\n", frame->video_code); in hdmi_avi_infoframe_log()
1215 hdmi_ycc_quantization_range_get_name(frame->ycc_quantization_range)); in hdmi_avi_infoframe_log()
1217 hdmi_content_type_get_name(frame->content_type)); in hdmi_avi_infoframe_log()
1218 hdmi_log(" pixel repeat: %u\n", frame->pixel_repeat); in hdmi_avi_infoframe_log()
1220 frame->top_bar, frame->bottom_bar, in hdmi_avi_infoframe_log()
1221 frame->left_bar, frame->right_bar); in hdmi_avi_infoframe_log()
1263 const struct hdmi_spd_infoframe *frame) in hdmi_spd_infoframe_log() argument
1268 (const struct hdmi_any_infoframe *)frame); in hdmi_spd_infoframe_log()
1272 strncpy(buf, frame->vendor, 8); in hdmi_spd_infoframe_log()
1274 strncpy(buf, frame->product, 16); in hdmi_spd_infoframe_log()
1277 hdmi_spd_sdi_get_name(frame->sdi), frame->sdi); in hdmi_spd_infoframe_log()
1393 const struct hdmi_audio_infoframe *frame) in hdmi_audio_infoframe_log() argument
1396 (const struct hdmi_any_infoframe *)frame); in hdmi_audio_infoframe_log()
1398 if (frame->channels) in hdmi_audio_infoframe_log()
1399 hdmi_log(" channels: %u\n", frame->channels - 1); in hdmi_audio_infoframe_log()
1403 hdmi_audio_coding_type_get_name(frame->coding_type)); in hdmi_audio_infoframe_log()
1405 hdmi_audio_sample_size_get_name(frame->sample_size)); in hdmi_audio_infoframe_log()
1407 hdmi_audio_sample_frequency_get_name(frame->sample_frequency)); in hdmi_audio_infoframe_log()
1409 hdmi_audio_coding_type_ext_get_name(frame->coding_type_ext)); in hdmi_audio_infoframe_log()
1411 frame->channel_allocation); in hdmi_audio_infoframe_log()
1413 frame->level_shift_value); in hdmi_audio_infoframe_log()
1415 frame->downmix_inhibit ? "Yes" : "No"); in hdmi_audio_infoframe_log()
1420 const struct hdmi_drm_infoframe *frame) in hdmi_drm_infoframe_log() argument
1425 (struct hdmi_any_infoframe *)frame); in hdmi_drm_infoframe_log()
1426 hdmi_log("length: %d\n", frame->length); in hdmi_drm_infoframe_log()
1427 hdmi_log("metadata type: %d\n", frame->metadata_type); in hdmi_drm_infoframe_log()
1428 hdmi_log("eotf: %d\n", frame->eotf); in hdmi_drm_infoframe_log()
1430 hdmi_log("x[%d]: %d\n", i, frame->display_primaries[i].x); in hdmi_drm_infoframe_log()
1431 hdmi_log("y[%d]: %d\n", i, frame->display_primaries[i].y); in hdmi_drm_infoframe_log()
1434 hdmi_log("white point x: %d\n", frame->white_point.x); in hdmi_drm_infoframe_log()
1435 hdmi_log("white point y: %d\n", frame->white_point.y); in hdmi_drm_infoframe_log()
1438 frame->max_display_mastering_luminance); in hdmi_drm_infoframe_log()
1440 frame->min_display_mastering_luminance); in hdmi_drm_infoframe_log()
1442 hdmi_log("max_cll: %d\n", frame->max_cll); in hdmi_drm_infoframe_log()
1443 hdmi_log("max_fall: %d\n", frame->max_fall); in hdmi_drm_infoframe_log()
1454 return "Frame Packing"; in hdmi_3d_structure_get_name()
1478 const union hdmi_vendor_any_infoframe *frame) in hdmi_vendor_any_infoframe_log() argument
1480 const struct hdmi_vendor_infoframe *hvf = &frame->hdmi; in hdmi_vendor_any_infoframe_log()
1483 (const struct hdmi_any_infoframe *)frame); in hdmi_vendor_any_infoframe_log()
1485 if (frame->any.oui != HDMI_IEEE_OUI) { in hdmi_vendor_any_infoframe_log()
1490 hdmi_log(" empty frame\n"); in hdmi_vendor_any_infoframe_log()
1509 * @frame: HDMI infoframe
1513 const union hdmi_infoframe *frame) in hdmi_infoframe_log() argument
1515 switch (frame->any.type) { in hdmi_infoframe_log()
1517 hdmi_avi_infoframe_log(level, dev, &frame->avi); in hdmi_infoframe_log()
1520 hdmi_spd_infoframe_log(level, dev, &frame->spd); in hdmi_infoframe_log()
1523 hdmi_audio_infoframe_log(level, dev, &frame->audio); in hdmi_infoframe_log()
1526 hdmi_vendor_any_infoframe_log(level, dev, &frame->vendor); in hdmi_infoframe_log()
1529 hdmi_drm_infoframe_log(level, dev, &frame->drm); in hdmi_infoframe_log()
1537 * @frame: HDMI AVI infoframe
1542 * @frame of the HDMI Auxiliary Video (AVI) information frame.
1548 static int hdmi_avi_infoframe_unpack(struct hdmi_avi_infoframe *frame, in hdmi_avi_infoframe_unpack() argument
1564 hdmi_avi_infoframe_init(frame); in hdmi_avi_infoframe_unpack()
1568 frame->colorspace = (ptr[0] >> 5) & 0x3; in hdmi_avi_infoframe_unpack()
1570 frame->active_aspect = ptr[1] & 0xf; in hdmi_avi_infoframe_unpack()
1572 frame->top_bar = (ptr[6] << 8) | ptr[5]; in hdmi_avi_infoframe_unpack()
1573 frame->bottom_bar = (ptr[8] << 8) | ptr[7]; in hdmi_avi_infoframe_unpack()
1576 frame->left_bar = (ptr[10] << 8) | ptr[9]; in hdmi_avi_infoframe_unpack()
1577 frame->right_bar = (ptr[12] << 8) | ptr[11]; in hdmi_avi_infoframe_unpack()
1579 frame->scan_mode = ptr[0] & 0x3; in hdmi_avi_infoframe_unpack()
1581 frame->colorimetry = (ptr[1] >> 6) & 0x3; in hdmi_avi_infoframe_unpack()
1582 frame->picture_aspect = (ptr[1] >> 4) & 0x3; in hdmi_avi_infoframe_unpack()
1583 frame->active_aspect = ptr[1] & 0xf; in hdmi_avi_infoframe_unpack()
1585 frame->itc = ptr[2] & 0x80 ? true : false; in hdmi_avi_infoframe_unpack()
1586 frame->extended_colorimetry = (ptr[2] >> 4) & 0x7; in hdmi_avi_infoframe_unpack()
1587 frame->quantization_range = (ptr[2] >> 2) & 0x3; in hdmi_avi_infoframe_unpack()
1588 frame->nups = ptr[2] & 0x3; in hdmi_avi_infoframe_unpack()
1590 frame->video_code = ptr[3] & 0x7f; in hdmi_avi_infoframe_unpack()
1591 frame->ycc_quantization_range = (ptr[4] >> 6) & 0x3; in hdmi_avi_infoframe_unpack()
1592 frame->content_type = (ptr[4] >> 4) & 0x3; in hdmi_avi_infoframe_unpack()
1594 frame->pixel_repeat = ptr[4] & 0xf; in hdmi_avi_infoframe_unpack()
1601 * @frame: HDMI SPD infoframe
1606 * @frame of the HDMI Source Product Description (SPD) information frame.
1612 static int hdmi_spd_infoframe_unpack(struct hdmi_spd_infoframe *frame, in hdmi_spd_infoframe_unpack() argument
1632 ret = hdmi_spd_infoframe_init(frame, ptr, ptr + 8); in hdmi_spd_infoframe_unpack()
1636 frame->sdi = ptr[24]; in hdmi_spd_infoframe_unpack()
1643 * @frame: HDMI Audio infoframe
1648 * @frame of the HDMI Audio information frame.
1654 static int hdmi_audio_infoframe_unpack(struct hdmi_audio_infoframe *frame, in hdmi_audio_infoframe_unpack() argument
1672 ret = hdmi_audio_infoframe_init(frame); in hdmi_audio_infoframe_unpack()
1678 frame->channels = ptr[0] & 0x7; in hdmi_audio_infoframe_unpack()
1679 frame->coding_type = (ptr[0] >> 4) & 0xf; in hdmi_audio_infoframe_unpack()
1680 frame->sample_size = ptr[1] & 0x3; in hdmi_audio_infoframe_unpack()
1681 frame->sample_frequency = (ptr[1] >> 2) & 0x7; in hdmi_audio_infoframe_unpack()
1682 frame->coding_type_ext = ptr[2] & 0x1f; in hdmi_audio_infoframe_unpack()
1683 frame->channel_allocation = ptr[3]; in hdmi_audio_infoframe_unpack()
1684 frame->level_shift_value = (ptr[4] >> 3) & 0xf; in hdmi_audio_infoframe_unpack()
1685 frame->downmix_inhibit = ptr[4] & 0x80 ? true : false; in hdmi_audio_infoframe_unpack()
1692 * @frame: HDMI Vendor infoframe
1697 * @frame of the HDMI Vendor information frame.
1704 hdmi_vendor_any_infoframe_unpack(union hdmi_vendor_any_infoframe *frame, in hdmi_vendor_any_infoframe_unpack() argument
1711 struct hdmi_vendor_infoframe *hvf = &frame->hdmi; in hdmi_vendor_any_infoframe_unpack()
1774 * @frame: HDMI DRM infoframe
1779 * into a structured @frame of the HDMI Dynamic Range and Mastering (DRM)
1784 int hdmi_drm_infoframe_unpack_only(struct hdmi_drm_infoframe *frame, in hdmi_drm_infoframe_unpack_only() argument
1797 ret = hdmi_drm_infoframe_init(frame); in hdmi_drm_infoframe_unpack_only()
1801 frame->eotf = ptr[0] & 0x7; in hdmi_drm_infoframe_unpack_only()
1802 frame->metadata_type = ptr[1] & 0x7; in hdmi_drm_infoframe_unpack_only()
1808 frame->display_primaries[i].x = (x_msb << 8) | x_lsb; in hdmi_drm_infoframe_unpack_only()
1811 frame->display_primaries[i].y = (y_msb << 8) | y_lsb; in hdmi_drm_infoframe_unpack_only()
1814 frame->white_point.x = (ptr[15] << 8) | ptr[14]; in hdmi_drm_infoframe_unpack_only()
1815 frame->white_point.y = (ptr[17] << 8) | ptr[16]; in hdmi_drm_infoframe_unpack_only()
1817 frame->max_display_mastering_luminance = (ptr[19] << 8) | ptr[18]; in hdmi_drm_infoframe_unpack_only()
1818 frame->min_display_mastering_luminance = (ptr[21] << 8) | ptr[20]; in hdmi_drm_infoframe_unpack_only()
1819 frame->max_cll = (ptr[23] << 8) | ptr[22]; in hdmi_drm_infoframe_unpack_only()
1820 frame->max_fall = (ptr[25] << 8) | ptr[24]; in hdmi_drm_infoframe_unpack_only()
1828 * @frame: HDMI DRM infoframe
1833 * a structured @frame of the HDMI Dynamic Range and Mastering (DRM)
1839 static int hdmi_drm_infoframe_unpack(struct hdmi_drm_infoframe *frame, in hdmi_drm_infoframe_unpack() argument
1856 ret = hdmi_drm_infoframe_unpack_only(frame, ptr + HDMI_INFOFRAME_HEADER_SIZE, in hdmi_drm_infoframe_unpack()
1863 * @frame: HDMI infoframe
1868 * @frame of a HDMI infoframe.
1874 int hdmi_infoframe_unpack(union hdmi_infoframe *frame, in hdmi_infoframe_unpack() argument
1885 ret = hdmi_avi_infoframe_unpack(&frame->avi, buffer, size); in hdmi_infoframe_unpack()
1888 ret = hdmi_drm_infoframe_unpack(&frame->drm, buffer, size); in hdmi_infoframe_unpack()
1891 ret = hdmi_spd_infoframe_unpack(&frame->spd, buffer, size); in hdmi_infoframe_unpack()
1894 ret = hdmi_audio_infoframe_unpack(&frame->audio, buffer, size); in hdmi_infoframe_unpack()
1897 ret = hdmi_vendor_any_infoframe_unpack(&frame->vendor, buffer, size); in hdmi_infoframe_unpack()