]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmi.c
3 void pack_hdmi_infoframe(struct packed_hdmi_infoframe
*packed_frame
,
4 u8
*raw_frame
, ssize_t len
)
10 u32 subpack1_high
= 0;
14 * "When in doubt, use brute force."
19 * We presume that no valid frame is longer than 17
20 * octets, including header... And truncate to that
24 subpack1_high
= (raw_frame
[16] << 16);
26 subpack1_high
|= (raw_frame
[15] << 8);
28 subpack1_high
|= raw_frame
[14];
30 subpack1_low
= (raw_frame
[13] << 24);
32 subpack1_low
|= (raw_frame
[12] << 16);
34 subpack1_low
|= (raw_frame
[11] << 8);
36 subpack1_low
|= raw_frame
[10];
38 subpack0_high
= (raw_frame
[9] << 16);
40 subpack0_high
|= (raw_frame
[8] << 8);
42 subpack0_high
|= raw_frame
[7];
44 subpack0_low
= (raw_frame
[6] << 24);
46 subpack0_low
|= (raw_frame
[5] << 16);
48 subpack0_low
|= (raw_frame
[4] << 8);
50 subpack0_low
|= raw_frame
[3];
52 header
= (raw_frame
[2] << 16);
54 header
|= (raw_frame
[1] << 8);
56 header
|= raw_frame
[0];
61 packed_frame
->header
= header
;
62 packed_frame
->subpack0_low
= subpack0_low
;
63 packed_frame
->subpack0_high
= subpack0_high
;
64 packed_frame
->subpack1_low
= subpack1_low
;
65 packed_frame
->subpack1_high
= subpack1_high
;